summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2001-10-10 00:22:21 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2001-10-10 00:22:21 +0000
commitbfba54ed1c5be001e6aa104b83c2df05c424888c (patch)
tree3021889e113206a67f5e26eb5dd2463533fecb68
parent221c8f3d682cf94f95a3462225d8cb7b45cc29f3 (diff)
downloadrtems-bfba54ed1c5be001e6aa104b83c2df05c424888c.tar.bz2
2001-10-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* automake/compile.am: Fundamentally reworked compilation rules for closer adaptation to automake's behavior.
-rw-r--r--ChangeLog5
-rw-r--r--automake/compile.am28
2 files changed, 22 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 411aabfdff..80312302a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-10-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+ * automake/compile.am: Fundamentally reworked compilation rules for
+ closer adaptation to automake's behavior.
+
2001-09-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* automake/lib.am: Comment out LD.
diff --git a/automake/compile.am b/automake/compile.am
index 7c5bfc1899..8ffb12cce7 100644
--- a/automake/compile.am
+++ b/automake/compile.am
@@ -75,7 +75,7 @@ endif # RTEMS_USE_GCC
DEFS = @DEFS@
-CPPFLAGS += @CPPFLAGS@ $(CPU_DEFINES) $(CPU_CFLAGS) \
+CPPFLAGS = @CPPFLAGS@ $(CPU_DEFINES) $(CPU_CFLAGS) \
$(DEFINES) $(XCPPFLAGS) $(CPPFLAGS_GCC)
CFLAGS = $(CFLAGS_DEFAULT) $(XCFLAGS)
CXXFLAGS = $(CFLAGS_DEFAULT) $(XCXXFLAGS)
@@ -114,20 +114,26 @@ ARFLAGS=ruv
# How to compile stuff into ${ARCH} subdirectory
#
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+
${ARCH}/%.o: %.c
- ${COMPILE.c} $(AM_CPPFLAGS) $(AM_CFLAGS) -o $@ $<
+ ${COMPILE} -o $@ -c $<
${ARCH}/%.o: %.cc
- ${COMPILE.cc} $(AM_CPPFLAGS) $(AM_CXXFLAGS) -o $@ $<
+ ${CXXCOMPILE} -o $@ -c $<
${ARCH}/%.o: %.cpp
- ${COMPILE.cc} $(AM_CPPFLAGS) $(AM_CXXFLAGS) -o $@ $<
+ ${CXXCOMPILE} -o $@ -c $<
${ARCH}/%.o: %.cxx
- ${COMPILE.cc} $(AM_CPPFLAGS) $(AM_CXXFLAGS) -o $@ $<
+ ${CXXCOMPILE} -o $@ -c $<
${ARCH}/%.o: %.C
- ${COMPILE.cc} $(AM_CPPFLAGS) $(AM_CXXFLAGS) -o $@ $<
+ ${CXXCOMPILE} -o $@ -c $<
${ARCH}/%.o: %.S
${COMPILE.S} $(AM_CPPFLAGS) -DASM -o $@ $<
@@ -163,7 +169,7 @@ depend-am: $(C_FILES) $(CC_FILES) $(S_FILES)
## Replace foo.o with $(ARCH)/foo.o
## Replace $(ARCH) value with string $(ARCH)
## so that it will for debug and profile cases
- $(COMPILE.c) $(AM_CPPFLAGS) $(AM_CFLAGS) -M $^ | \
+ $(COMPILE) $(AM_CPPFLAGS) $(AM_CFLAGS) -M $^ | \
sed -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \
-e 's?$(ARCH)/?$$(ARCH)/?' >$(DEPEND).tmp
mv $(DEPEND).tmp $(DEPEND)
@@ -277,9 +283,9 @@ NM = @NM@
SIZE = @SIZE@
STRIP = @STRIP@
+
##
-## FIXME: DEFS and INCLUDES should not be passed as AM_CPPFLAGS
-AM_CPPFLAGS += $(DEFS) $(INCLUDES) $(RTEMS_CPPFLAGS)
+AM_CPPFLAGS = $(RTEMS_CPPFLAGS)
-AM_CFLAGS += $(RTEMS_CFLAGS_$(VARIANT_V)_V) $(CFLAGS_$(VARIANT_V)_V)
-AM_CXXFLAGS += $(RTEMS_CFLAGS_$(VARIANT_V)_V) $(CFLAGS_$(VARIANT_V)_V)
+AM_CFLAGS = $(RTEMS_CFLAGS_$(VARIANT_V)_V) $(CFLAGS_$(VARIANT_V)_V)
+AM_CXXFLAGS = $(RTEMS_CFLAGS_$(VARIANT_V)_V) $(CFLAGS_$(VARIANT_V)_V)