source: rtems/c/src/lib/libbsp/i386/pc386/Makefile.am @ c24d7c84

4.104.114.84.9
Last change on this file since c24d7c84 was c24d7c84, checked in by Ralf Corsepius <ralf.corsepius@…>, on Feb 12, 2004 at 9:08:05 AM

2004-02-12 Ralf Corsepius <corsepiu@…>

  • Makefile.am: Use CPPASCOMPILE instead of CCASCOMPILE.
  • Property mode set to 100644
File size: 12.2 KB
Line 
1##
2## $Id$
3##
4
5ACLOCAL_AMFLAGS = -I ../../../../aclocal
6
7# FIXME: We must not include *.cfg
8include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
9
10include $(top_srcdir)/../../../../automake/compile.am
11include $(top_srcdir)/../../bsp.am
12
13EXTRA_PROGRAMS =
14CLEANFILES =
15noinst_DATA =
16
17SUBDIRS = . tools
18
19include_HEADERS += include/crt.h
20nodist_include_HEADERS += ../../shared/include/coverhd.h
21
22EXTRA_DIST = start/start.S
23start$(LIB_VARIANT).$(OBJEXT): start/start.S
24        $(CPPASCOMPILE) -DASM -o $@ -c $<
25
26project_lib_DATA = start$(LIB_VARIANT).$(OBJEXT)
27
28EXTRA_DIST += start/start16.S
29start16.$(OBJEXT): start/start16.S
30        $(COMPILE.S) $(AM_CPPFLAGS) -DHEADERADDR=$(HEADERADDR) -o $@ $<
31
32start16$(LIB_VARIANT)-elf32.$(OBJEXT): start16.$(OBJEXT)
33        $(LD) -N -T $(top_srcdir)/startup/linkcmds -Ttext $(START16ADDR) -e start16 -nostdlib \
34          --oformat=elf32-i386 \
35        -o $@ $<
36
37start16$(LIB_VARIANT).bin: start16$(LIB_VARIANT)-elf32.$(OBJEXT)
38        $(OBJCOPY) -O binary $< $@
39CLEANFILES += start16.bin start16_g.bin
40
41project_lib_DATA += start16$(LIB_VARIANT).bin
42
43dist_project_lib_DATA += startup/linkcmds
44
45EXTRA_PROGRAMS += clock.rel
46CLEANFILES += clock.rel
47clock_rel_SOURCES = clock/ckinit.c clock/rtc.c
48clock_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_OPTIMIZE_V)
49clock_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
50
51EXTRA_PROGRAMS += clock_g.rel
52CLEANFILES += clock_g.rel
53clock_g_rel_SOURCES = $(clock_rel_SOURCES)
54clock_g_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_DEBUG_V)
55clock_g_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
56
57project_lib_DATA += clock$(LIB_VARIANT).rel
58
59include_rtemsdir = $(includedir)/rtems
60include_rtems_HEADERS = console/keyboard.h console/kd.h \
61    console/serial_mouse.h console/ps2_drv.h console/fb_vga.h
62
63EXTRA_PROGRAMS += console.rel
64CLEANFILES += console.rel
65console_rel_SOURCES = console/console.c console/inch.c console/outch.c \
66    console/defkeymap.c console/fb_vga.c console/keyboard.c \
67    console/mouse_parser.c console/pc_keyb.c console/ps2_mouse.c \
68    console/serial_mouse.c console/vgainit.c console/vt.c \
69    console/videoAsm.S ../../i386/shared/comm/uart.c \
70    ../../i386/shared/comm/tty_drv.c
71console_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_OPTIMIZE_V)
72console_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
73
74EXTRA_PROGRAMS += console_g.rel
75CLEANFILES += console_g.rel
76console_g_rel_SOURCES = $(console_rel_SOURCES)
77console_g_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_DEBUG_V)
78console_g_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
79
80project_lib_DATA += console$(LIB_VARIANT).rel
81
82EXTRA_PROGRAMS += gdb.rel
83CLEANFILES += gdb.rel
84gdb_rel_SOURCES = ../../i386/shared/comm/i386-stub.c \
85    ../../i386/shared/comm/i386-stub-glue.c ../../i386/shared/comm/gdb_glue.c
86gdb_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_OPTIMIZE_V)
87gdb_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
88
89EXTRA_PROGRAMS += gdb_g.rel
90CLEANFILES += gdb_g.rel
91gdb_g_rel_SOURCES = $(gdb_rel_SOURCES)
92gdb_g_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_DEBUG_V)
93gdb_g_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
94
95project_lib_DATA += gdb$(LIB_VARIANT).rel
96
97EXTRA_PROGRAMS += gnat.rel
98CLEANFILES += gnat.rel
99gnat_rel_SOURCES = ../../shared/gnatinstallhandler.c
100gnat_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_OPTIMIZE_V)
101gnat_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
102
103EXTRA_PROGRAMS += gnat_g.rel
104CLEANFILES += gnat_g.rel
105gnat_g_rel_SOURCES = $(gnat_rel_SOURCES)
106gnat_g_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_DEBUG_V)
107gnat_g_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
108
109project_lib_DATA += gnat$(LIB_VARIANT).rel
110
111EXTRA_PROGRAMS += pci.rel
112CLEANFILES += pci.rel
113pci_rel_SOURCES = ../../i386/shared/pci/pcibios.c
114pci_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_OPTIMIZE_V)
115pci_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
116
117EXTRA_PROGRAMS += pci_g.rel
118CLEANFILES += pci_g.rel
119pci_g_rel_SOURCES = $(pci_rel_SOURCES)
120pci_g_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_DEBUG_V)
121pci_g_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
122
123project_lib_DATA += pci$(LIB_VARIANT).rel
124
125EXTRA_PROGRAMS += startup.rel
126CLEANFILES += startup.rel
127startup_rel_SOURCES = ../../shared/bsplibc.c ../../shared/bsppost.c \
128    startup/bspstart.c startup/exit.c ../../i386/shared/irq/idt.c \
129    ../../i386/shared/irq/irq.c ../../i386/shared/irq/irq_init.c \
130    ../../shared/bootcard.c ../../shared/main.c ../../shared/sbrk.c \
131    startup/ldsegs.S ../../i386/shared/irq/irq_asm.S
132startup_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_OPTIMIZE_V)
133startup_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
134
135EXTRA_PROGRAMS += startup_g.rel
136CLEANFILES += startup_g.rel
137startup_g_rel_SOURCES = $(startup_rel_SOURCES)
138startup_g_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_DEBUG_V)
139startup_g_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
140
141project_lib_DATA += startup$(LIB_VARIANT).rel
142
143EXTRA_PROGRAMS += timer.rel
144CLEANFILES += timer.rel
145timer_rel_SOURCES = timer/timer.c timer/timerisr.S
146timer_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_OPTIMIZE_V)
147timer_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
148
149EXTRA_PROGRAMS += timer_g.rel
150CLEANFILES += timer_g.rel
151timer_g_rel_SOURCES = $(timer_rel_SOURCES)
152timer_g_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_DEBUG_V)
153timer_g_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
154
155project_lib_DATA += timer$(LIB_VARIANT).rel
156
157if HAS_NETWORKING
158ne2000_CPPFLAGS = -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
159EXTRA_PROGRAMS += ne2000.rel
160CLEANFILES += ne2000.rel
161ne2000_rel_SOURCES = ne2000/ne2000.c
162ne2000_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_OPTIMIZE_V) \
163    $(ne2000_CPPFLAGS)
164ne2000_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
165
166EXTRA_PROGRAMS += ne2000_g.rel
167CLEANFILES += ne2000_g.rel
168ne2000_g_rel_SOURCES = $(ne2000_rel_SOURCES)
169ne2000_g_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_DEBUG_V) $(ne2000_CPPFLAGS)
170ne2000_g_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
171
172noinst_DATA += ne2000$(LIB_VARIANT).rel
173endif
174
175if HAS_NETWORKING
176# This driver needs to be reworked for the BSD stack.
177# We only install wd80x3.h if HAS_NETWORKING was defined
178include_HEADERS += include/wd80x3.h
179
180wd8003_CPPFLAGS = -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
181EXTRA_PROGRAMS += wd8003.rel
182CLEANFILES += wd8003.rel
183wd8003_rel_SOURCES = wd8003/wd8003.c include/wd80x3.h
184wd8003_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_OPTIMIZE_V) \
185    $(wd8003_CPPFLAGS)
186wd8003_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
187
188EXTRA_PROGRAMS += wd8003_g.rel
189CLEANFILES += wd8003_g.rel
190wd8003_g_rel_SOURCES = $(wd8003_rel_SOURCES)
191wd8003_g_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_DEBUG_V) $(wd8003_CPPFLAGS)
192wd8003_g_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
193
194noinst_DATA += wd8003$(LIB_VARIANT).rel
195endif
196
197if HAS_NETWORKING
1983c509_CPPFLAGS = -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
199EXTRA_PROGRAMS += 3c509.rel
200CLEANFILES += 3c509.rel
2013c509_rel_SOURCES = 3c509/3c509.c 3c509/3c509.h 3c509/elink.c 3c509/elink.h
2023c509_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_OPTIMIZE_V) $(3c509_CPPFLAGS)
2033c509_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
204
205EXTRA_PROGRAMS += 3c509_g.rel
206CLEANFILES += 3c509_g.rel
2073c509_g_rel_SOURCES = $(3c509_rel_SOURCES)
2083c509_g_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_DEBUG_V) $(3c509_CPPFLAGS)
2093c509_g_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
210
211noinst_DATA += 3c509$(LIB_VARIANT).rel
212endif
213
214EXTRA_PROGRAMS += ide.rel
215CLEANFILES += ide.rel
216ide_rel_SOURCES = ide/idecfg.c ide/ide.c
217ide_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_OPTIMIZE_V)
218ide_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
219
220EXTRA_PROGRAMS += ide_g.rel
221CLEANFILES += ide_g.rel
222ide_g_rel_SOURCES = $(ide_rel_SOURCES)
223ide_g_rel_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_DEBUG_V)
224ide_g_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
225
226project_lib_DATA += ide$(LIB_VARIANT).rel
227
228EXTRA_LIBRARIES = libbsp.a
229CLEANFILES += libbsp.a
230libbsp_a_SOURCES =
231libbsp_a_LIBADD = startup$(LIB_VARIANT).rel clock$(LIB_VARIANT).rel \
232    console$(LIB_VARIANT).rel timer$(LIB_VARIANT).rel ide$(LIB_VARIANT).rel \
233    gdb$(LIB_VARIANT).rel gnat$(LIB_VARIANT).rel pci$(LIB_VARIANT).rel
234# We only build the Network library if HAS_NETWORKING was defined
235# dec21140 is supported via libchip
236if HAS_NETWORKING
237libbsp_a_LIBADD += ne2000$(LIB_VARIANT).rel wd8003$(LIB_VARIANT).rel \
238    3c509$(LIB_VARIANT).rel
239endif
240libbsp_a_LIBADD += ../../../libcpu/i386/cache$(LIB_VARIANT).rel \
241    ../../../libcpu/i386/page$(LIB_VARIANT).rel \
242    ../../../libcpu/i386/score$(LIB_VARIANT).rel
243
244EXTRA_LIBRARIES += libbsp_g.a
245CLEANFILES += libbsp_g.a
246libbsp_g_a_SOURCES = $(libbsp_a_SOURCES)
247libbsp_g_a_LIBADD = $(libbsp_a_LIBADD)
248
249noinst_DATA += libbsp$(LIB_VARIANT).a
250
251all-local: $(PREINSTALL_FILES) $(TMPINSTALL_FILES)
252
253EXTRA_DIST += HOWTO README.dec21140 STATUS times_i486dx times_p5
254
255PREINSTALL_DIRS =
256TMPINSTALL_FILES =
257
258$(PROJECT_INCLUDE)/crt.h: include/crt.h $(PROJECT_INCLUDE)/$(dirstamp)
259        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/crt.h
260PREINSTALL_FILES += $(PROJECT_INCLUDE)/crt.h
261
262$(PROJECT_INCLUDE)/coverhd.h: ../../shared/include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
263        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
264PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h
265
266$(PROJECT_LIB)/start$(LIB_VARIANT).$(OBJEXT): start$(LIB_VARIANT).$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
267        $(INSTALL_DATA) $< $(PROJECT_LIB)/start$(LIB_VARIANT).$(OBJEXT)
268TMPINSTALL_FILES += $(PROJECT_LIB)/start$(LIB_VARIANT).$(OBJEXT)
269
270$(PROJECT_LIB)/start16$(LIB_VARIANT).bin: start16$(LIB_VARIANT).bin $(PROJECT_LIB)/$(dirstamp)
271        $(INSTALL_DATA) $< $(PROJECT_LIB)/start16$(LIB_VARIANT).bin
272TMPINSTALL_FILES += $(PROJECT_LIB)/start16$(LIB_VARIANT).bin
273
274$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
275        $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
276TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds
277
278$(PROJECT_LIB)/clock$(LIB_VARIANT).rel: clock$(LIB_VARIANT).rel $(PROJECT_LIB)/$(dirstamp)
279        $(INSTALL_DATA) $< $(PROJECT_LIB)/clock$(LIB_VARIANT).rel
280TMPINSTALL_FILES += $(PROJECT_LIB)/clock$(LIB_VARIANT).rel
281
282$(PROJECT_INCLUDE)/rtems/$(dirstamp):
283        @$(mkdir_p) $(PROJECT_INCLUDE)/rtems
284        @: > $(PROJECT_INCLUDE)/rtems/$(dirstamp)
285PREINSTALL_DIRS += $(PROJECT_INCLUDE)/rtems/$(dirstamp)
286
287$(PROJECT_INCLUDE)/rtems/keyboard.h: console/keyboard.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
288        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/keyboard.h
289PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/keyboard.h
290
291$(PROJECT_INCLUDE)/rtems/kd.h: console/kd.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
292        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/kd.h
293PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/kd.h
294
295$(PROJECT_INCLUDE)/rtems/serial_mouse.h: console/serial_mouse.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
296        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/serial_mouse.h
297PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/serial_mouse.h
298
299$(PROJECT_INCLUDE)/rtems/ps2_drv.h: console/ps2_drv.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
300        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/ps2_drv.h
301PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/ps2_drv.h
302
303$(PROJECT_INCLUDE)/rtems/fb_vga.h: console/fb_vga.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
304        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/fb_vga.h
305PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/fb_vga.h
306
307$(PROJECT_LIB)/console$(LIB_VARIANT).rel: console$(LIB_VARIANT).rel $(PROJECT_LIB)/$(dirstamp)
308        $(INSTALL_DATA) $< $(PROJECT_LIB)/console$(LIB_VARIANT).rel
309TMPINSTALL_FILES += $(PROJECT_LIB)/console$(LIB_VARIANT).rel
310
311$(PROJECT_LIB)/gdb$(LIB_VARIANT).rel: gdb$(LIB_VARIANT).rel $(PROJECT_LIB)/$(dirstamp)
312        $(INSTALL_DATA) $< $(PROJECT_LIB)/gdb$(LIB_VARIANT).rel
313TMPINSTALL_FILES += $(PROJECT_LIB)/gdb$(LIB_VARIANT).rel
314
315$(PROJECT_LIB)/gnat$(LIB_VARIANT).rel: gnat$(LIB_VARIANT).rel $(PROJECT_LIB)/$(dirstamp)
316        $(INSTALL_DATA) $< $(PROJECT_LIB)/gnat$(LIB_VARIANT).rel
317TMPINSTALL_FILES += $(PROJECT_LIB)/gnat$(LIB_VARIANT).rel
318
319$(PROJECT_LIB)/pci$(LIB_VARIANT).rel: pci$(LIB_VARIANT).rel $(PROJECT_LIB)/$(dirstamp)
320        $(INSTALL_DATA) $< $(PROJECT_LIB)/pci$(LIB_VARIANT).rel
321TMPINSTALL_FILES += $(PROJECT_LIB)/pci$(LIB_VARIANT).rel
322
323$(PROJECT_LIB)/startup$(LIB_VARIANT).rel: startup$(LIB_VARIANT).rel $(PROJECT_LIB)/$(dirstamp)
324        $(INSTALL_DATA) $< $(PROJECT_LIB)/startup$(LIB_VARIANT).rel
325TMPINSTALL_FILES += $(PROJECT_LIB)/startup$(LIB_VARIANT).rel
326
327$(PROJECT_LIB)/timer$(LIB_VARIANT).rel: timer$(LIB_VARIANT).rel $(PROJECT_LIB)/$(dirstamp)
328        $(INSTALL_DATA) $< $(PROJECT_LIB)/timer$(LIB_VARIANT).rel
329TMPINSTALL_FILES += $(PROJECT_LIB)/timer$(LIB_VARIANT).rel
330
331if HAS_NETWORKING
332$(PROJECT_INCLUDE)/wd80x3.h: include/wd80x3.h $(PROJECT_INCLUDE)/$(dirstamp)
333        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/wd80x3.h
334PREINSTALL_FILES += $(PROJECT_INCLUDE)/wd80x3.h
335endif
336
337$(PROJECT_LIB)/ide$(LIB_VARIANT).rel: ide$(LIB_VARIANT).rel $(PROJECT_LIB)/$(dirstamp)
338        $(INSTALL_DATA) $< $(PROJECT_LIB)/ide$(LIB_VARIANT).rel
339TMPINSTALL_FILES += $(PROJECT_LIB)/ide$(LIB_VARIANT).rel
340
341CLEANFILES += $(PREINSTALL_FILES)
342DISTCLEANFILES = $(PREINSTALL_DIRS)
343CLEANFILES += $(TMPINSTALL_FILES)
344
345include $(top_srcdir)/../../../../automake/local.am
Note: See TracBrowser for help on using the repository browser.