Rev 3901 | Rev 4707 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3901 | Rev 3989 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | # |
1 | # |
2 | # Copyright (c) 2005 Martin Decky |
2 | # Copyright (c) 2009 Lukas Mejdrech |
3 | # All rights reserved. |
3 | # All rights reserved. |
4 | # |
4 | # |
5 | # Redistribution and use in source and binary forms, with or without |
5 | # Redistribution and use in source and binary forms, with or without |
6 | # modification, are permitted provided that the following conditions |
6 | # modification, are permitted provided that the following conditions |
7 | # are met: |
7 | # are met: |
Line 26... | Line 26... | ||
26 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | # |
27 | # |
28 | 28 | ||
29 | NAME = tcp |
29 | NAME = tcp |
30 | 30 | ||
31 | ## Setup toolchain |
31 | NET_BASE = ../../ |
32 | # |
- | |
33 | - | ||
34 | LIBC_PREFIX = ../../../../lib/libc |
- | |
35 | SOFTINT_PREFIX = ../../../../lib/softint |
32 | STRUCTURES = $(NET_BASE)structures/ |
36 | include $(LIBC_PREFIX)/Makefile.toolchain |
- | |
37 | - | ||
38 | LIBS = $(LIBC_PREFIX)/libc.a |
- | |
39 | 33 | ||
40 | ## Sources |
34 | ## Sources |
41 | # |
35 | # |
42 | 36 | ||
43 | OUTPUT = $(NAME) |
37 | OUTPUT = $(NAME) |
44 | SOURCES = \ |
38 | SOURCES = \ |
45 | $(NAME)_module.c \ |
39 | $(NAME)_module.c \ |
46 | $(NAME).c \ |
40 | $(NAME).c \ |
47 | ../../module.c \ |
41 | $(NET_BASE)module.c \ |
48 | ../../modules.c \ |
42 | $(NET_BASE)modules.c \ |
49 | ../../structures/packet/packet.c \ |
43 | $(STRUCTURES)packet/packet.c \ |
50 | ../../structures/packet/packet_client.c |
44 | $(STRUCTURES)packet/packet_client.c |
51 | - | ||
52 | DEFS += -D TCP_BUNDLE=1 -D $(NAME)_message=module_message -D $(NAME)_start_module=module_start -D $(NAME)_print_name=module_print_name |
- | |
53 | - | ||
54 | OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
- | |
55 | - | ||
56 | .PHONY: all clean depend disasm |
- | |
57 | - | ||
58 | all: $(OUTPUT) $(OUTPUT).disasm |
- | |
59 | - | ||
60 | -include Makefile.depend |
- | |
61 | - | ||
62 | clean: |
- | |
63 | -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend |
- | |
64 | - | ||
65 | depend: |
- | |
66 | $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
- | |
67 | - | ||
68 | $(OUTPUT): $(OBJECTS) $(LIBS) |
- | |
69 | $(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
- | |
70 | - | ||
71 | disasm: $(OUTPUT).disasm |
- | |
72 | - | ||
73 | $(OUTPUT).disasm: $(OUTPUT) |
- | |
74 | $(OBJDUMP) -d $< >$@ |
- | |
75 | - | ||
76 | %.o: %.S |
- | |
77 | $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
- | |
78 | 45 | ||
79 | %.o: %.s |
- | |
80 | $(AS) $(AFLAGS) $< -o $@ |
46 | NET_DEFS += -D TCP_BUNDLE=1 |
81 | 47 | ||
82 | %.o: %.c |
- | |
83 | $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ |
48 | include $(NET_BASE)Makefile.module |