source: rtems/c/src/lib/libbsp/arm/lpc24xx/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: 5.3 KB
Line 
1##
2#
3# @file
4#
5# @brief Makefile of LibBSP for the LPC24XX boards.
6#
7
8ACLOCAL_AMFLAGS = -I ../../../../aclocal
9EXTRA_DIST =
10
11include $(top_srcdir)/../../../../automake/compile.am
12include $(top_srcdir)/../../bsp.am
13
14dist_project_lib_DATA = startup/bsp_specs
15
16###############################################################################
17#                  Header                                                     #
18###############################################################################
19
20###############################################################################
21#                  Data                                                       #
22###############################################################################
23
24EXTRA_DIST += ../shared/start/start.S
25start.$(OBJEXT): ../shared/start/start.S
26        $(CPPASCOMPILE) -o $@ -c $<
27project_lib_DATA = start.$(OBJEXT)
28
29project_lib_DATA += linkcmds
30dist_project_lib_DATA += startup/linkcmds.lpc17xx_ea_ram
31dist_project_lib_DATA += startup/linkcmds.lpc17xx_ea_rom_int
32dist_project_lib_DATA += startup/linkcmds.lpc17xx_plx800_ram
33dist_project_lib_DATA += startup/linkcmds.lpc17xx_plx800_rom_int
34dist_project_lib_DATA += startup/linkcmds.lpc2362
35dist_project_lib_DATA += startup/linkcmds.lpc23xx_tli800
36dist_project_lib_DATA += startup/linkcmds.lpc24xx_ea
37dist_project_lib_DATA += startup/linkcmds.lpc24xx_ncs_ram
38dist_project_lib_DATA += startup/linkcmds.lpc24xx_ncs_rom_ext
39dist_project_lib_DATA += startup/linkcmds.lpc24xx_ncs_rom_int
40dist_project_lib_DATA += startup/linkcmds.lpc24xx_plx800_ram
41dist_project_lib_DATA += startup/linkcmds.lpc24xx_plx800_rom_int
42dist_project_lib_DATA += startup/linkcmds.lpc40xx_ea_ram
43dist_project_lib_DATA += startup/linkcmds.lpc40xx_ea_rom_int
44
45###############################################################################
46#                  LibBSP                                                     #
47###############################################################################
48
49noinst_LIBRARIES = libbsp.a
50
51libbsp_a_SOURCES =
52libbsp_a_CPPFLAGS = $(AM_CPPFLAGS)
53libbsp_a_LIBADD =
54
55# Shared
56libbsp_a_SOURCES += ../../shared/bootcard.c \
57        ../../shared/getentropy-cpucounter.c \
58        ../../shared/bspclean.c \
59        ../../shared/bspgetworkarea.c \
60        ../../shared/bsppredriverhook.c \
61        ../../shared/gnatinstallhandler.c \
62        ../../shared/sbrk.c \
63        ../../shared/src/stackalloc.c \
64        ../../shared/src/uart-output-char.c
65libbsp_a_SOURCES += ../../shared/cpucounterdiff.c
66
67# Startup
68libbsp_a_SOURCES += ../shared/startup/bsp-start-memcpy.S
69libbsp_a_SOURCES += ../shared/armv7m/startup/bspreset.c
70libbsp_a_SOURCES += startup/bspreset-armv4.c
71libbsp_a_SOURCES += startup/bspstart.c
72
73# IRQ
74libbsp_a_SOURCES += ../../shared/src/irq-default-handler.c
75libbsp_a_SOURCES += ../../shared/src/irq-generic.c
76libbsp_a_SOURCES += ../../shared/src/irq-info.c
77libbsp_a_SOURCES += ../../shared/src/irq-legacy.c
78libbsp_a_SOURCES += ../../shared/src/irq-server.c
79libbsp_a_SOURCES += ../../shared/src/irq-shell.c
80libbsp_a_SOURCES += ../shared/armv7m/irq/armv7m-irq.c
81libbsp_a_SOURCES += ../shared/armv7m/irq/armv7m-irq-dispatch.c
82libbsp_a_SOURCES += irq/irq.c
83libbsp_a_SOURCES += irq/irq-dispatch.c
84
85# Console
86libbsp_a_SOURCES += ../../shared/console-termios-init.c
87libbsp_a_SOURCES += ../../shared/console-termios.c
88libbsp_a_SOURCES += console/console-config.c
89libbsp_a_SOURCES += console/uart-probe-1.c
90libbsp_a_SOURCES += console/uart-probe-2.c
91libbsp_a_SOURCES += console/uart-probe-3.c
92
93# Clock
94libbsp_a_SOURCES += ../../shared/clockdrv_shell.h
95libbsp_a_SOURCES += ../shared/lpc/clock/lpc-clock-config.c
96libbsp_a_SOURCES += ../shared/armv7m/clock/armv7m-clock-config.c
97
98# RTC
99libbsp_a_SOURCES += ../../shared/tod.c \
100        rtc/rtc-config.c
101
102# Misc
103libbsp_a_SOURCES += misc/system-clocks.c \
104        misc/dma.c \
105        misc/dma-copy.c \
106        misc/bspidle.c \
107        misc/io.c \
108        misc/lcd.c \
109        misc/restart.c \
110        misc/timer.c
111
112# SSP
113libbsp_a_SOURCES += ssp/ssp.c
114
115# I2C
116libbsp_a_SOURCES += i2c/i2c.c \
117        i2c/i2c-config.c
118
119# Framebuffer
120libbsp_a_SOURCES += ../shared/arm-pl111-fb.c
121libbsp_a_SOURCES += startup/fb-config.c
122
123# Cache
124libbsp_a_SOURCES += ../../../libcpu/shared/src/cache_manager.c
125libbsp_a_SOURCES += ../../../libcpu/arm/shared/include/cache_.h
126libbsp_a_CPPFLAGS += -I$(srcdir)/../../../libcpu/arm/shared/include
127
128# Start hooks
129libbsp_a_SOURCES += startup/bspstarthooks.c
130libbsp_a_SOURCES += startup/start-config-emc-dynamic.c
131libbsp_a_SOURCES += startup/start-config-emc-static.c
132libbsp_a_SOURCES += startup/start-config-mpu.c
133libbsp_a_SOURCES += startup/start-config-pinsel.c
134
135###############################################################################
136#                  Network                                                    #
137###############################################################################
138
139if HAS_NETWORKING
140
141noinst_PROGRAMS = network.rel
142
143network_rel_SOURCES = ../shared/lpc/network/lpc-ethernet.c
144network_rel_CPPFLAGS = $(AM_CPPFLAGS) -D__INSIDE_RTEMS_BSD_TCPIP_STACK__ -D__BSD_VISIBLE
145network_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
146
147libbsp_a_LIBADD += network.rel
148
149endif
150
151###############################################################################
152#                  Special Rules                                              #
153###############################################################################
154
155DISTCLEANFILES = include/bspopts.h
156
157include $(top_srcdir)/../../../../automake/local.am
158include $(srcdir)/../../../../../../bsps/arm/lpc24xx/headers.am
Note: See TracBrowser for help on using the repository browser.