source: rtems/c/src/lib/libbsp/powerpc/virtex/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: 2.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
9if HAS_NETWORKING
10endif
11
12DISTCLEANFILES = include/bspopts.h
13
14noinst_PROGRAMS =
15
16
17EXTRA_DIST += start/start.S
18start.$(OBJEXT): start/start.S
19        $(CPPASCOMPILE) -o $@ -c $<
20project_lib_DATA = start.$(OBJEXT)
21
22EXTRA_DIST += ../../powerpc/shared/start/rtems_crti.S
23rtems_crti.$(OBJEXT): ../../powerpc/shared/start/rtems_crti.S
24        $(CPPASCOMPILE) -o $@ -c $<
25project_lib_DATA += rtems_crti.$(OBJEXT)
26
27# Link commands
28project_lib_DATA += linkcmds
29dist_project_lib_DATA += ../shared/startup/linkcmds.base
30
31noinst_LIBRARIES = libbsp.a
32libbsp_a_SOURCES =
33libbsp_a_LIBADD =
34
35# startup
36libbsp_a_SOURCES += ../../shared/bspclean.c ../../shared/bspgetworkarea.c \
37    ../../shared/bspreset_loop.c \
38    startup/bspstart.c ../../shared/bootcard.c \
39    ../../shared/getentropy-cpucounter.c \
40    ../../shared/bsppredriverhook.c \
41    ../../shared/sbrk.c ../../shared/gnatinstallhandler.c
42libbsp_a_SOURCES += ../shared/src/bsp-start-zero.S
43
44# bspconsole
45libbsp_a_SOURCES += console/consolelite.c ../../shared/console.c \
46    ../../shared/console_select.c ../../shared/console_control.c \
47    ../../shared/console_read.c ../../shared/console_write.c
48
49# irq
50libbsp_a_SOURCES += ../../shared/src/irq-default-handler.c
51libbsp_a_SOURCES += ../../shared/src/irq-generic.c
52libbsp_a_SOURCES += ../../shared/src/irq-info.c
53libbsp_a_SOURCES += ../../shared/src/irq-legacy.c
54libbsp_a_SOURCES += ../../shared/src/irq-server.c
55libbsp_a_SOURCES += ../../shared/src/irq-shell.c
56libbsp_a_SOURCES += irq/irq_init.c
57
58# clock
59libbsp_a_SOURCES += ../shared/clock/clock.c
60
61if HAS_NETWORKING
62network_CPPFLAGS = -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
63network_CPPFLAGS += -D__BSD_VISIBLE
64noinst_PROGRAMS += network.rel
65network_rel_SOURCES = network/xiltemac.c
66network_rel_CPPFLAGS = $(AM_CPPFLAGS)
67network_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
68endif
69
70# timer
71libbsp_a_SOURCES += timer/timer-config.c
72libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/ppc403/timer.rel
73
74libbsp_a_LIBADD += \
75    ../../../libcpu/@RTEMS_CPU@/@exceptions@/rtems-cpu.rel \
76    ../../../libcpu/@RTEMS_CPU@/@exceptions@/exc_bspsupport.rel \
77    ../../../libcpu/@RTEMS_CPU@/shared/cache.rel \
78    ../../../libcpu/@RTEMS_CPU@/shared/cpuIdent.rel
79
80if HAS_NETWORKING
81libbsp_a_LIBADD += network.rel
82endif
83
84include $(top_srcdir)/../../../../automake/local.am
85include $(srcdir)/../../../../../../bsps/powerpc/virtex/headers.am
Note: See TracBrowser for help on using the repository browser.