summaryrefslogtreecommitdiffstats
path: root/c/src
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-07-10 19:23:38 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-07-10 19:23:38 +0000
commite0ba3e80ef20420f6dd06503745a1e5ed7cac633 (patch)
tree024fc5014616f586c07cf0c9ba6ad3cb68ada11f /c/src
parentPatch rtems-rc-20000708-1.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff)
downloadrtems-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')
-rw-r--r--c/src/exec/configure.in2
-rw-r--r--c/src/exec/score/include/rtems/score/.cvsignore2
-rw-r--r--c/src/exec/score/include/rtems/score/Makefile.am63
-rw-r--r--c/src/exec/score/include/rtems/system.h4
-rw-r--r--c/src/lib/libbsp/Makefile.am2
-rw-r--r--c/src/lib/libbsp/configure.in10
-rw-r--r--c/src/lib/libbsp/include/.cvsignore2
-rw-r--r--c/src/lib/libbsp/include/Makefile.am10
-rw-r--r--c/src/lib/libbsp/include/rtems/.cvsignore2
-rw-r--r--c/src/lib/libbsp/include/rtems/Makefile.am10
-rw-r--r--c/src/lib/libbsp/include/rtems/score/.cvsignore2
-rw-r--r--c/src/lib/libbsp/include/rtems/score/Makefile.am64
-rw-r--r--c/src/lib/libbsp/shared/.cvsignore2
-rw-r--r--c/src/lib/libbsp/shared/Makefile.am13
-rw-r--r--c/src/lib/libbsp/shared/include/.cvsignore2
-rw-r--r--c/src/lib/libbsp/shared/include/Makefile.am9
16 files changed, 143 insertions, 56 deletions
diff --git a/c/src/exec/configure.in b/c/src/exec/configure.in
index d1374bd78f..c77ea0795e 100644
--- a/c/src/exec/configure.in
+++ b/c/src/exec/configure.in
@@ -67,6 +67,8 @@ fi
AC_CONFIG_SUBDIRS($cfg_subdirs)
AC_CONFIG_SUBDIRS(score/cpu/$RTEMS_CPU)
+AM_CONFIG_HEADER(score/include/rtems/score/cpuopts-tmp.h)
+
# Explicitly list all Makefiles here
AC_OUTPUT(
Makefile
diff --git a/c/src/exec/score/include/rtems/score/.cvsignore b/c/src/exec/score/include/rtems/score/.cvsignore
index 282522db03..fffa6b8f3b 100644
--- a/c/src/exec/score/include/rtems/score/.cvsignore
+++ b/c/src/exec/score/include/rtems/score/.cvsignore
@@ -1,2 +1,4 @@
Makefile
Makefile.in
+stamp-h.in
+cpuopts-tmp.h.in
diff --git a/c/src/exec/score/include/rtems/score/Makefile.am b/c/src/exec/score/include/rtems/score/Makefile.am
index bcf11a067f..867fbe6468 100644
--- a/c/src/exec/score/include/rtems/score/Makefile.am
+++ b/c/src/exec/score/include/rtems/score/Makefile.am
@@ -14,12 +14,11 @@ STD_H_FILES = address.h apiext.h bitfield.h chain.h context.h copyrt.h \
coremsg.h coremutex.h coresem.h heap.h interr.h isr.h object.h \
priority.h stack.h states.h sysstate.h thread.h threadq.h tod.h tqdata.h \
userext.h watchdog.h wkspace.h
-TARGOPTS = targopts.h
if HAS_MP
-H_FILES = $(STD_H_FILES) $(TARGOPTS) $(MP_H_FILES)
+H_FILES = $(STD_H_FILES) $(MP_H_FILES) cpuopts.h
else
-H_FILES = $(STD_H_FILES) $(TARGOPTS)
+H_FILES = $(STD_H_FILES) cpuopts.h
endif
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score \
@@ -31,59 +30,17 @@ $(PROJECT_INCLUDE)/rtems/score:
$(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):
- @echo "/* target board dependent options file */" >$@
+# make the cpu dependent options file
+# FIXME: We are exporting a config-header here, which is a bad idea in
+# general
+cpuopts.h: cpuopts-tmp.h
+ @echo "/* target cpu dependent options file */" >$@
@echo "/* automatically generated -- DO NOT EDIT!! */" >>$@
@echo >>$@
- @echo "#ifndef __TARGET_OPTIONS_h" >>$@
- @echo "#define __TARGET_OPTIONS_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 "#ifndef __CPU_OPTIONS_h" >>$@
+ @echo "#define __CPU_OPTIONS_h" >>$@
@echo >>$@
- @$(make-target-options)
- @if test "$(RTEMS_USE_MACROS)" = "yes"; then \
- echo "#define USE_MACROS 1" >>$@; \
- else \
- echo "#define USE_INLINES 1" >>$@; \
- fi
- @if test "$(HAS_MP)" = "yes"; then \
- echo "#define RTEMS_MULTIPROCESSING 1" >>$@; \
- fi
- @if test "$(HAS_POSIX_API)" = "yes"; then \
- echo "#define RTEMS_POSIX_API 1" >>$@; \
- fi
- @if test "$(HAS_ITRON_API)" = "yes"; then \
- echo "#define RTEMS_ITRON_API 1" >>$@; \
- fi
- @if test "$(RTEMS_USE_NEWLIB)" = "yes"; then \
- echo "#define RTEMS_NEWLIB 1" >>$@; \
- echo "#define MALLOC_PROVIDED 1" >>$@; \
- fi
+ @cat cpuopts-tmp.h >>$@
@echo >>$@
@echo "#endif" >>$@
diff --git a/c/src/exec/score/include/rtems/system.h b/c/src/exec/score/include/rtems/system.h
index b1a2382ea4..5e9cabb448 100644
--- a/c/src/exec/score/include/rtems/system.h
+++ b/c/src/exec/score/include/rtems/system.h
@@ -27,6 +27,10 @@ extern "C" {
* first so the basic macro definitions are in place.
*/
+/*
+ * FIXME: Instead of targopts.h, cpuopts.h should be included here.
+ * #include <rtems/score/cpuopts.h>
+ */
#include <rtems/score/targopts.h>
/*
diff --git a/c/src/lib/libbsp/Makefile.am b/c/src/lib/libbsp/Makefile.am
index 7c91749bd8..fd26466cae 100644
--- a/c/src/lib/libbsp/Makefile.am
+++ b/c/src/lib/libbsp/Makefile.am
@@ -11,7 +11,7 @@ ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
# level as the CPUs. If we are building the bare BSP, then descend
# into that directory.
-SUBDIRS += shmdr @RTEMS_LIBBSP_CPU_SUBDIR@
+SUBDIRS += include shared shmdr @RTEMS_LIBBSP_CPU_SUBDIR@
EXTRA_DIST = MERGE.PROCEDURE bsp.am
diff --git a/c/src/lib/libbsp/configure.in b/c/src/lib/libbsp/configure.in
index 75f642004f..f679af06a5 100644
--- a/c/src/lib/libbsp/configure.in
+++ b/c/src/lib/libbsp/configure.in
@@ -42,6 +42,12 @@ AC_CONFIG_SUBDIRS($cfg_subdirs)
RTEMS_PROJECT_ROOT
# Explicitly list all Makefiles here
-AC_OUTPUT(
+AC_OUTPUT(
Makefile
-shmdr/Makefile)
+shmdr/Makefile
+shared/Makefile
+shared/include/Makefile
+include/Makefile
+include/rtems/Makefile
+include/rtems/score/Makefile
+)
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
diff --git a/c/src/lib/libbsp/shared/.cvsignore b/c/src/lib/libbsp/shared/.cvsignore
new file mode 100644
index 0000000000..282522db03
--- /dev/null
+++ b/c/src/lib/libbsp/shared/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/c/src/lib/libbsp/shared/Makefile.am b/c/src/lib/libbsp/shared/Makefile.am
new file mode 100644
index 0000000000..3532a7f179
--- /dev/null
+++ b/c/src/lib/libbsp/shared/Makefile.am
@@ -0,0 +1,13 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+SUBDIRS = include
+
+EXTRA_DIST = bootcard.c bspclean.c bsplibc.c bsppost.c console-polled.c \
+ console.c gnatinstallhandler.c main.c sbrk.c tod.c tod.h
+
+include $(top_srcdir)/../../../../automake/subdirs.am
+include $(top_srcdir)/../../../../automake/local.am
diff --git a/c/src/lib/libbsp/shared/include/.cvsignore b/c/src/lib/libbsp/shared/include/.cvsignore
new file mode 100644
index 0000000000..282522db03
--- /dev/null
+++ b/c/src/lib/libbsp/shared/include/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/c/src/lib/libbsp/shared/include/Makefile.am b/c/src/lib/libbsp/shared/include/Makefile.am
new file mode 100644
index 0000000000..eb3c01a5dc
--- /dev/null
+++ b/c/src/lib/libbsp/shared/include/Makefile.am
@@ -0,0 +1,9 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+EXTRA_DIST = coverhd.h
+
+include $(top_srcdir)/../../../../automake/local.am