source: rtems/c/src/lib/libbsp/include/rtems/score/Makefile.am @ a314d3b4

4.104.114.84.95
Last change on this file since a314d3b4 was e0ba3e8, checked in by Joel Sherrill <joel.sherrill@…>, on 07/10/00 at 19:23:38

Patch rtems-rc-20000709-1.diff from Ralf Corsepius <corsepiu@…>
that addresses aspects of the targopts.h multilib related
issues.

Changes:

  • Move targopts.h to libbsp/include, because the current targopts.h actually is a per-BSP-header and therefore can not stay below exec/.
  • Introduce an autoheader generated header file (exec/score/include/rtems/score/cpuopts.h), which shall take per-cpu configuration options only.
  • Move all autoconf-detectable/configure specified per-cpu option-defines from targopts.h to cpuopts.h.
  • Add Makefiles to the libbsp/shared directory hierarchy.

Notes:

  • The new per-bsp targopts.h in libbsp includes the per-cpu cpuopts.h. This way, the new targopts.h is kept backward compatible to the old targopts.h and existing BSPs which (carelessly) include targopts.h (i386, ppc) should be kept working when using the multilib-disabled configuration scheme.
  • cpuopts.h is not yet complete, because the per-BSP make-targopts rules from custom/<BSP>.cfg files can not be applied to files below exec/ when building multilibs.
  • All files below exec/ should not include targopts.h anymore, but should include cpuopts.h instead. However, eliminating inclusion of targopts.h currently triggers further structural / header file inclusion related issues, because several ports apply BSP or CPU_MODEL specific defines from targopts.h below exec/
  • Property mode set to 100644
File size: 2.5 KB
RevLine 
[e0ba3e8]1##
2##  $Id$
3##
4
5AUTOMAKE_OPTIONS = foreign 1.4
6
7include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
8
9TARGOPTS = targopts.h
10
11H_FILES = $(TARGOPTS)
12
13PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score \
14    $(H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%)
15
16$(PROJECT_INCLUDE)/rtems/score:
17        @$(mkinstalldirs) $@
18
19$(PROJECT_INCLUDE)/rtems/score/%.h: %.h
20        $(INSTALL_DATA) $< $@
21
22CLEANFILES += $(TARGOPTS)
23
24# Until RTEMS_CPU is removed from all the make configuration files,
25# this will need to be here to transform hppa1.1 into hppa1_1 to
26# make it a valid cpp symbol.  At some point in the near future,
27# targopts.h should not define RTEMS_CPU.  As best I can tell,
28# gcc cpp predefines eliminate the need for RTEMS_CPU_MODEL
29# on some families but not on others.  For example, the i386
30# family does not give us enough information from the predefines.
31RTEMS_CPU_DEFINED = $(subst .,_,$(RTEMS_CPU))
32
33# make the target dependent options file
34$(TARGOPTS): Makefile.in
35        @echo "/* target board dependent options file */"       >$@
36        @echo "/* automatically generated -- DO NOT EDIT!! */" >>$@
37        @echo                                                  >>$@
38        @echo "#ifndef __TARGET_OPTIONS_h"                     >>$@
39        @echo "#define __TARGET_OPTIONS_h"                     >>$@
40        @echo                                                  >>$@
41        @echo "#include <rtems/score/cpuopts.h>"               >>$@
42        @echo                                                  >>$@
43        @echo "#ifdef $(RTEMS_CPU_DEFINED)"                    >>$@
44        @echo "#undef $(RTEMS_CPU_DEFINED)"                    >>$@
45        @echo "#endif"                                         >>$@
46        @echo "#define $(RTEMS_CPU_DEFINED) 1"                 >>$@
47        @echo                                                  >>$@
48        @echo "#ifdef $(RTEMS_CPU_MODEL)"                      >>$@
49        @echo "#undef $(RTEMS_CPU_MODEL)"                      >>$@
50        @echo "#endif"                                         >>$@
51        @echo "#define $(RTEMS_CPU_MODEL) 1"                   >>$@
52        @echo                                                  >>$@
53        @echo "#ifdef @RTEMS_BSP@"                            >>$@
54        @echo "#undef @RTEMS_BSP@"                            >>$@
55        @echo "#endif"                                         >>$@
56        @echo "#define @RTEMS_BSP@ 1"                         >>$@
57        @echo                                                  >>$@
58        @$(make-target-options)
59        @echo                                                  >>$@
60        @echo "#endif"                                         >>$@
61
62all-local: $(PREINSTALL_FILES)
63
64include $(top_srcdir)/../../../../automake/local.am
Note: See TracBrowser for help on using the repository browser.