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

Last change on this file since d386bce was d386bce, checked in by Joel Sherrill <joel@…>, on Dec 18, 2017 at 7:54:08 PM

pc386: Simplify bsp_specs

If this has any issues, check that the change in linking the
16-bit startup code in Makefile.am generates the same code.
This was odd code and didn't need the RTEMS linkcmds anyway.

Updates #3520.

  • Property mode set to 100644
File size: 7.9 KB
Line 
1##
2##
3
4ACLOCAL_AMFLAGS = -I ../../../../aclocal
5
6# FIXME: We must not include *.cfg
7include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
8
9CLEANFILES =
10
11include $(top_srcdir)/../../../../automake/compile.am
12
13include_bspdir = $(includedir)/bsp
14
15dist_project_lib_DATA = bsp_specs
16
17include_HEADERS = include/bsp.h
18include_HEADERS += include/tm27.h
19
20nodist_include_HEADERS = include/bspopts.h
21nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
22DISTCLEANFILES = include/bspopts.h
23
24noinst_PROGRAMS =
25
26_SUBDIRS = . tools
27
28nodist_include_bsp_HEADERS += include/bspimpl.h
29include_bsp_HEADERS  = ../../i386/shared/irq/irq.h
30include_bsp_HEADERS += ../../i386/shared/irq/irq_asm.h
31include_bsp_HEADERS += ../../i386/shared/comm/tty_drv.h
32include_bsp_HEADERS += ../../i386/shared/realmode_int/realmode_int.h
33include_bsp_HEADERS += ../../shared/include/irq-generic.h
34include_bsp_HEADERS += ../../shared/include/irq-info.h
35include_bsp_HEADERS += console/rtd316.h
36include_bsp_HEADERS += console/exar17d15x.h
37include_bsp_HEADERS += include/tblsizes.h
38
39if HAS_SMP
40include_bsp_HEADERS += ../../i386/shared/irq/apic.h
41include_bsp_HEADERS += ../../i386/shared/smp/smp-imps.h
42endif
43
44include_HEADERS += include/crt.h
45
46noinst_LIBRARIES = libbspstart.a
47libbspstart_a_SOURCES = start/start.S
48project_lib_DATA = start.$(OBJEXT)
49
50EXTRA_DIST = start/start16.S
51start16.$(OBJEXT): start/start16.S
52        $(CPPASCOMPILE) $(AM_CPPFLAGS) -DHEADERADDR=$(HEADERADDR) -o $@ -c $<
53
54start16-elf32.$(OBJEXT): start16.$(OBJEXT)
55        $(LD) -N -Ttext $(START16ADDR) -e start16 -nostdlib \
56          --oformat=elf32-i386 \
57        -o $@ $<
58
59start16.bin: start16-elf32.$(OBJEXT)
60        $(OBJCOPY) -O binary $< $@
61CLEANFILES += start16.bin
62
63project_lib_DATA += start16.bin
64
65dist_project_lib_DATA += startup/linkcmds
66
67noinst_LIBRARIES += libbsp.a
68libbsp_a_SOURCES =
69
70# clock
71libbsp_a_SOURCES += clock/ckinit.c
72libbsp_a_SOURCES += ../../shared/clockdrv_shell.h
73libbsp_a_SOURCES += clock/todcfg.c
74libbsp_a_SOURCES += ../../shared/tod.c
75
76include_rtemsdir = $(includedir)/rtems
77include_rtems_HEADERS  =
78
79if RTEMS_VGA
80include_rtems_HEADERS += console/keyboard.h
81include_rtems_HEADERS += console/kd.h
82include_rtems_HEADERS += console/ps2_drv.h
83include_rtems_HEADERS += console/vgacons.h
84libbsp_a_SOURCES += console/inch.c
85libbsp_a_SOURCES += console/outch.c
86libbsp_a_SOURCES += console/defkeymap.c
87libbsp_a_SOURCES += console/keyboard.c
88libbsp_a_SOURCES += console/pc_keyb.c
89libbsp_a_SOURCES += console/ps2_mouse.c
90libbsp_a_SOURCES += console/vgainit.c
91libbsp_a_SOURCES += console/vt.c
92libbsp_a_SOURCES += console/videoAsm.S
93libbsp_a_SOURCES += console/kbd_parser.c
94libbsp_a_SOURCES += console/vgacons.c
95include_bsp_HEADERS += console/fb_default_mode.h
96if USE_VGA
97libbsp_a_SOURCES += console/fb_vga.c
98endif
99if USE_CIRRUS_GD5446
100libbsp_a_SOURCES += console/fb_cirrus.c
101endif
102if USE_VBE_RM
103include_bsp_HEADERS += include/vbe3.h
104include_HEADERS += include/edid.h
105include_bsp_HEADERS += include/fb_vesa.h
106libbsp_a_SOURCES += console/fb_vesa_rm.c
107endif
108endif
109
110# console (non-graphics support)
111include_HEADERS += ../../i386/shared/comm/i386_io.h
112include_rtems_HEADERS += ../../shared/console_private.h
113libbsp_a_SOURCES += console/serial_mouse_config.c
114libbsp_a_SOURCES += ../../i386/shared/comm/uart.c
115libbsp_a_SOURCES += ../../i386/shared/comm/tty_drv.c
116libbsp_a_SOURCES += ../../i386/shared/realmode_int/realmode_int.c
117libbsp_a_SOURCES += ../../shared/console.c
118libbsp_a_SOURCES += console/console_select.c
119libbsp_a_SOURCES += ../../shared/console_read.c
120libbsp_a_SOURCES += ../../shared/console_write.c
121libbsp_a_SOURCES += console/console_control.c
122libbsp_a_SOURCES += console/conscfg.c
123libbsp_a_SOURCES += console/printk_support.c
124libbsp_a_SOURCES += console/exar17d15x.c
125libbsp_a_SOURCES += console/rtd316.c
126libbsp_a_SOURCES += console/uart_bus_pci.c
127libbsp_a_SOURCES += console/gdb_select.c
128
129# gdb
130libbsp_a_SOURCES += ../../i386/shared/comm/i386-stub.c
131libbsp_a_SOURCES += ../../i386/shared/comm/i386-stub-glue.c
132libbsp_a_SOURCES += ../../i386/shared/comm/gdb_glue.c
133
134# gnat
135libbsp_a_SOURCES += ../../shared/gnatinstallhandler.c
136
137# pci
138libbsp_a_SOURCES += ../../i386/shared/pci/pcibios.c
139libbsp_a_SOURCES += ../../i386/shared/pci/pci_io.c
140libbsp_a_SOURCES += ../../shared/pci/pci_bus_count.c
141libbsp_a_SOURCES += ../../shared/pci/pci_find_device.c
142
143include_HEADERS += ../../i386/shared/comm/uart.h
144# startup
145libbsp_a_SOURCES += ../../shared/bsppredriverhook.c
146libbsp_a_SOURCES += startup/bsp_fatal_halt.c
147libbsp_a_SOURCES += startup/bspgetworkarea.c
148libbsp_a_SOURCES += startup/bspidle.S
149libbsp_a_SOURCES += startup/bspstart.c
150libbsp_a_SOURCES += startup/bspcmdline.c
151libbsp_a_SOURCES += ../../shared/bspclean.c
152libbsp_a_SOURCES += startup/bspreset.c
153libbsp_a_SOURCES += ../../i386/shared/irq/idt.c
154libbsp_a_SOURCES += ../../i386/shared/irq/irq.c
155libbsp_a_SOURCES += ../../i386/shared/irq/irq_init.c
156libbsp_a_SOURCES += ../../i386/shared/irq/elcr.c
157libbsp_a_SOURCES += ../../shared/bootcard.c
158libbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
159libbsp_a_SOURCES += ../../shared/sbrk.c
160libbsp_a_SOURCES += startup/ldsegs.S
161libbsp_a_SOURCES += ../../i386/shared/irq/irq_asm.S
162libbsp_a_SOURCES += ../../shared/src/irq-default-handler.c
163libbsp_a_SOURCES += ../../shared/src/irq-generic.c
164libbsp_a_SOURCES += ../../shared/src/irq-legacy.c
165libbsp_a_SOURCES += ../../shared/src/irq-info.c
166libbsp_a_SOURCES += ../../shared/src/irq-shell.c
167libbsp_a_SOURCES += ../../shared/src/irq-server.c
168
169# timer
170libbsp_a_SOURCES += timer/timer.c timer/timerisr.S
171
172if HAS_IDE
173# ide
174libbsp_a_SOURCES += ide/ide.c
175libbsp_a_SOURCES += ide/idecfg.c
176endif
177
178if HAS_SMP
179libbsp_a_SOURCES += ../../i386/shared/smp/getcpuid.c
180libbsp_a_SOURCES += ../../i386/shared/smp/smp-imps.c
181
182project_lib_DATA += appstart.$(OBJEXT)
183appcpustart.$(OBJEXT): start/start16.S
184        $(CPPASCOMPILE) $(AM_CPPFLAGS) -DSMP_SECONDARY_CORE -o $@ -c $<
185
186appstart.$(OBJEXT): appcpustart.$(OBJEXT)
187        $(LD) -N -T $(top_srcdir)/startup/linkcmds \
188            -Ttext 0x70000 -e app_processor_start -nostdlib \
189            -o appstart_tmp.exe $<
190        $(OBJCOPY) -O binary appstart_tmp.exe appstart.bin
191        $(OBJCOPY) -I binary -O elf32-i386 -B i386 appstart.bin $@
192endif
193
194if HAS_NETWORKING
195ne2000_CPPFLAGS = -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
196noinst_PROGRAMS += ne2000.rel
197ne2000_rel_SOURCES = ne2000/ne2000.c
198ne2000_rel_CPPFLAGS = $(AM_CPPFLAGS) $(ne2000_CPPFLAGS)
199ne2000_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
200ne2000_rel_LDFLAGS += -Wl,--undefined=rtems_ne_driver_attach
201endif
202
203if HAS_NETWORKING
204# This driver needs to be reworked for the BSD stack.
205# We only install wd80x3.h if HAS_NETWORKING was defined
206include_HEADERS += include/wd80x3.h
207
208wd8003_CPPFLAGS = -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
209noinst_PROGRAMS += wd8003.rel
210wd8003_rel_SOURCES = wd8003/wd8003.c
211wd8003_rel_SOURCES += include/wd80x3.h
212wd8003_rel_CPPFLAGS = $(AM_CPPFLAGS) $(wd8003_CPPFLAGS)
213wd8003_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
214wd8003_rel_LDFLAGS += -Wl,--undefined=rtems_wd_driver_attach
215endif
216
217if HAS_NETWORKING
2183c509_CPPFLAGS = -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
219noinst_PROGRAMS += 3c509.rel
2203c509_rel_SOURCES = 3c509/3c509.c
2213c509_rel_SOURCES += 3c509/3c509.h
2223c509_rel_SOURCES += 3c509/elink.c
2233c509_rel_SOURCES += 3c509/elink.h
2243c509_rel_CPPFLAGS = $(AM_CPPFLAGS) $(3c509_CPPFLAGS)
2253c509_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
2263c509_rel_LDFLAGS += -Wl,--undefined=rtems_3c509_driver_attach
2273c509_rel_LDFLAGS += -Wl,--undefined=ep_board
228endif
229
230libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/cache.rel
231libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/page.rel
232libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/score.rel
233
234if HAS_SMP
235libbsp_a_LIBADD += appstart.$(OBJEXT)
236endif
237
238# We only build the Network library if HAS_NETWORKING was defined
239# dec21140 is supported via libchip
240if HAS_NETWORKING
241libbsp_a_LIBADD += ne2000.rel
242libbsp_a_LIBADD += wd8003.rel
243libbsp_a_LIBADD += 3c509.rel
244endif
245
246EXTRA_DIST += HOWTO
247EXTRA_DIST += README.dec21140
248EXTRA_DIST += STATUS
249EXTRA_DIST += times_i486dx
250EXTRA_DIST += times_p5
251
252include $(srcdir)/preinstall.am
253include $(top_srcdir)/../../../../automake/local.am
254include $(top_srcdir)/../../../../automake/subdirs.am
Note: See TracBrowser for help on using the repository browser.