source: rtems/c/src/lib/libcpu/sparc64/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.1 KB
Line 
1ACLOCAL_AMFLAGS = -I ../../../aclocal
2
3include $(top_srcdir)/../../../automake/compile.am
4
5noinst_PROGRAMS =
6
7# NOTE: shared applies to targets meant to run with supervisor privilege,
8# i.e. sun4u or sun4v. Any targets (e.g. simulators) that cannot emulate
9# supervisor privilege should use their own score and sparc64-syscall.
10# The other shared code is probably usable, but should be defined separately.
11# See the example at the end of Makefile.am.
12if shared
13
14noinst_PROGRAMS += shared/shared-score.rel
15shared_shared_score_rel_SOURCES = shared/score/cpu.c shared/score/interrupt.S
16shared_shared_score_rel_CPPFLAGS = $(AM_CPPFLAGS)
17shared_shared_score_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
18
19noinst_PROGRAMS += shared/sparc64-syscall.rel
20shared_sparc64_syscall_rel_SOURCES = shared/syscall/sparc64-syscall.S \
21  shared/syscall/sparc64-syscall.h
22shared_sparc64_syscall_rel_CPPFLAGS = $(AM_CPPFLAGS)
23shared_sparc64_syscall_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
24
25noinst_PROGRAMS += shared/cache.rel
26shared_cache_rel_SOURCES = shared/cache/cache.c shared/cache/cache_.h \
27    ../shared/src/cache_manager.c
28shared_cache_rel_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/shared/cache
29shared_cache_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
30endif
31
32#if has_instruction_cache
33#cache_rel_CPPFLAGS += -DHAS_INSTRUCTION_CACHE
34#endif
35
36
37
38### This is an example of how to define a separate score implementation.
39## NOTE: Unlike other CPUs, we install into a subdirectory to avoid
40##       file name conflicts (See sh CPU for simexampleilar approach)
41#include_sparc64dir = $(includedir)/sparc64
42#include_rtems_scoredir = $(includedir)/rtems/score
43#
44#if simexample
45#include_sparc64_HEADERS = 
46#include_rtems_score_HEADERS = $(include_rtems_scoredir)/sparc64.h \
47#                              $(include_rtems_scoredir)/cpu.h \
48#                              $(include_rtems_scoredir)/types.h
49
50## simexample/score
51#noinst_PROGRAMS += simexample/score.rel
52#simexample_score_rel_SOURCES =
53#simexample_score_rel_CPPFLAGS = $(AM_CPPFLAGS)
54#simexample_score_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
55#
56#endif
57### End of example.
58
59include $(top_srcdir)/../../../automake/local.am
Note: See TracBrowser for help on using the repository browser.