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

Last change on this file since 2afb22b was 2afb22b, checked in by Chris Johns <chrisj@…>, on Dec 23, 2017 at 7:18:56 AM

Remove make preinstall

A speciality of the RTEMS build system was the make preinstall step. It
copied header files from arbitrary locations into the build tree. The
header files were included via the -Bsome/build/tree/path GCC command
line option.

This has at least seven problems:

  • The make preinstall step itself needs time and disk space.
  • Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error.
  • There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult.
  • The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit.
  • An introduction of a new build system is difficult.
  • Include paths specified by the -B option are system headers. This may suppress warnings.
  • The parallel build had sporadic failures on some hosts.

This patch removes the make preinstall step. All installed header
files are moved to dedicated include directories in the source tree.
Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc,
etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g.
erc32, imx, qoriq, etc.

The new cpukit include directories are:

  • cpukit/include
  • cpukit/score/cpu/@RTEMS_CPU@/include
  • cpukit/libnetworking

The new BSP include directories are:

  • bsps/include
  • bsps/@RTEMS_CPU@/include
  • bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include

There are build tree include directories for generated files.

The include directory order favours the most general header file, e.g.
it is not possible to override general header files via the include path
order.

The "bootstrap -p" option was removed. The new "bootstrap -H" option
should be used to regenerate the "headers.am" files.

Update #3254.

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