summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-02-18 17:16:48 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-02-18 17:16:48 +0000
commite4071cf64a0d3e789321a63e4ee5838b4d85da6b (patch)
treeb4bad62707917ffcbb0ffd8309b3b36ae817ade3
parent0c04c377bc8ac177d28bd0e0096d7c6940d33cd4 (diff)
downloadrtems-e4071cf64a0d3e789321a63e4ee5838b4d85da6b.tar.bz2
Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
This patch removes generation of targopts.h from leaf.cfg and generates it in location at score/include/rtems/score instead. To achieve this: * all rules in other Makefile.ins which have accessed targopts.h have been removed. * c/Makefile.in has been modified to generate the directories before doing anything else. I.e. to ensure the directories exist before any preinstall rule fires (This part is a bit kludgy, but it seems to work. Please check if the interaction with libhwapi still works).
-rw-r--r--c/src/exec/score/cpu/a29k/Makefile.in6
-rw-r--r--c/src/exec/score/cpu/hppa1.1/Makefile.in7
-rw-r--r--c/src/exec/score/cpu/i386/Makefile.in6
-rw-r--r--c/src/exec/score/cpu/i960/Makefile.in6
-rw-r--r--c/src/exec/score/cpu/m68k/Makefile.in7
-rw-r--r--c/src/exec/score/cpu/mips64orion/Makefile.in7
-rw-r--r--c/src/exec/score/cpu/no_cpu/Makefile.in8
-rw-r--r--c/src/exec/score/cpu/powerpc/Makefile.in6
-rw-r--r--c/src/exec/score/cpu/sh/Makefile.in7
-rw-r--r--c/src/exec/score/cpu/sparc/Makefile.in7
-rw-r--r--c/src/exec/score/cpu/unix/Makefile.in6
-rw-r--r--c/src/exec/score/include/rtems/score/Makefile.in56
12 files changed, 60 insertions, 69 deletions
diff --git a/c/src/exec/score/cpu/a29k/Makefile.in b/c/src/exec/score/cpu/a29k/Makefile.in
index 88873b749c..ddffc4e4e6 100644
--- a/c/src/exec/score/cpu/a29k/Makefile.in
+++ b/c/src/exec/score/cpu/a29k/Makefile.in
@@ -66,17 +66,11 @@ $(ARCH)/rtems-cpu.rel: $(OBJS)
# for include files, just use $(INSTALL)
preinstall: $(ARCH) \
- $(PROJECT_INCLUDE)/rtems/score/targopts.h \
${PROJECT_RELEASE}/lib/bsp_specs
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
# we will share the basic cpu file
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
-$(PROJECT_INCLUDE)/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
- $(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
-
-# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
-
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
diff --git a/c/src/exec/score/cpu/hppa1.1/Makefile.in b/c/src/exec/score/cpu/hppa1.1/Makefile.in
index ae2b79a566..a7b7b02be6 100644
--- a/c/src/exec/score/cpu/hppa1.1/Makefile.in
+++ b/c/src/exec/score/cpu/hppa1.1/Makefile.in
@@ -67,17 +67,12 @@ all: ${ARCH} install-headers preinstall $(RELS)
preinstall: $(ARCH) $(SRCS) $(ARCH)/offsets.h
$(INSTALL) -m 444 $(ARCH)/offsets.h $(PROJECT_INCLUDE)/rtems/score
-install-headers: $(ARCH) $(PROJECT_INCLUDE)/rtems/score/targopts.h \
+install-headers: $(ARCH) \
${PROJECT_RELEASE}/lib/bsp_specs
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
# we will share the basic cpu file
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
-$(PROJECT_INCLUDE)/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
- $(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
-
-# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
-
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
diff --git a/c/src/exec/score/cpu/i386/Makefile.in b/c/src/exec/score/cpu/i386/Makefile.in
index 241f99c830..6102a53fdf 100644
--- a/c/src/exec/score/cpu/i386/Makefile.in
+++ b/c/src/exec/score/cpu/i386/Makefile.in
@@ -64,17 +64,11 @@ all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS)
install: all
preinstall: $(ARCH) \
- $(PROJECT_INCLUDE)/rtems/score/targopts.h \
${PROJECT_RELEASE}/lib/bsp_specs
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
# we will share the basic cpu file
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
-$(PROJECT_INCLUDE)/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
- $(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
-
-# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
-
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
diff --git a/c/src/exec/score/cpu/i960/Makefile.in b/c/src/exec/score/cpu/i960/Makefile.in
index 8c265002b5..6cc351d017 100644
--- a/c/src/exec/score/cpu/i960/Makefile.in
+++ b/c/src/exec/score/cpu/i960/Makefile.in
@@ -63,17 +63,11 @@ all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS)
install: all
preinstall: $(ARCH) \
- $(PROJECT_INCLUDE)/rtems/score/targopts.h \
${PROJECT_RELEASE}/lib/bsp_specs
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
# we will share the basic cpu file
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
-$(PROJECT_INCLUDE)/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
- $(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
-
-# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
-
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
diff --git a/c/src/exec/score/cpu/m68k/Makefile.in b/c/src/exec/score/cpu/m68k/Makefile.in
index 90bdc8e4d8..acf4b6b44f 100644
--- a/c/src/exec/score/cpu/m68k/Makefile.in
+++ b/c/src/exec/score/cpu/m68k/Makefile.in
@@ -59,17 +59,12 @@ $(ARCH)/rtems-cpu.rel: $(OBJS)
all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS)
-preinstall: $(ARCH) $(PROJECT_INCLUDE)/rtems/score/targopts.h \
+preinstall: $(ARCH) \
${PROJECT_RELEASE}/lib/bsp_specs
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
# we will share the basic cpu file
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
-$(PROJECT_INCLUDE)/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
- $(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
-
-# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
-
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
diff --git a/c/src/exec/score/cpu/mips64orion/Makefile.in b/c/src/exec/score/cpu/mips64orion/Makefile.in
index 21985cd257..bcf1481f9c 100644
--- a/c/src/exec/score/cpu/mips64orion/Makefile.in
+++ b/c/src/exec/score/cpu/mips64orion/Makefile.in
@@ -65,17 +65,12 @@ $(ARCH)/rtems-cpu.rel: $(OBJS)
# Install the program(s), appending _g or _p as appropriate.
# for include files, just use $(INSTALL)
-preinstall: $(ARCH) $(PROJECT_INCLUDE)/rtems/score/targopts.h \
+preinstall: $(ARCH) \
${PROJECT_RELEASE}/lib/bsp_specs
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
# we will share the basic cpu file
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
-$(PROJECT_INCLUDE)/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
- $(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
-
-# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
-
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
diff --git a/c/src/exec/score/cpu/no_cpu/Makefile.in b/c/src/exec/score/cpu/no_cpu/Makefile.in
index 8646f1d070..0110dbf595 100644
--- a/c/src/exec/score/cpu/no_cpu/Makefile.in
+++ b/c/src/exec/score/cpu/no_cpu/Makefile.in
@@ -66,17 +66,11 @@ install: all
# Real ports using the gnu tools will need to have bsp_specs!!!
# ${PROJECT_RELEASE}/lib/bsp_specs
-preinstall: $(ARCH) \
- $(PROJECT_INCLUDE)/rtems/score/targopts.h
+preinstall: $(ARCH)
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
# we will share the basic cpu file
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
-$(PROJECT_INCLUDE)/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
- $(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
-
-# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
-
# Real ports using the gnu tools will need to have bsp_specs!!!
#${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
# $(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
diff --git a/c/src/exec/score/cpu/powerpc/Makefile.in b/c/src/exec/score/cpu/powerpc/Makefile.in
index 1324bd1e96..8a75dafc4e 100644
--- a/c/src/exec/score/cpu/powerpc/Makefile.in
+++ b/c/src/exec/score/cpu/powerpc/Makefile.in
@@ -67,7 +67,6 @@ $(ARCH)/cpu_asm.o: irq_stub.s
install: all
preinstall: $(ARCH) \
- $(PROJECT_INCLUDE)/rtems/score/targopts.h \
${PROJECT_RELEASE}/lib/bsp_specs
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
# we will share the basic cpu file
@@ -75,11 +74,6 @@ preinstall: $(ARCH) \
# make a link in case we are not compiling in the source directory
#test -f irq_stub.s || $(LN) -s $(srcdir)/irq_stub.s irq_stub.s
-$(PROJECT_INCLUDE)/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
- $(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
-
-# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
-
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
diff --git a/c/src/exec/score/cpu/sh/Makefile.in b/c/src/exec/score/cpu/sh/Makefile.in
index 079f3c488b..aeae1bfffb 100644
--- a/c/src/exec/score/cpu/sh/Makefile.in
+++ b/c/src/exec/score/cpu/sh/Makefile.in
@@ -70,17 +70,12 @@ $(ARCH)/rtems-cpu.rel: $(OBJS)
# for include files, just use $(INSTALL)
install: all
-preinstall: $(ARCH) $(PROJECT_INCLUDE)/rtems/score/targopts.h \
+preinstall: $(ARCH) \
${PROJECT_RELEASE}/lib/bsp_specs
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
# we will share the basic cpu file
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
-$(PROJECT_INCLUDE)/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
- $(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
-
-# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
-
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
diff --git a/c/src/exec/score/cpu/sparc/Makefile.in b/c/src/exec/score/cpu/sparc/Makefile.in
index fd888a472e..ce82aea680 100644
--- a/c/src/exec/score/cpu/sparc/Makefile.in
+++ b/c/src/exec/score/cpu/sparc/Makefile.in
@@ -58,17 +58,12 @@ $(ARCH)/rtems-cpu.rel: $(OBJS)
all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS)
-preinstall: $(ARCH) $(PROJECT_INCLUDE)/rtems/score/targopts.h \
+preinstall: $(ARCH) \
${PROJECT_RELEASE}/lib/bsp_specs
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
# we will share the basic cpu file
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
-$(PROJECT_INCLUDE)/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
- $(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
-
-# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
-
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
diff --git a/c/src/exec/score/cpu/unix/Makefile.in b/c/src/exec/score/cpu/unix/Makefile.in
index 0589977f7f..baabaa8297 100644
--- a/c/src/exec/score/cpu/unix/Makefile.in
+++ b/c/src/exec/score/cpu/unix/Makefile.in
@@ -67,16 +67,10 @@ install: all
# Real ports using the gnu tools will need to have bsp_specs!!!
# ${PROJECT_RELEASE}/lib/bsp_specs
preinstall: $(ARCH) $(ARCH)/unixsize.h \
- $(PROJECT_INCLUDE)/rtems/score/targopts.h \
$(PROJECT_RELEASE)/lib/bsp_specs
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
$(INSTALL) -m 444 ${ARCH}/unixsize.h $(PROJECT_INCLUDE)/rtems/score
-$(PROJECT_INCLUDE)/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
- $(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
-
-# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
-
# Real ports using the gnu tools will need to have bsp_specs!!!
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
diff --git a/c/src/exec/score/include/rtems/score/Makefile.in b/c/src/exec/score/include/rtems/score/Makefile.in
index 86ba5ab541..6fa695eb66 100644
--- a/c/src/exec/score/include/rtems/score/Makefile.in
+++ b/c/src/exec/score/include/rtems/score/Makefile.in
@@ -17,7 +17,7 @@ H_PIECES= address apiext bitfield chain context copyrt coremsg coremutex \
coresem heap interr isr object \
priority stack states sysstate thread threadq \
tod tqdata userext watchdog wkspace
-H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
+H_FILES=$(H_PIECES:%=$(srcdir)/%.h) targopts.h
SRCS=$(H_FILES)
@@ -31,8 +31,60 @@ include $(RTEMS_ROOT)/make/leaf.cfg
# 'make clobber' already includes 'make clean'
#
-CLEAN_ADDITIONS +=
+CLEAN_ADDITIONS += targopts.h
CLOBBER_ADDITIONS +=
+# 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.h:
+ @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 "#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)
+ifeq (${RTEMS_USE_MACROS},yes)
+ @echo "#define USE_MACROS 1" >>$@
+else
+ @echo "#define USE_INLINES 1" >>$@
+endif
+ifeq ($(RTEMS_HAS_MULTIPROCESSING),yes)
+ @echo "#define RTEMS_MULTIPROCESSING 1" >>$@
+endif
+ifeq ($(RTEMS_HAS_POSIX_API),yes)
+ @echo "#define RTEMS_POSIX_API 1" >>$@
+endif
+ifeq ($(RTEMS_USE_NEWLIB),yes)
+ @echo "#define RTEMS_NEWLIB 1" >>$@
+ @echo "#define MALLOC_PROVIDED 1" >>$@
+endif
+ @echo >>$@
+ @echo "#endif" >>$@
+
+
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score