Rev 3803 | Rev 3924 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3803 | Rev 3882 | ||
---|---|---|---|
Line 27... | Line 27... | ||
27 | # |
27 | # |
28 | 28 | ||
29 | ## Setup toolchain |
29 | ## Setup toolchain |
30 | # |
30 | # |
31 | 31 | ||
32 | -include ../../../Makefile.config |
- | |
33 | - | ||
34 | LIBC_PREFIX = ../../lib/libc |
32 | LIBC_PREFIX = ../../lib/libc |
35 | SOFTINT_PREFIX = ../../lib/softint |
33 | SOFTINT_PREFIX = ../../lib/softint |
- | 34 | ||
36 | include $(LIBC_PREFIX)/Makefile.toolchain |
35 | include $(LIBC_PREFIX)/Makefile.toolchain |
37 | 36 | ||
38 | CFLAGS += -Iinclude -I../libadt/include |
37 | CFLAGS += -Iinclude -I../libadt/include |
39 | 38 | ||
40 | LIBS = $(LIBC_PREFIX)/libc.a |
39 | LIBS = $(LIBC_PREFIX)/libc.a |
Line 46... | Line 45... | ||
46 | GENERIC_SOURCES = \ |
45 | GENERIC_SOURCES = \ |
47 | generic/kbd.c \ |
46 | generic/kbd.c \ |
48 | generic/key_buffer.c |
47 | generic/key_buffer.c |
49 | 48 | ||
50 | ARCH_SOURCES = \ |
49 | ARCH_SOURCES = \ |
51 | arch/$(ARCH)/src/kbd.c |
50 | arch/$(UARCH)/src/kbd.c |
52 | 51 | ||
53 | ifeq ($(ARCH), ia32) |
52 | ifeq ($(UARCH), ia32) |
54 | ARCH_SOURCES += \ |
53 | ARCH_SOURCES += \ |
55 | arch/$(ARCH)/src/mouse.c \ |
54 | arch/$(UARCH)/src/mouse.c \ |
56 | arch/$(ARCH)/src/scanc.c |
55 | arch/$(UARCH)/src/scanc.c |
57 | GENARCH_SOURCES = \ |
56 | GENARCH_SOURCES = \ |
58 | genarch/src/kbd.c |
57 | genarch/src/kbd.c |
59 | CFLAGS += -DMOUSE_ENABLED |
58 | CFLAGS += -DMOUSE_ENABLED |
60 | endif |
59 | endif |
61 | ifeq ($(ARCH), ia64) |
60 | ifeq ($(UARCH), ia64) |
62 | ARCH_SOURCES += \ |
61 | ARCH_SOURCES += \ |
63 | arch/$(ARCH)/src/mouse.c \ |
62 | arch/$(UARCH)/src/mouse.c \ |
64 | arch/$(ARCH)/src/scanc.c \ |
63 | arch/$(UARCH)/src/scanc.c \ |
65 | arch/$(ARCH)/src/lkbd.c |
64 | arch/$(UARCH)/src/lkbd.c |
66 | GENARCH_SOURCES = \ |
65 | GENARCH_SOURCES = \ |
67 | genarch/src/kbd.c |
66 | genarch/src/kbd.c |
68 | CFLAGS += -DMOUSE_ENABLED |
67 | CFLAGS += -DMOUSE_ENABLED |
69 | endif |
68 | endif |
70 | ifeq ($(ARCH), amd64) |
69 | ifeq ($(UARCH), amd64) |
71 | ARCH_SOURCES += \ |
70 | ARCH_SOURCES += \ |
72 | arch/$(ARCH)/src/mouse.c \ |
71 | arch/$(UARCH)/src/mouse.c \ |
73 | arch/$(ARCH)/src/scanc.c |
72 | arch/$(UARCH)/src/scanc.c |
74 | GENARCH_SOURCES = \ |
73 | GENARCH_SOURCES = \ |
75 | genarch/src/kbd.c |
74 | genarch/src/kbd.c |
76 | CFLAGS += -DMOUSE_ENABLED |
75 | CFLAGS += -DMOUSE_ENABLED |
77 | endif |
76 | endif |
78 | ifeq ($(ARCH), sparc64) |
77 | ifeq ($(UARCH), sparc64) |
79 | ARCH_SOURCES += \ |
78 | ARCH_SOURCES += \ |
80 | arch/$(ARCH)/src/scanc.c \ |
79 | arch/$(UARCH)/src/scanc.c \ |
81 | arch/$(ARCH)/src/sgcn.c |
80 | arch/$(UARCH)/src/sgcn.c |
82 | GENARCH_SOURCES = \ |
81 | GENARCH_SOURCES = \ |
83 | genarch/src/kbd.c \ |
82 | genarch/src/kbd.c \ |
84 | genarch/src/nofb.c |
83 | genarch/src/nofb.c |
85 | endif |
84 | endif |
86 | ifeq ($(ARCH), arm32) |
85 | ifeq ($(UARCH), arm32) |
87 | ARCH_SOURCES += \ |
86 | ARCH_SOURCES += \ |
88 | arch/$(ARCH)/src/kbd_gxemul.c |
87 | arch/$(UARCH)/src/kbd_gxemul.c |
89 | endif |
88 | endif |
90 | ifeq ($(ARCH), mips32) |
89 | ifeq ($(UARCH), mips32) |
91 | GENARCH_SOURCES += \ |
90 | GENARCH_SOURCES += \ |
92 | genarch/src/nofb.c |
91 | genarch/src/nofb.c |
93 | endif |
92 | endif |
94 | ifeq ($(ARCH), mips32eb) |
93 | ifeq ($(UARCH), mips32eb) |
95 | GENARCH_SOURCES += \ |
94 | GENARCH_SOURCES += \ |
96 | genarch/src/nofb.c |
95 | genarch/src/nofb.c |
97 | endif |
96 | endif |
98 | 97 | ||
99 | GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) |
98 | GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) |
Line 107... | Line 106... | ||
107 | all: links $(OUTPUT) $(OUTPUT).disasm |
106 | all: links $(OUTPUT) $(OUTPUT).disasm |
108 | 107 | ||
109 | -include Makefile.depend |
108 | -include Makefile.depend |
110 | 109 | ||
111 | links: |
110 | links: |
112 | ln -sfn ../arch/$(ARCH)/include include/arch |
111 | ln -sfn ../arch/$(UARCH)/include include/arch |
113 | ln -sfn ../genarch/include include/genarch |
112 | ln -sfn ../genarch/include include/genarch |
114 | 113 | ||
115 | clean: |
114 | clean: |
116 | -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend include/arch include/genarch $(OBJECTS) |
115 | -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend include/arch include/genarch $(OBJECTS) |
117 | 116 | ||
118 | depend: |
117 | depend: |
119 | $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
118 | $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
120 | 119 | ||
121 | $(OUTPUT): $(OBJECTS) $(LIBS) |
120 | $(OUTPUT): $(OBJECTS) $(LIBS) |
122 | $(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
121 | $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
123 | 122 | ||
124 | disasm: $(OUTPUT).disasm |
123 | disasm: $(OUTPUT).disasm |
125 | 124 | ||
126 | $(OUTPUT).disasm: $(OUTPUT) |
125 | $(OUTPUT).disasm: $(OUTPUT) |
127 | $(OBJDUMP) -d $< >$@ |
126 | $(OBJDUMP) -d $< >$@ |