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

4.104.114.84.95
Last change on this file since 29322a8d was 29322a8d, checked in by Eric Norum <WENorum@…>, on Oct 11, 2004 at 3:00:23 PM

Add libchip driver for Motorola MC146818A time-of-day clock chip.
Modify i386/pc386 BSP to use this driver.

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