Rev 3386 | Rev 4263 | 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 | include ../../../Makefile.config |
- | |
36 | 36 | ||
37 | CFLAGS += -Iinclude -I../libadt/include |
37 | CFLAGS += -Iinclude -I../libadt/include |
38 | 38 | ||
39 | LIBS = $(LIBC_PREFIX)/libc.a |
39 | LIBS = $(LIBC_PREFIX)/libc.a |
40 | 40 | ||
Line 42... | Line 42... | ||
42 | # |
42 | # |
43 | 43 | ||
44 | OUTPUT = kbd |
44 | OUTPUT = kbd |
45 | GENERIC_SOURCES = \ |
45 | GENERIC_SOURCES = \ |
46 | generic/kbd.c \ |
46 | generic/kbd.c \ |
- | 47 | genarch/gsp.c \ |
|
- | 48 | genarch/stroke.c \ |
|
47 | generic/key_buffer.c |
49 | generic/key_buffer.c |
48 | 50 | ||
49 | ARCH_SOURCES = \ |
51 | ARCH_SOURCES = |
50 | arch/$(ARCH)/src/kbd.c |
52 | GENARCH_SOURCES = |
51 | 53 | ||
52 | ifeq ($(ARCH), ia32) |
- | |
53 | ARCH_SOURCES += \ |
- | |
54 | arch/$(ARCH)/src/mouse.c \ |
- | |
55 | arch/$(ARCH)/src/scanc.c |
- | |
56 | GENARCH_SOURCES = \ |
- | |
57 | genarch/src/kbd.c |
- | |
58 | CFLAGS += -DMOUSE_ENABLED |
- | |
59 | endif |
- | |
60 | ifeq ($(ARCH), amd64) |
54 | ifeq ($(KBD_LAYOUT), us_qwerty) |
61 | ARCH_SOURCES += \ |
- | |
62 | arch/$(ARCH)/src/mouse.c \ |
- | |
63 | arch/$(ARCH)/src/scanc.c |
- | |
64 | GENARCH_SOURCES = \ |
55 | GENARCH_SOURCES += layout/us_qwerty.c |
65 | genarch/src/kbd.c |
- | |
66 | CFLAGS += -DMOUSE_ENABLED |
- | |
67 | endif |
56 | endif |
68 | ifeq ($(ARCH), sparc64) |
57 | ifeq ($(KBD_LAYOUT), us_dvorak) |
69 | ARCH_SOURCES += \ |
- | |
70 | arch/$(ARCH)/src/scanc.c |
- | |
71 | GENARCH_SOURCES = \ |
58 | GENARCH_SOURCES += layout/us_dvorak.c |
72 | genarch/src/kbd.c |
- | |
73 | endif |
- | |
74 | ifeq ($(ARCH), arm32) |
- | |
75 | ARCH_SOURCES += \ |
- | |
76 | arch/$(ARCH)/src/kbd_gxemul.c |
- | |
77 | endif |
59 | endif |
78 | 60 | ||
- | 61 | ifeq ($(UARCH), amd64) |
|
- | 62 | GENARCH_SOURCES += \ |
|
- | 63 | port/i8042.c \ |
|
- | 64 | ctl/pc.c |
|
- | 65 | endif |
|
- | 66 | ifeq ($(UARCH), arm32) |
|
- | 67 | GENARCH_SOURCES += \ |
|
- | 68 | port/gxemul.c |
|
- | 69 | ifeq ($(CONFIG_FB), y) |
|
- | 70 | GENARCH_SOURCES += \ |
|
- | 71 | ctl/gxe_fb.c |
|
- | 72 | else |
|
- | 73 | GENARCH_SOURCES += \ |
|
- | 74 | ctl/stty.c |
|
- | 75 | endif |
|
- | 76 | endif |
|
- | 77 | ifeq ($(UARCH), ia32) |
|
- | 78 | GENARCH_SOURCES += \ |
|
- | 79 | port/i8042.c \ |
|
- | 80 | ctl/pc.c |
|
- | 81 | endif |
|
- | 82 | ifeq ($(MACHINE), i460GX) |
|
- | 83 | GENARCH_SOURCES += \ |
|
- | 84 | port/i8042.c \ |
|
- | 85 | ctl/pc.c |
|
- | 86 | endif |
|
- | 87 | ifeq ($(MACHINE), ski) |
|
- | 88 | GENARCH_SOURCES += \ |
|
- | 89 | port/ski.c \ |
|
- | 90 | ctl/stty.c |
|
- | 91 | endif |
|
- | 92 | ifeq ($(MACHINE), msim) |
|
- | 93 | GENARCH_SOURCES += \ |
|
- | 94 | port/msim.c \ |
|
- | 95 | ctl/stty.c |
|
- | 96 | endif |
|
- | 97 | ifeq ($(MACHINE), lgxemul) |
|
- | 98 | GENARCH_SOURCES += \ |
|
- | 99 | port/gxemul.c |
|
- | 100 | ifeq ($(CONFIG_FB), y) |
|
- | 101 | GENARCH_SOURCES += \ |
|
- | 102 | ctl/gxe_fb.c |
|
- | 103 | else |
|
- | 104 | GENARCH_SOURCES += \ |
|
- | 105 | ctl/stty.c |
|
- | 106 | endif |
|
- | 107 | endif |
|
- | 108 | ifeq ($(MACHINE), bgxemul) |
|
- | 109 | GENARCH_SOURCES += \ |
|
- | 110 | port/gxemul.c \ |
|
- | 111 | ctl/stty.c |
|
- | 112 | endif |
|
- | 113 | ifeq ($(UARCH), ppc32) |
|
- | 114 | GENARCH_SOURCES += \ |
|
- | 115 | port/dummy.c \ |
|
- | 116 | ctl/stty.c |
|
- | 117 | endif |
|
- | 118 | ifeq ($(UARCH), sparc64) |
|
- | 119 | ifeq ($(MACHINE),serengeti) |
|
- | 120 | GENARCH_SOURCES += \ |
|
- | 121 | port/sgcn.c \ |
|
- | 122 | ctl/stty.c |
|
- | 123 | else |
|
- | 124 | GENARCH_SOURCES += \ |
|
- | 125 | port/z8530.c \ |
|
- | 126 | ctl/sun.c |
|
- | 127 | endif |
|
- | 128 | endif |
|
79 | 129 | ||
80 | GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) |
130 | GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) |
81 | ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES))) |
131 | ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES))) |
82 | GENARCH_OBJECTS := $(addsuffix .o,$(basename $(GENARCH_SOURCES))) |
132 | GENARCH_OBJECTS := $(addsuffix .o,$(basename $(GENARCH_SOURCES))) |
83 | 133 | ||
- | 134 | OBJECTS := $(ARCH_OBJECTS) $(GENERIC_OBJECTS) $(GENARCH_OBJECTS) |
|
- | 135 | ||
84 | .PHONY: all clean depend disasm links |
136 | .PHONY: all clean depend disasm links |
85 | 137 | ||
86 | all: links $(OUTPUT) $(OUTPUT).disasm |
138 | all: $(OUTPUT) $(OUTPUT).disasm |
87 | 139 | ||
88 | -include Makefile.depend |
140 | -include Makefile.depend |
89 | 141 | ||
90 | links: |
- | |
91 | ln -sfn ../arch/$(ARCH)/include include/arch |
- | |
92 | ln -sfn ../genarch/include include/genarch |
- | |
93 | - | ||
94 | clean: |
142 | clean: |
95 | -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend include/arch include/genarch |
143 | -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) |
96 | 144 | ||
97 | depend: |
145 | depend: |
98 | $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
146 | $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
99 | 147 | ||
100 | $(OUTPUT): $(ARCH_OBJECTS) $(GENERIC_OBJECTS) $(GENARCH_OBJECTS) $(LIBS) |
148 | $(OUTPUT): $(OBJECTS) $(LIBS) |
101 | $(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(GENERIC_OBJECTS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
149 | $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
102 | 150 | ||
103 | disasm: $(OUTPUT).disasm |
151 | disasm: $(OUTPUT).disasm |
104 | 152 | ||
105 | $(OUTPUT).disasm: $(OUTPUT) |
153 | $(OUTPUT).disasm: $(OUTPUT) |
106 | $(OBJDUMP) -d $< >$@ |
154 | $(OBJDUMP) -d $< >$@ |