source: rtems/c/src/lib/libbsp/powerpc/mpc55xxevb/Makefile.am @ 2afb22b

5
Last change on this file since 2afb22b was 2afb22b, checked in by Chris Johns <chrisj@…>, on 12/23/17 at 07:18:56

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: 4.5 KB
Line 
1ACLOCAL_AMFLAGS = -I ../../../../aclocal
2EXTRA_DIST =
3
4include $(top_srcdir)/../../../../automake/compile.am
5include $(top_srcdir)/../../bsp.am
6
7dist_project_lib_DATA = startup/bsp_specs
8
9
10DISTCLEANFILES = include/bspopts.h
11
12noinst_PROGRAMS =
13
14EXTRA_DIST += start/start.S
15start.$(OBJEXT): start/start.S
16        $(CPPASCOMPILE) -o $@ -c $<
17project_lib_DATA = start.$(OBJEXT)
18
19EXTRA_DIST += ../../powerpc/shared/start/rtems_crti.S
20rtems_crti.$(OBJEXT): ../../powerpc/shared/start/rtems_crti.S
21        $(CPPASCOMPILE) -o $@ -c $<
22project_lib_DATA += rtems_crti.$(OBJEXT)
23
24# Link commands
25project_lib_DATA += linkcmds
26dist_project_lib_DATA += ../shared/startup/linkcmds.base
27dist_project_lib_DATA += startup/linkcmds.gwlcfm
28dist_project_lib_DATA += startup/linkcmds.mpc5566evb
29dist_project_lib_DATA += startup/linkcmds.mpc5566evb_spe
30dist_project_lib_DATA += startup/linkcmds.mpc55xx
31dist_project_lib_DATA += startup/linkcmds.mpc5643l_dpu
32dist_project_lib_DATA += startup/linkcmds.mpc5643l_evb
33dist_project_lib_DATA += startup/linkcmds.mpc5668g
34dist_project_lib_DATA += startup/linkcmds.mpc5674f_ecu508
35dist_project_lib_DATA += startup/linkcmds.mpc5674f_ecu508_app
36dist_project_lib_DATA += startup/linkcmds.mpc5674f_ecu508_boot
37dist_project_lib_DATA += startup/linkcmds.mpc5674fevb
38dist_project_lib_DATA += startup/linkcmds.mpc5674fevb_spe
39dist_project_lib_DATA += startup/linkcmds.mpc5674f_rsm6
40dist_project_lib_DATA += startup/linkcmds.mpc5674f_rsm6_base
41dist_project_lib_DATA += startup/linkcmds.phycore_mpc5554
42
43noinst_LIBRARIES = libbsp.a
44libbsp_a_SOURCES =
45
46# startup
47libbsp_a_SOURCES += ../../shared/bootcard.c
48libbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
49libbsp_a_SOURCES += ../../shared/bspclean.c
50libbsp_a_SOURCES += ../../shared/bsppredriverhook.c
51libbsp_a_SOURCES += ../../shared/src/stackalloc.c
52libbsp_a_SOURCES += ../shared/src/bsp-start-zero.S
53libbsp_a_SOURCES += ../shared/src/memcpy.c
54libbsp_a_SOURCES += ../shared/src/tictac.c
55libbsp_a_SOURCES += ../shared/src/ppc-exc-handler-table.c
56libbsp_a_SOURCES += startup/bspstart.c
57libbsp_a_SOURCES += startup/bspgetworkarea.c
58libbsp_a_SOURCES += startup/exc-vector-base.S
59libbsp_a_SOURCES += startup/get-system-clock.c
60libbsp_a_SOURCES += startup/bspreset.c
61libbsp_a_SOURCES += startup/restart.c
62libbsp_a_SOURCES += startup/idle-thread.c
63libbsp_a_SOURCES += startup/start-config-clock.c
64libbsp_a_SOURCES += startup/start-config-ebi.c
65libbsp_a_SOURCES += startup/start-config-ebi-cs.c
66libbsp_a_SOURCES += startup/start-config-ebi-cs-cal.c
67libbsp_a_SOURCES += startup/start-config-mmu.c
68libbsp_a_SOURCES += startup/start-config-mmu-early.c
69libbsp_a_SOURCES += startup/start-config-siu-pcr.c
70libbsp_a_SOURCES += startup/start-prologue.c
71libbsp_a_SOURCES += startup/start-early.c
72libbsp_a_SOURCES += startup/start-cache.S
73libbsp_a_SOURCES += startup/start-clock.c
74libbsp_a_SOURCES += startup/start-flash.S
75libbsp_a_SOURCES += startup/start-watchdog.c
76
77# clock
78libbsp_a_SOURCES += clock/clock-config.c
79
80# console
81libbsp_a_SOURCES += console/console-config.c
82libbsp_a_SOURCES += console/console-esci.c
83libbsp_a_SOURCES += console/console-generic.c
84libbsp_a_SOURCES += console/console-linflex.c
85
86# irq_generic
87libbsp_a_SOURCES += ../../shared/src/irq-default-handler.c
88libbsp_a_SOURCES += ../../shared/src/irq-generic.c
89libbsp_a_SOURCES += ../../shared/src/irq-info.c
90libbsp_a_SOURCES += ../../shared/src/irq-legacy.c
91libbsp_a_SOURCES += ../../shared/src/irq-server.c
92libbsp_a_SOURCES += ../../shared/src/irq-shell.c
93
94# Misc
95libbsp_a_SOURCES += startup/sd-card-init.c
96
97# I2C
98libbsp_a_SOURCES += i2c/i2c_init.c \
99    ../../../libcpu/powerpc/mpc83xx/i2c/mpc83xx_i2cdrv.c
100
101# Network
102if HAS_NETWORKING
103libbsp_a_SOURCES += network/smsc9218i.c
104libbsp_a_SOURCES += network/if_smc.c
105endif
106
107# BSP library
108
109libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/shared/cpuIdent.rel \
110    ../../../libcpu/@RTEMS_CPU@/shared/cache.rel \
111    ../../../libcpu/@RTEMS_CPU@/shared/stack.rel \
112    ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/misc.rel \
113    ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/irq.rel \
114    ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/siu.rel \
115    ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/edma.rel \
116    ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/emios.rel \
117    ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/dspi.rel \
118    ../../../libcpu/@RTEMS_CPU@/@exceptions@/rtems-cpu.rel \
119    ../../../libcpu/@RTEMS_CPU@/@exceptions@/exc_bspsupport.rel \
120    ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/timer.rel
121
122include $(top_srcdir)/../../../../automake/local.am
123include $(srcdir)/../../../../../../bsps/powerpc/mpc55xxevb/headers.am
Note: See TracBrowser for help on using the repository browser.