source: rtems/c/src/lib/libbsp/powerpc/mvme3100/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: 3.7 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
9DISTCLEANFILES = include/bspopts.h
10
11noinst_PROGRAMS =
12
13
14project_lib_DATA =
15
16EXTRA_DIST += start/start.S
17start.$(OBJEXT): start/start.S
18        $(CPPASCOMPILE) -o $@ -c $<
19
20EXTRA_DIST += ../shared/start/preload.S
21preload.$(OBJEXT): ../shared/start/preload.S
22        $(CPPASCOMPILE) -DASM -o $@ -c $<
23
24EXTRA_DIST += ../shared/start/vectors_entry.S
25vectors_entry.$(OBJEXT): ../shared/start/vectors_entry.S
26        $(CPPASCOMPILE) -o $@ -c $<
27
28motld_start.$(OBJEXT):  preload.$(OBJEXT) vectors_entry.$(OBJEXT) \
29    start.$(OBJEXT)
30        $(LD) -o $@ -r $^
31
32project_lib_DATA += motld_start.$(OBJEXT)
33
34EXTRA_DIST += ../shared/start/rtems_crti.S
35rtems_crti.$(OBJEXT): ../../powerpc/shared/start/rtems_crti.S
36        $(CPPASCOMPILE) -o $@ -c $<
37project_lib_DATA += rtems_crti.$(OBJEXT)
38
39project_lib_DATA += linkcmds
40dist_project_lib_DATA += ../shared/startup/linkcmds.share
41
42noinst_LIBRARIES = libbsp.a
43libbsp_a_SOURCES =
44
45# startup
46libbsp_a_SOURCES += startup/bspstart.c \
47    startup/misc.c ../../powerpc/shared/startup/bspgetworkarea.c \
48    ../../powerpc/shared/startup/bsppredriverhook.c \
49    ../../powerpc/shared/startup/zerobss.c \
50    ../../powerpc/shared/startup/sbrk.c ../../shared/bootcard.c \
51    ../../shared/getentropy-cpucounter.c \
52    ../../shared/bspclean.c \
53    ../../shared/gnatinstallhandler.c
54libbsp_a_SOURCES += ../../shared/bspreset.c
55# tod
56libbsp_a_SOURCES += ../../shared/tod.c tod/todcfg.c
57# pclock
58libbsp_a_SOURCES += ../../powerpc/shared/clock/p_clock.c
59
60# console
61libbsp_a_SOURCES += ../../powerpc/shared/console/uart.c \
62    ../../powerpc/shared/console/console.c \
63    ../../powerpc/shared/console/consoleIo.h \
64    ../../powerpc/shared/console/uart.h
65
66# irq
67libbsp_a_SOURCES += irq/irq_init.c \
68    ../../powerpc/shared/irq/openpic_i8259_irq.c
69
70# openpic
71libbsp_a_SOURCES += ../../powerpc/shared/openpic/openpic.h \
72    ../../powerpc/shared/openpic/openpic.c \
73    ../../powerpc/shared/openpic/openpic.h
74
75# pci
76libbsp_a_SOURCES += ../../powerpc/shared/pci/pci.c \
77    pci/detect_host_bridge.c \
78    ../../powerpc/shared/pci/generic_clear_hberrs.c \
79    ../../powerpc/shared/pci/pcifinddevice.c ../../powerpc/shared/pci/pci.h
80
81# vme
82libbsp_a_SOURCES += ../../shared/vmeUniverse/vmeTsi148.c \
83    ../../shared/vmeUniverse/bspVmeDmaList.c \
84    ../../shared/vmeUniverse/vmeTsi148.h \
85    ../../shared/vmeUniverse/vme_am_defs.h \
86    ../../shared/vmeUniverse/VME.h \
87    ../../powerpc/shared/vme/vmeconfig.c \
88    ../../powerpc/shared/vme/vme_universe.c
89
90# flash
91libbsp_a_SOURCES += ../shared/flash/flash.c \
92    ../shared/flash/spansionFlash.c \
93    flash/flashcfg.c
94
95# i2c
96libbsp_a_SOURCES += i2c/mpc8540_i2c.c i2c/i2c_init.c
97
98# vpd
99libbsp_a_SOURCES += ../shared/motorola/vpd.c
100
101if HAS_NETWORKING
102noinst_PROGRAMS += network.rel
103network_rel_SOURCES = network/tsec.c
104network_rel_CPPFLAGS = $(AM_CPPFLAGS)
105network_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
106endif
107
108libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/shared/cpuIdent.rel \
109    ../../../libcpu/@RTEMS_CPU@/shared/cache.rel \
110    ../../../libcpu/@RTEMS_CPU@/shared/stack.rel \
111    ../../../libcpu/@RTEMS_CPU@/e500/clock.rel \
112    ../../../libcpu/@RTEMS_CPU@/e500/timer.rel \
113    ../../../libcpu/@RTEMS_CPU@/e500/mmu.rel \
114    ../../../libcpu/@RTEMS_CPU@/@exceptions@/rtems-cpu.rel \
115    ../../../libcpu/@RTEMS_CPU@/@exceptions@/exc_bspsupport.rel \
116    ../../../libcpu/@RTEMS_CPU@/@exceptions@/irq_bspsupport.rel
117
118if HAS_NETWORKING
119libbsp_a_LIBADD += network.rel
120endif
121
122EXTRA_DIST += LICENSE README KNOWN_PROBLEMS
123
124include $(top_srcdir)/../../../../automake/local.am
125include $(srcdir)/../../../../../../bsps/powerpc/mvme3100/headers.am
Note: See TracBrowser for help on using the repository browser.