Rev 3008 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3008 | Rev 3108 | ||
---|---|---|---|
Line 32... | Line 32... | ||
32 | 32 | ||
33 | LIBC_PREFIX = ../../lib/libc |
33 | LIBC_PREFIX = ../../lib/libc |
34 | SOFTINT_PREFIX = ../../lib/softint |
34 | SOFTINT_PREFIX = ../../lib/softint |
35 | include $(LIBC_PREFIX)/Makefile.toolchain |
35 | include $(LIBC_PREFIX)/Makefile.toolchain |
36 | include arch/$(ARCH)/Makefile.inc |
36 | include arch/$(ARCH)/Makefile.inc |
- | 37 | include genarch/Makefile.inc |
|
37 | 38 | ||
38 | CFLAGS += -I../../srv/kbd/include |
39 | CFLAGS += -I../../srv/kbd/include -Igenarch/idec |
39 | 40 | ||
40 | LIBS = $(LIBC_PREFIX)/libc.a |
41 | LIBS = $(LIBC_PREFIX)/libc.a |
41 | 42 | ||
42 | ## Sources |
43 | ## Sources |
43 | # |
44 | # |
Line 47... | Line 48... | ||
47 | cons.c \ |
48 | cons.c \ |
48 | dthread.c \ |
49 | dthread.c \ |
49 | breakpoint.c \ |
50 | breakpoint.c \ |
50 | main.c |
51 | main.c |
51 | 52 | ||
52 | GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) |
53 | SOURCES := $(ARCH_SOURCES) $(GENARCH_SOURCES) $(GENERIC_SOURCES) |
53 | ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES))) |
54 | OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
54 | 55 | ||
55 | .PHONY: all clean depend disasm inc |
56 | .PHONY: all clean depend disasm inc |
56 | 57 | ||
57 | all: inc $(OUTPUT) disasm |
58 | all: inc $(OUTPUT) disasm |
58 | 59 | ||
Line 64... | Line 65... | ||
64 | clean: |
65 | clean: |
65 | -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend include/arch |
66 | -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend include/arch |
66 | find . -name '*.o' -follow -exec rm \{\} \; |
67 | find . -name '*.o' -follow -exec rm \{\} \; |
67 | 68 | ||
68 | depend: |
69 | depend: |
69 | $(CC) $(DEFS) $(CFLAGS) -M $(ARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend |
70 | $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
70 | 71 | ||
71 | $(OUTPUT): $(ARCH_OBJECTS) $(GENERIC_OBJECTS) $(LIBS) |
72 | $(OUTPUT): $(OBJECTS) $(LIBS) |
72 | $(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(ARCH_OBJECTS) $(GENERIC_OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
73 | $(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
73 | 74 | ||
74 | disasm: |
75 | disasm: |
75 | $(OBJDUMP) -d $(OUTPUT) >$(OUTPUT).disasm |
76 | $(OBJDUMP) -d $(OUTPUT) >$(OUTPUT).disasm |
76 | 77 | ||
77 | %.o: %.S |
78 | %.o: %.S |