source: mainline/uspace/srv/hid/kbd/Makefile.build@ 9b87284

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 9b87284 was fb52db8, checked in by Martin Decky <martin@…>, 16 years ago

make abs32le compile and link
abs32le now "works" (at least compiled with native x86 GCC), but more work on documentation still has to be done

  • Property mode set to 100644
File size: 3.7 KB
RevLine 
[cc1f8d4]1#
2# Copyright (c) 2005 Martin Decky
3# Copyright (c) 2007 Jakub Jermar
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:
9#
10# - Redistributions of source code must retain the above copyright
11# notice, this list of conditions and the following disclaimer.
12# - Redistributions in binary form must reproduce the above copyright
13# notice, this list of conditions and the following disclaimer in the
14# documentation and/or other materials provided with the distribution.
15# - The name of the author may not be used to endorse or promote products
16# derived from this software without specific prior written permission.
17#
18# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28#
29
30## Setup toolchain
31#
32
33include Makefile.common
34include $(LIBC_PREFIX)/Makefile.toolchain
35
36CFLAGS += -Iinclude
37
38## Sources
39#
40
41SOURCES = \
42 generic/kbd.c \
43 genarch/gsp.c \
44 genarch/stroke.c \
45 layout/cz.c \
46 layout/us_qwerty.c \
47 layout/us_dvorak.c
48
49ifeq ($(UARCH),amd64)
50 SOURCES += \
[b3d513f]51 port/chardev.c \
[cc1f8d4]52 ctl/pc.c
53endif
54
55ifeq ($(UARCH),arm32)
56 ifeq ($(MACHINE),testarm)
57 SOURCES += \
58 port/gxemul.c
59
60 ifeq ($(CONFIG_FB),y)
61 SOURCES += \
62 ctl/gxe_fb.c
63 else
64 SOURCES += \
65 ctl/stty.c
66 endif
67 endif
68 ifeq ($(MACHINE),integratorcp)
69 SOURCES += \
70 port/pl050.c \
71 ctl/pl050.c
72 endif
73endif
74
75ifeq ($(UARCH),ia32)
76 SOURCES += \
[9f51afc]77 port/chardev.c \
[cc1f8d4]78 ctl/pc.c
79endif
80
81ifeq ($(MACHINE),i460GX)
82 SOURCES += \
[b3d513f]83 port/chardev.c \
[cc1f8d4]84 ctl/pc.c
85endif
86
87ifeq ($(MACHINE),ski)
88 SOURCES += \
89 port/ski.c \
90 ctl/stty.c
91endif
92
93ifeq ($(MACHINE),msim)
94 SOURCES += \
95 port/msim.c \
96 ctl/stty.c
97endif
98
99ifeq ($(MACHINE),lgxemul)
100 SOURCES += \
101 port/gxemul.c
102
103 ifeq ($(CONFIG_FB),y)
104 SOURCES += \
105 ctl/gxe_fb.c
106 else
107 SOURCES += \
108 ctl/stty.c
109 endif
110endif
111
112ifeq ($(MACHINE),bgxemul)
113 SOURCES += \
114 port/gxemul.c
115
116 ifeq ($(CONFIG_FB),y)
117 SOURCES += \
118 ctl/gxe_fb.c
119 else
120 SOURCES += \
121 ctl/stty.c
122 endif
123endif
124
125ifeq ($(UARCH),ppc32)
126 SOURCES += \
[3a2f8aa]127 port/adb.c \
128 ctl/apple.c
[cc1f8d4]129endif
130
131ifeq ($(UARCH),sparc64)
[b473611]132 ifeq ($(PROCESSOR),sun4v)
[cc1f8d4]133 SOURCES += \
[b473611]134 port/niagara.c \
[cc1f8d4]135 ctl/stty.c
136 else
[eeb643d]137 ifeq ($(MACHINE),serengeti)
138 SOURCES += \
139 port/sgcn.c \
140 ctl/stty.c
141 endif
142 ifeq ($(MACHINE),generic)
143 SOURCES += \
[cc1f8d4]144 port/sun.c \
145 port/z8530.c \
146 port/ns16550.c \
147 ctl/sun.c
[eeb643d]148 endif
[cc1f8d4]149 endif
150endif
151
[fb52db8]152ifeq ($(UARCH),abs32le)
153 SOURCES += \
154 port/dummy.c \
155 ctl/pc.c
156endif
157
[cc1f8d4]158OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
159
160.PHONY: all
161
162all: $(OUTPUT) $(OUTPUT).disasm
163
164-include $(DEPEND)
165
166$(OUTPUT).disasm: $(OUTPUT)
167 $(OBJDUMP) -d $< > $@
168
169$(OUTPUT): $(OBJECTS) $(LIBS)
170 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map
171
172%.o: %.c $(DEPEND)
173 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@
[8786aa5]174ifeq ($(PRECHECK),y)
175 $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS)
176endif
[cc1f8d4]177
178$(DEPEND):
179 makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > $@ 2> /dev/null
180 -[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@
Note: See TracBrowser for help on using the repository browser.