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