source: rtems/c/src/lib/libbsp/sparc/erc32/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.9 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 += ../../sparc/shared/start/start.S
15start.$(OBJEXT): ../../sparc/shared/start/start.S
16        $(CPPASCOMPILE) -o $@ -c $<
17project_lib_DATA = start.$(OBJEXT)
18
19project_lib_DATA += linkcmds
20dist_project_lib_DATA += ../shared/startup/linkcmds.base
21
22noinst_LIBRARIES = libbsp.a
23libbsp_a_SOURCES =
24
25# startup
26libbsp_a_SOURCES += ../../shared/bspclean.c
27libbsp_a_SOURCES += startup/bsppredriver.c
28libbsp_a_SOURCES += ../../sparc/shared/startup/bspgetworkarea.c
29libbsp_a_SOURCES += ../../shared/bspreset.c
30libbsp_a_SOURCES += ../../shared/bspstart.c
31libbsp_a_SOURCES += ../../shared/bootcard.c
32libbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
33libbsp_a_SOURCES += ../../shared/sbrk.c
34libbsp_a_SOURCES += startup/setvec.c
35libbsp_a_SOURCES += startup/spurious.c
36libbsp_a_SOURCES += startup/erc32mec.c
37libbsp_a_SOURCES += startup/boardinit.S
38libbsp_a_SOURCES += startup/bspidle.c
39libbsp_a_SOURCES += startup/bspdelay.c
40libbsp_a_SOURCES += ../../sparc/shared/startup/bsp_fatal_exit.c
41libbsp_a_SOURCES += ../../sparc/shared/startup/bsp_fatal_halt.c
42# ISR Handler
43libbsp_a_SOURCES += ../../sparc/shared/cpu.c
44libbsp_a_SOURCES += ../../sparc/shared/irq_asm.S
45# gnatsupp
46libbsp_a_SOURCES += gnatsupp/gnatsupp.c ../../sparc/shared/gnatcommon.c
47# console
48libbsp_a_SOURCES += console/erc32_console.c ../../shared/console.c \
49    ../../shared/console_select.c  ../../shared/console_control.c \
50    ../../shared/console_read.c ../../shared/console_write.c
51# debugio
52libbsp_a_SOURCES += console/debugputs.c
53# clock
54libbsp_a_SOURCES += clock/ckinit.c
55libbsp_a_SOURCES += ../../shared/clockdrv_shell.h
56# timer
57libbsp_a_SOURCES += timer/timer.c
58
59# IRQ
60libbsp_a_SOURCES += \
61    ../../sparc/shared/irq/irq-shared.c \
62    ../../sparc/shared/irq/bsp_isr_handler.c \
63    ../../shared/src/irq-default-handler.c \
64    ../../shared/src/irq-generic.c \
65    ../../shared/src/irq-info.c \
66    ../../shared/src/irq-legacy.c \
67    ../../shared/src/irq-server.c \
68    ../../shared/src/irq-shell.c
69
70if HAS_SMP
71libbsp_a_SOURCES += ../../shared/bspsmp.c
72libbsp_a_SOURCES += ../../shared/bspsmpgetcurrentprocessor.c
73endif
74
75if HAS_NETWORKING
76erc32sonic_CPPFLAGS = -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
77noinst_PROGRAMS += erc32sonic.rel
78erc32sonic_rel_SOURCES = erc32sonic/erc32sonic.c
79erc32sonic_rel_CPPFLAGS = $(AM_CPPFLAGS) $(erc32sonic_CPPFLAGS)
80erc32sonic_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
81endif
82
83libbsp_a_LIBADD  = \
84    ../../../libcpu/@RTEMS_CPU@/access.rel \
85    ../../../libcpu/@RTEMS_CPU@/cache.rel \
86    ../../../libcpu/@RTEMS_CPU@/reg_win.rel \
87    ../../../libcpu/@RTEMS_CPU@/syscall.rel
88if HAS_NETWORKING
89libbsp_a_LIBADD += erc32sonic.rel
90endif
91
92EXTRA_DIST += times
93
94include $(top_srcdir)/../../../../automake/local.am
95include $(srcdir)/../../../../../../bsps/sparc/erc32/headers.am
Note: See TracBrowser for help on using the repository browser.