Rev 3386 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3386 | Rev 4153 | ||
---|---|---|---|
Line 29... | Line 29... | ||
29 | ## Setup toolchain |
29 | ## Setup toolchain |
30 | # |
30 | # |
31 | 31 | ||
32 | LIBC_PREFIX = ../../lib/libc |
32 | LIBC_PREFIX = ../../lib/libc |
33 | SOFTINT_PREFIX = ../../lib/softint |
33 | SOFTINT_PREFIX = ../../lib/softint |
- | 34 | ||
34 | include $(LIBC_PREFIX)/Makefile.toolchain |
35 | include $(LIBC_PREFIX)/Makefile.toolchain |
35 | 36 | ||
36 | CFLAGS += -I. -I../kbd/include -I../fb |
37 | CFLAGS += -I. -I../kbd/include -I../fb |
37 | 38 | ||
38 | LIBS = $(LIBC_PREFIX)/libc.a |
39 | LIBS = $(LIBC_PREFIX)/libc.a |
39 | 40 | ||
Line 55... | Line 56... | ||
55 | 56 | ||
56 | GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) \ |
57 | GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) \ |
57 | $(addsuffix .o,$(basename $(IMAGES))) |
58 | $(addsuffix .o,$(basename $(IMAGES))) |
58 | ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES))) |
59 | ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES))) |
59 | 60 | ||
- | 61 | OBJECTS := $(GENERIC_OBJECTS) $(ARCH_OBJECTS) |
|
- | 62 | ||
60 | .PHONY: all clean depend disasm |
63 | .PHONY: all clean depend disasm |
61 | 64 | ||
62 | all: $(OUTPUT) $(OUTPUT).disasm |
65 | all: $(OUTPUT) $(OUTPUT).disasm |
63 | 66 | ||
64 | -include Makefile.depend |
67 | -include Makefile.depend |
65 | 68 | ||
66 | clean: |
69 | clean: |
67 | -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend |
70 | -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) |
68 | 71 | ||
69 | depend: |
72 | depend: |
70 | $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
73 | $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
71 | 74 | ||
72 | $(OUTPUT): $(ARCH_OBJECTS) $(GENERIC_OBJECTS) $(LIBS) |
75 | $(OUTPUT): $(OBJECTS) $(LIBS) |
73 | $(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(GENERIC_OBJECTS) $(ARCH_OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
76 | $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
74 | 77 | ||
75 | disasm: $(OUTPUT).disasm |
78 | disasm: $(OUTPUT).disasm |
76 | 79 | ||
77 | $(OUTPUT).disasm: $(OUTPUT) |
80 | $(OUTPUT).disasm: $(OUTPUT) |
78 | $(OBJDUMP) -d $< >$@ |
81 | $(OBJDUMP) -d $< >$@ |