summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2001-10-29 14:39:50 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2001-10-29 14:39:50 +0000
commita34b2458a4c6fade5bca0445e224ddea68ebb4bf (patch)
treea3f6ecbbf8376c5f0f805ddca8a942a812b28823
parentc1368b9ecfd7eb076ba05c62155b848f8026996e (diff)
downloadrtems-a34b2458a4c6fade5bca0445e224ddea68ebb4bf.tar.bz2
2001-10-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* Adopt more automake rules: * automake/compile.am: Add LINK, CXXLINK, AS, ASCOMPILE; Remove ARFLAGS, LINK.c, COMPILE.S, LINK.cc; Add CPU_CFLAGS to CXXFLAGS, CFLAGS, ASFLAGS; * automake/leaf.am: Add CXXLINK_APP, LINK_APP, make-exe, apply CXXLINK_APP in make-cxx-exe. * automake/lib.am: Add ARFLAGS.
-rw-r--r--ChangeLog10
-rw-r--r--automake/compile.am29
-rw-r--r--automake/leaf.am13
-rw-r--r--automake/lib.am2
4 files changed, 39 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 5bb5f8d966..daadb62c4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2001-10-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+ * Adopt more automake rules:
+ * automake/compile.am: Add LINK, CXXLINK, AS, ASCOMPILE;
+ Remove ARFLAGS, LINK.c, COMPILE.S, LINK.cc;
+ Add CPU_CFLAGS to CXXFLAGS, CFLAGS, ASFLAGS;
+ * automake/leaf.am: Add CXXLINK_APP, LINK_APP, make-exe, apply
+ CXXLINK_APP in make-cxx-exe.
+ * automake/lib.am: Add ARFLAGS.
+
2001-10-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* aclocal/check-rdbg.m4: Fix latent bug exposed by removal of
diff --git a/automake/compile.am b/automake/compile.am
index 8ffb12cce7..575fce520a 100644
--- a/automake/compile.am
+++ b/automake/compile.am
@@ -75,11 +75,11 @@ endif # RTEMS_USE_GCC
DEFS = @DEFS@
-CPPFLAGS = @CPPFLAGS@ $(CPU_DEFINES) $(CPU_CFLAGS) \
+CPPFLAGS = @CPPFLAGS@ $(CPU_DEFINES) \
$(DEFINES) $(XCPPFLAGS) $(CPPFLAGS_GCC)
-CFLAGS = $(CFLAGS_DEFAULT) $(XCFLAGS)
-CXXFLAGS = $(CFLAGS_DEFAULT) $(XCXXFLAGS)
-ASFLAGS = $(CPU_ASFLAGS) $(XASFLAGS)
+CFLAGS = $(CFLAGS_DEFAULT) $(CPU_CFLAGS) $(XCFLAGS)
+CXXFLAGS = $(CFLAGS_DEFAULT) $(CPU_CFLAGS) $(XCXXFLAGS)
+ASFLAGS = $(CPU_ASFLAGS) $(CPU_CFLAGS) $(XASFLAGS)
LINK_LIBS = $(LINK_LIBS_GCC272) $(LD_LIBS)
@@ -108,17 +108,24 @@ LDFLAGS=$(LDFLAGS_PROFILE) $(LDFLAGS_DEBUG) $(LD_PATHS:%=-L %)
# Client compiler and support tools
#
-ARFLAGS=ruv
-
#
# How to compile stuff into ${ARCH} subdirectory
#
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+CXXLD = $(CXX)
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+
+AS = $(CC)
+ASCOMPILE = $(AS) $(AM_ASFLAGS) $(ASFLAGS) -o $@
${ARCH}/%.o: %.c
${COMPILE} -o $@ -c $<
@@ -136,7 +143,7 @@ ${ARCH}/%.o: %.C
${CXXCOMPILE} -o $@ -c $<
${ARCH}/%.o: %.S
- ${COMPILE.S} $(AM_CPPFLAGS) -DASM -o $@ $<
+ ${ASCOMPILE} -DASM -c $<
# Make foo.rel from foo.o
${ARCH}/%.rel: ${ARCH}/%.o
@@ -197,20 +204,18 @@ LINK_FILES =\
if RTEMS_USE_GCC
if RTEMS_USE_GCC272
define make-rel
- $(LD) $(LDFLAGS_INCOMPLETE) $(XLDFLAGS) -o $@ $^
+ $(LINK) -nostdlib -Wl,-r $(XLDFLAGS) -o $@ $^
endef
else
## gcc >= 2.8
define make-rel
- $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
- -qnolinkcmds -nostdlib -Wl,-r $(XLDFLAGS) -o $@ $^
+ $(LINK) -qnolinkcmds -nostdlib -Wl,-r $(XLDFLAGS) $^
endef
endif
else
## non-gcc
define make-rel
- $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
- $(XLDFLAGS) -o $@ $^
+ $(LINK) $(XLDFLAGS) $^
endef
endif
diff --git a/automake/leaf.am b/automake/leaf.am
index b36ed33fbb..f6a9c5ce15 100644
--- a/automake/leaf.am
+++ b/automake/leaf.am
@@ -1,9 +1,16 @@
include $(RTEMS_ROOT)/make/leaf.cfg
+CXXLINK_APP = $(CXXLINK) $(LDLIBS) $(LINK_OBJS) $(LINK_LIBS)
ifndef make-cxx-exe
define make-cxx-exe
- $(LINK.cc) $(AM_CFLAGS) $(AM_LDFLAGS) \
- $(LDLIBS) -o $@ \
- $(LINK_OBJS) $(LINK_LIBS)
+ $(CXXLINK_APP)
endef
@ENDIF@
+
+LINK_APP = $(LINK) $(LDLIBS) $(LINK_OBJS) $(LINK_LIBS)
+ifndef make-exe
+define make-exe
+ $(LINK_APP)
+endef
+@ENDIF@
+
diff --git a/automake/lib.am b/automake/lib.am
index a1e93dc193..8fbea532de 100644
--- a/automake/lib.am
+++ b/automake/lib.am
@@ -6,6 +6,8 @@
AR = @AR@
RANLIB = @RANLIB@
+ARFLAGS = ruv
+
define make-library
$(RM) $@
$(AR) $(ARFLAGS) $@ $^