diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-07-10 19:23:38 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-07-10 19:23:38 +0000 |
commit | e0ba3e80ef20420f6dd06503745a1e5ed7cac633 (patch) | |
tree | 024fc5014616f586c07cf0c9ba6ad3cb68ada11f /c/src/lib/libbsp/include | |
parent | Patch rtems-rc-20000708-1.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff) | |
download | rtems-e0ba3e80ef20420f6dd06503745a1e5ed7cac633.tar.bz2 |
Patch rtems-rc-20000709-1.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
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/
Diffstat (limited to 'c/src/lib/libbsp/include')
-rw-r--r-- | c/src/lib/libbsp/include/.cvsignore | 2 | ||||
-rw-r--r-- | c/src/lib/libbsp/include/Makefile.am | 10 | ||||
-rw-r--r-- | c/src/lib/libbsp/include/rtems/.cvsignore | 2 | ||||
-rw-r--r-- | c/src/lib/libbsp/include/rtems/Makefile.am | 10 | ||||
-rw-r--r-- | c/src/lib/libbsp/include/rtems/score/.cvsignore | 2 | ||||
-rw-r--r-- | c/src/lib/libbsp/include/rtems/score/Makefile.am | 64 |
6 files changed, 90 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/include/.cvsignore b/c/src/lib/libbsp/include/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/c/src/lib/libbsp/include/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/c/src/lib/libbsp/include/Makefile.am b/c/src/lib/libbsp/include/Makefile.am new file mode 100644 index 0000000000..32269fcdcd --- /dev/null +++ b/c/src/lib/libbsp/include/Makefile.am @@ -0,0 +1,10 @@ +## +## $Id$ +## + +AUTOMAKE_OPTIONS = foreign 1.4 + +SUBDIRS = rtems + +include $(top_srcdir)/../../../../automake/subdirs.am +include $(top_srcdir)/../../../../automake/local.am diff --git a/c/src/lib/libbsp/include/rtems/.cvsignore b/c/src/lib/libbsp/include/rtems/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/c/src/lib/libbsp/include/rtems/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/c/src/lib/libbsp/include/rtems/Makefile.am b/c/src/lib/libbsp/include/rtems/Makefile.am new file mode 100644 index 0000000000..ef3e214159 --- /dev/null +++ b/c/src/lib/libbsp/include/rtems/Makefile.am @@ -0,0 +1,10 @@ +## +## $Id$ +## + +AUTOMAKE_OPTIONS = foreign 1.4 + +SUBDIRS = score + +include $(top_srcdir)/../../../../automake/subdirs.am +include $(top_srcdir)/../../../../automake/local.am diff --git a/c/src/lib/libbsp/include/rtems/score/.cvsignore b/c/src/lib/libbsp/include/rtems/score/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/c/src/lib/libbsp/include/rtems/score/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/c/src/lib/libbsp/include/rtems/score/Makefile.am b/c/src/lib/libbsp/include/rtems/score/Makefile.am new file mode 100644 index 0000000000..26873dadbe --- /dev/null +++ b/c/src/lib/libbsp/include/rtems/score/Makefile.am @@ -0,0 +1,64 @@ +## +## $Id$ +## + +AUTOMAKE_OPTIONS = foreign 1.4 + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg + +TARGOPTS = targopts.h + +H_FILES = $(TARGOPTS) + +PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score \ + $(H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%) + +$(PROJECT_INCLUDE)/rtems/score: + @$(mkinstalldirs) $@ + +$(PROJECT_INCLUDE)/rtems/score/%.h: %.h + $(INSTALL_DATA) $< $@ + +CLEANFILES += $(TARGOPTS) + +# Until RTEMS_CPU is removed from all the make configuration files, +# this will need to be here to transform hppa1.1 into hppa1_1 to +# make it a valid cpp symbol. At some point in the near future, +# targopts.h should not define RTEMS_CPU. As best I can tell, +# gcc cpp predefines eliminate the need for RTEMS_CPU_MODEL +# on some families but not on others. For example, the i386 +# family does not give us enough information from the predefines. +RTEMS_CPU_DEFINED = $(subst .,_,$(RTEMS_CPU)) + +# make the target dependent options file +$(TARGOPTS): Makefile.in + @echo "/* target board dependent options file */" >$@ + @echo "/* automatically generated -- DO NOT EDIT!! */" >>$@ + @echo >>$@ + @echo "#ifndef __TARGET_OPTIONS_h" >>$@ + @echo "#define __TARGET_OPTIONS_h" >>$@ + @echo >>$@ + @echo "#include <rtems/score/cpuopts.h>" >>$@ + @echo >>$@ + @echo "#ifdef $(RTEMS_CPU_DEFINED)" >>$@ + @echo "#undef $(RTEMS_CPU_DEFINED)" >>$@ + @echo "#endif" >>$@ + @echo "#define $(RTEMS_CPU_DEFINED) 1" >>$@ + @echo >>$@ + @echo "#ifdef $(RTEMS_CPU_MODEL)" >>$@ + @echo "#undef $(RTEMS_CPU_MODEL)" >>$@ + @echo "#endif" >>$@ + @echo "#define $(RTEMS_CPU_MODEL) 1" >>$@ + @echo >>$@ + @echo "#ifdef @RTEMS_BSP@" >>$@ + @echo "#undef @RTEMS_BSP@" >>$@ + @echo "#endif" >>$@ + @echo "#define @RTEMS_BSP@ 1" >>$@ + @echo >>$@ + @$(make-target-options) + @echo >>$@ + @echo "#endif" >>$@ + +all-local: $(PREINSTALL_FILES) + +include $(top_srcdir)/../../../../automake/local.am |