source: rtems/c/src/lib/libbsp/lm32/milkymist/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.8 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
14EXTRA_DIST += ../../lm32/shared/start/start.S
15start.$(OBJEXT): ../../lm32/shared/start/start.S
16        $(CPPASCOMPILE) -o $@ -c $<
17project_lib_DATA = start.$(OBJEXT)
18
19project_lib_DATA += linkcmds
20
21noinst_LIBRARIES = libbsp.a
22libbsp_a_SOURCES =
23libbsp_a_LIBADD =
24
25# startup
26libbsp_a_SOURCES += startup/bspclean.c
27libbsp_a_SOURCES += ../shared/startup/bspstart.c
28libbsp_a_SOURCES += ../../shared/bspgetworkarea.c
29libbsp_a_SOURCES += ../../shared/bspreset.c
30libbsp_a_SOURCES += ../../shared/bootcard.c
31libbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
32libbsp_a_SOURCES += ../../shared/sbrk.c
33libbsp_a_SOURCES += ../../shared/gnatinstallhandler.c
34
35# irq
36libbsp_a_SOURCES += ../../lm32/shared/irq/irq.c
37
38# clock
39libbsp_a_SOURCES += ../../lm32/shared/milkymist_clock/ckinit.c
40
41# console
42libbsp_a_SOURCES += ../../lm32/shared/milkymist_console/console.c
43libbsp_a_SOURCES += ../../lm32/shared/milkymist_console/uart.c
44
45# timer
46libbsp_a_SOURCES += ../../lm32/shared/milkymist_timer/timer.c
47
48# framebuffer
49libbsp_a_SOURCES += ../../lm32/shared/milkymist_framebuffer/framebuffer.c
50
51# GPIO
52libbsp_a_SOURCES += ../../lm32/shared/milkymist_gpio/gpio.c
53
54# buttons
55libbsp_a_SOURCES += ../../lm32/shared/milkymist_buttons/buttons.c
56
57# ac97
58libbsp_a_SOURCES += ../../lm32/shared/milkymist_ac97/ac97.c
59
60# usbinput
61libbsp_a_SOURCES += ../../lm32/shared/milkymist_usbinput/usbinput.c
62
63# PFPU
64libbsp_a_SOURCES += ../../lm32/shared/milkymist_pfpu/pfpu.c
65
66# TMU
67libbsp_a_SOURCES += ../../lm32/shared/milkymist_tmu/tmu.c
68
69# memory card
70libbsp_a_SOURCES += ../../lm32/shared/milkymist_memcard/memcard.c
71
72# flash
73libbsp_a_SOURCES += ../../lm32/shared/milkymist_flash/flash.c
74
75# DMX
76libbsp_a_SOURCES += ../../lm32/shared/milkymist_dmx/dmx.c
77
78# MIDI
79libbsp_a_SOURCES += ../../lm32/shared/milkymist_midi/midi.c
80
81# IR
82libbsp_a_SOURCES += ../../lm32/shared/milkymist_ir/ir.c
83
84# video input
85libbsp_a_SOURCES += ../../lm32/shared/milkymist_video/video.c
86
87# versions
88libbsp_a_SOURCES += ../../lm32/shared/milkymist_versions/versions.c
89
90# Cache
91libbsp_a_SOURCES += ../../../libcpu/shared/src/cache_manager.c
92libbsp_a_SOURCES += ../../shared/include/cache_.h
93libbsp_a_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/../../shared/include
94
95if HAS_NETWORKING
96noinst_PROGRAMS += network.rel
97network_rel_SOURCES = ../../lm32/shared/milkymist_networking/network.c
98network_rel_CPPFLAGS = $(AM_CPPFLAGS) -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
99network_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
100libbsp_a_LIBADD += network.rel
101endif
102
103include $(top_srcdir)/../../../../automake/local.am
104include $(srcdir)/../../../../../../bsps/lm32/milkymist/headers.am
Note: See TracBrowser for help on using the repository browser.