source: rtems/c/src/lib/libcpu/m68k/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.7 KB
Line 
1ACLOCAL_AMFLAGS = -I ../../../aclocal
2
3include $(top_srcdir)/../../../automake/compile.am
4
5noinst_PROGRAMS =
6
7if shared
8
9noinst_PROGRAMS += shared/cache.rel
10shared_cache_rel_SOURCES = shared/cache/cache.c
11shared_cache_rel_SOURCES += shared/cache/cache_.h
12shared_cache_rel_SOURCES += ../shared/src/cache_manager.c
13shared_cache_rel_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/shared/cache
14shared_cache_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
15
16## shared/misc
17
18# gcc doesn't recognize difference between the cpu32 and cpu32+ so we have to
19if mcpu32p
20M68K_CPPFLAGS = -D__mcpu32p__
21endif
22if mcf5272
23M68K_CPPFLAGS = -Dmcf5272
24endif
25
26noinst_PROGRAMS += shared/misc.rel
27shared_misc_rel_SOURCES = shared/misc/m68kidle.c shared/misc/memProbe.c
28shared_misc_rel_CPPFLAGS = $(AM_CPPFLAGS) $(M68K_CPPFLAGS)
29shared_misc_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
30endif
31
32if m68040
33## m68040/fpsp
34noinst_PROGRAMS += m68040/fpsp.rel
35noinst_PROGRAMS += m68040/fpsp_tmp.rel
36m68040_fpsp_tmp_rel_SOURCES = m68040/fpsp/rtems_fpsp.c m68040/fpsp/bindec.S \
37    m68040/fpsp/binstr.S m68040/fpsp/bugfix.S m68040/fpsp/decbin.S \
38    m68040/fpsp/do_func.S m68040/fpsp/gen_except.S m68040/fpsp/get_op.S \
39    m68040/fpsp/kernel_ex.S m68040/fpsp/res_func.S m68040/fpsp/round.S \
40    m68040/fpsp/rtems_skel.S m68040/fpsp/sacos.S m68040/fpsp/sasin.S \
41    m68040/fpsp/satan.S m68040/fpsp/satanh.S m68040/fpsp/scale.S \
42    m68040/fpsp/scosh.S m68040/fpsp/setox.S m68040/fpsp/sgetem.S \
43    m68040/fpsp/sint.S m68040/fpsp/slog2.S m68040/fpsp/slogn.S \
44    m68040/fpsp/smovecr.S m68040/fpsp/srem_mod.S m68040/fpsp/ssin.S \
45    m68040/fpsp/ssinh.S m68040/fpsp/stan.S m68040/fpsp/stanh.S \
46    m68040/fpsp/sto_res.S m68040/fpsp/stwotox.S m68040/fpsp/tbldo.S \
47    m68040/fpsp/util.S m68040/fpsp/x_bsun.S m68040/fpsp/x_fline.S \
48    m68040/fpsp/x_operr.S m68040/fpsp/x_ovfl.S m68040/fpsp/x_snan.S \
49    m68040/fpsp/x_store.S m68040/fpsp/x_unfl.S m68040/fpsp/x_unimp.S \
50    m68040/fpsp/x_unsupp.S
51m68040_fpsp_tmp_rel_CPPFLAGS = $(AM_CPPFLAGS)
52m68040_fpsp_tmp_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
53
54# avoid name clashes and modifying the source by
55# prefixing all (global) symbols in the binary
56m68040/fpsp_tmp1.rel: m68040/fpsp_tmp.rel
57        $(OBJCOPY) --prefix-symbols __fpsp_ $^ $@
58
59# Then remove the prefix again on all global
60# symbols we really need:
61m68040/fpsp.rel: m68040/fpsp_tmp1.rel
62            $(OBJCOPY) --redefine-sym __fpsp_M68KFPSPInstallExceptionHandlers=M68KFPSPInstallExceptionHandlers --redefine-sym __fpsp_M68040FPSPUserExceptionHandlers=M68040FPSPUserExceptionHandlers --redefine-sym __fpsp__CPU_ISR_install_raw_handler=_CPU_ISR_install_raw_handler --redefine-sym __fpsp__FPSP_install_raw_handler=_FPSP_install_raw_handler $^ $@
63
64noinst_HEADERS = m68040/fpsp/fpsp.defs
65endif
66EXTRA_DIST = m68040/fpsp/README
67
68if mcf5206
69# mcf5206/include
70## mcf5206/clock
71noinst_PROGRAMS += mcf5206/clock.rel
72mcf5206_clock_rel_SOURCES = mcf5206/clock/ckinit.c
73mcf5206_clock_rel_CPPFLAGS = $(AM_CPPFLAGS)
74mcf5206_clock_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
75
76## mcf5206/mcfuart
77noinst_PROGRAMS += mcf5206/mcfuart.rel
78mcf5206_mcfuart_rel_SOURCES = mcf5206/console/mcfuart.c
79mcf5206_mcfuart_rel_CPPFLAGS = $(AM_CPPFLAGS)
80mcf5206_mcfuart_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
81
82## mcf5206/mbus
83noinst_PROGRAMS += mcf5206/mbus.rel
84mcf5206_mbus_rel_SOURCES = mcf5206/mbus/mcfmbus.c
85mcf5206_mbus_rel_CPPFLAGS = $(AM_CPPFLAGS)
86mcf5206_mbus_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
87
88## mcf5206/timer
89noinst_PROGRAMS += mcf5206/timer.rel
90mcf5206_timer_rel_SOURCES = mcf5206/timer/timer.c mcf5206/timer/timerisr.S
91mcf5206_timer_rel_CPPFLAGS = $(AM_CPPFLAGS)
92mcf5206_timer_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
93endif
94
95if mcf5223x
96## mcf5223x/include
97## mcf5223x/cache
98noinst_PROGRAMS += mcf5223x/cachepd.rel
99mcf5223x_cachepd_rel_SOURCES = mcf5223x/cache/cachepd.c
100mcf5223x_cachepd_rel_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/shared/cache
101mcf5223x_cachepd_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
102endif
103
104if mcf5225x
105## mcf5225x/include
106# mcf5225x/cache
107noinst_PROGRAMS += mcf5225x/cachepd.rel
108mcf5225x_cachepd_rel_SOURCES = mcf5225x/cache/cachepd.c
109mcf5225x_cachepd_rel_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/shared/cache
110mcf5225x_cachepd_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
111
112# Network
113if HAS_NETWORKING
114endif ## HAS_NETWORKING
115endif
116
117if mcf5235
118## mcf5235/include
119## mcf5235/cache
120noinst_PROGRAMS += mcf5235/cachepd.rel
121mcf5235_cachepd_rel_SOURCES = mcf5235/cache/cachepd.c
122mcf5235_cachepd_rel_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/shared/cache
123mcf5235_cachepd_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
124endif
125
126if mcf532x
127## mcf532x/include
128## mcf532x/cache
129noinst_PROGRAMS += mcf532x/cachepd.rel
130mcf532x_cachepd_rel_SOURCES = mcf532x/cache/cachepd.c
131mcf532x_cachepd_rel_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/shared/cache
132mcf532x_cachepd_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
133endif
134
135if mcf5272
136## mcf5272/include
137## clock
138noinst_PROGRAMS += mcf5272/clock.rel
139mcf5272_clock_rel_SOURCES = mcf5272/clock/ckinit.c
140mcf5272_clock_rel_CPPFLAGS = $(AM_CPPFLAGS)
141mcf5272_clock_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
142
143## timer
144noinst_PROGRAMS += mcf5272/timer.rel
145mcf5272_timer_rel_SOURCES = mcf5272/timer/timer.c mcf5272/timer/timerisr.S
146mcf5272_timer_rel_CPPFLAGS = $(AM_CPPFLAGS)
147mcf5272_timer_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
148endif
149
150if mcf5282
151## mcf5282/include
152noinst_PROGRAMS += mcf5282/cachepd.rel
153mcf5282_cachepd_rel_SOURCES = mcf5282/cache/cachepd.c
154mcf5282_cachepd_rel_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/shared/cache
155mcf5282_cachepd_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
156endif
157
158if mcf548x
159## mcf548x/include
160## mcf548x/mcdma
161noinst_PROGRAMS += mcf548x/mcdma.rel
162mcf548x_mcdma_rel_SOURCES = mcf548x/mcdma/MCD_dmaApi.c mcf548x/mcdma/MCD_tasksInit.c \
163                            mcf548x/mcdma/MCD_tasks.c  mcf548x/mcdma/mcdma_glue.c
164
165mcf548x_mcdma_rel_CPPFLAGS = $(AM_CPPFLAGS)
166mcf548x_mcdma_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
167endif
168
169include $(top_srcdir)/../../../automake/local.am
Note: See TracBrowser for help on using the repository browser.