summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--c/src/ChangeLog5
-rw-r--r--c/src/automake/compile.am92
-rw-r--r--c/src/wrapup/Makefile.am20
3 files changed, 25 insertions, 92 deletions
diff --git a/c/src/ChangeLog b/c/src/ChangeLog
index c2cf1d8cde..0f1fea6c36 100644
--- a/c/src/ChangeLog
+++ b/c/src/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+ * wrapup/Makefile.am: Don't include lib.am.
+ * automake/compile.am: Use automake compilation rules.
+
2004-02-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* libnetworking/pppd/Makefile.am,
diff --git a/c/src/automake/compile.am b/c/src/automake/compile.am
index 479ea658fa..0aee6951aa 100644
--- a/c/src/automake/compile.am
+++ b/c/src/automake/compile.am
@@ -36,10 +36,6 @@
## CFLAGS_OPTIMIZE, CFLAGS_DEBUG are set by the
## 'VARIANT=<OPTIMIZE|DEBUG>' targets to their _V values.
-## XCPPFLAGS, XCFLAGS, XCXXFLAGS, XASFLAGS
-## are used to add flags from the shell
-## cf. make.info ("Implicit rules/variables" for details)
-
if RTEMS_USE_GCC
## All the stuff below is specific to gcc
@@ -53,84 +49,15 @@ endif # RTEMS_USE_GCC
DEFS = @DEFS@
-CPPFLAGS = @CPPFLAGS@ $(CPU_DEFINES) $(DEFINES) $(XCPPFLAGS)
-CFLAGS = @RTEMS_CFLAGS@ $(XCFLAGS)
+CPPFLAGS = @CPPFLAGS@ $(CPU_DEFINES) $(DEFINES)
+CFLAGS = @RTEMS_CFLAGS@
## FIXME: This should be correct, but is not supported, yet
# CXXFLAGS = @RTEMS_CXXFLAGS@ $(XCXXFLAGS)
## Fall back to using RTEMS_CFLAGS for C++
CXXFLAGS = @RTEMS_CFLAGS@ $(XCXXFLAGS)
ASFLAGS = $(CPU_ASFLAGS) $(CPU_CFLAGS) $(XASFLAGS)
-#
-# Client compiler and support tools
-#
-
-#
-# 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 $@
-
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-CXXLD = $(CXX)
-CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-
-CCAS = $(CC)
-CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)
-
-# OBSOLETE: Don't use
-AS = $(CC)
-ASCOMPILE = $(AS) $(AM_ASFLAGS) $(ASFLAGS)
-
-${ARCH}/%.o: %.c $(ARCH)/$(dirstamp)
- ${COMPILE} -o $@ -c $<
-
-${ARCH}/%.o: %.cc $(ARCH)/$(dirstamp)
- ${CXXCOMPILE} -o $@ -c $<
-
-${ARCH}/%.o: %.S $(ARCH)/$(dirstamp)
- ${CCASCOMPILE} -DASM -o $@ -c $<
-
-${ARCH}/$(dirstamp):
- @$(mkdir_p) $(ARCH)
- @: > $(ARCH)/$(dirstamp)
-
-# Dependency files for use by gmake
-# NOTE: we don't put them into $(ARCH)
-# so that 'make clean' doesn't blow it away
-
-DEPEND=Depends-${ARCH}
-
-# We deliberately don't have anything depend on the
-# $(DEPEND) file; otherwise it will get rebuilt even
-# on 'make clean'
-#
-
-if RTEMS_USE_GCC
-## HACK: Specific to gcc
-## FIXME: The approach below is known to be conceptionally broken.
-depend-gcc: $(C_FILES) $(CC_FILES) $(S_FILES)
-## Use gcc -M to generate dependencies
-## Replace foo.o with $(ARCH)/foo.o
-## Replace $(ARCH) value with string $(ARCH)
-## so that it will for debug cases
- $(COMPILE) -M $^ | \
- sed -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \
- -e 's?$(ARCH)/?$$(ARCH)/?' >$(DEPEND).tmp
- mv $(DEPEND).tmp $(DEPEND)
-
-# pull in dependencies if they exist
-ifeq (${DEPEND},$(wildcard ${DEPEND}))
-include ${DEPEND}
-@ENDIF@
-endif
-depend: depend-am
+depend:
if RTEMS_USE_GCC
## gcc >= 2.8
@@ -157,13 +84,6 @@ VARIANT_debug_V = DEBUG
VARIANT_V = $(VARIANT_$(VARIANT)_V)
-## Setup the variant build subdirectory
-ARCH_OPTIMIZE_V = o-optimize
-ARCH_DEBUG_V = o-debug
-
-ARCH__V = $(ARCH_OPTIMIZE_V)
-ARCH = $(ARCH_$(VARIANT_V)_V)
-
## Setup the library suffix
LIBSUFFIX_OPTIMIZE_V =
LIBSUFFIX_DEBUG_V = _g
@@ -206,8 +126,4 @@ STRIP = @STRIP@
AM_CPPFLAGS = $(RTEMS_CPPFLAGS)
AM_CFLAGS =
AM_CXXFLAGS =
-AM_CCASFLAGS = $(CPU_CFLAGS) $(RTEMS_CPPFLAGS) $(RTEMS_CCASFLAGS)
-
-clean-local:
- $(RM) -r o-optimize o-debug $(CLEANDIRS)
- $(RM) Depends-o-optimize.tmp Depends-o-debug.tmp
+AM_CCASFLAGS = $(RTEMS_CPPFLAGS) $(RTEMS_CCASFLAGS)
diff --git a/c/src/wrapup/Makefile.am b/c/src/wrapup/Makefile.am
index 2319d62218..ff84462819 100644
--- a/c/src/wrapup/Makefile.am
+++ b/c/src/wrapup/Makefile.am
@@ -5,9 +5,17 @@
##
include $(top_srcdir)/automake/compile.am
-include $(top_srcdir)/automake/lib.am
+
+## Setup the variant build subdirectory
+ARCH_OPTIMIZE_V = o-optimize
+ARCH_DEBUG_V = o-debug
+
+ARCH__V = $(ARCH_OPTIMIZE_V)
+ARCH = $(ARCH_$(VARIANT_V)_V)
project_lib_DATA = $(ARCH)/librtemsbsp$(LIB_VARIANT).a
+CLEANFILES = o-optimize/librtemsbsp.a
+CLEANFILES += o-debug/librtemsbsp_g.a
SRCS = ../support/libsupport$(LIB_VARIANT).a
@@ -34,7 +42,8 @@ if HAS_RDBG
SRCS += ../librdbg/src/@RTEMS_CPU@/librdbg$(LIB_VARIANT).a
endif
-SRCS += $(wildcard $(PROJECT_LIB)/libcpu$(LIB_VARIANT).a)
+# FIXME: ATM, there is no libcpu.a, anymore.
+# SRCS += $(wildcard $(PROJECT_LIB)/libcpu$(LIB_VARIANT).a)
if LIBCHIP
SRCS += ../libchip/librtcio$(LIB_VARIANT).a
@@ -53,7 +62,9 @@ endif
all-local: $(TMPINSTALL_FILES)
-$(ARCH)/librtemsbsp$(LIB_VARIANT).a: $(SRCS) $(ARCH)/$(dirstamp)
+$(ARCH)/librtemsbsp$(LIB_VARIANT).a: $(SRCS)
+ rm -f $@
+ $(mkdir_p) $(ARCH)
rm -rf $(ARCH)/*.a $(ARCH)/*.$(OBJEXT) $(ARCH)/*.rel
for f in $(SRCS); do \
case $$f in \
@@ -79,6 +90,7 @@ $(ARCH)/librtemsbsp$(LIB_VARIANT).a: $(SRCS) $(ARCH)/$(dirstamp)
esac; \
done
$(AR) rc $@ $(ARCH)/*
+ rm -f $(ARCH)/*.$(OBJEXT) $(ARCH)/*.rel
$(RANLIB) $@
TMPINSTALL_FILES =
@@ -92,6 +104,6 @@ $(PROJECT_LIB)/librtemsbsp$(LIB_VARIANT).a: $(ARCH)/librtemsbsp$(LIB_VARIANT).a
$(INSTALL_DATA) $< $(PROJECT_LIB)/librtemsbsp$(LIB_VARIANT).a
TMPINSTALL_FILES += $(PROJECT_LIB)/librtemsbsp$(LIB_VARIANT).a
-CLEANFILES = $(TMPINSTALL_FILES)
+CLEANFILES += $(TMPINSTALL_FILES)
include $(top_srcdir)/automake/local.am