summaryrefslogtreecommitdiffstats
path: root/c/src/make
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-22 13:41:11 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-22 13:41:11 +0000
commit9608320702e8dba9947987cd34001824638c434e (patch)
tree4352f820543cb2755ff8d6cfa2d9a0e7d0fc7544 /c/src/make
parentSmall patch (rtems-rc-19991117-5.diff) from Ralf Corsepius (diff)
downloadrtems-9608320702e8dba9947987cd34001824638c434e.tar.bz2
Patch rtems-rc-19991117-4.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
.. a major configuration cleanup ... major enhancement of automake support. ... and it contains a *major* breakthough: Automake support for libchip and libmisc *LEAF* directories. To implement this I have used several nasty tricks * The basical trick is to wrap an old Makefile.in's contents into a Makefile.am and still continue to use (i.e include) the old *.cfg files. * Replaced each INSTALL_IF_CHANGE and INSTALL_VARIANT with make dependencies * Add a gnu-make ifdef AUTOMAKE to main.cfg to avoid conflicts between automake and RTEMS make rules * Replaced each install:: and preinstall:: rule with make dependencies * Replaced SUB_DIRS with SUBDIRS in all Makefile.ins (Automake convention) * Removed each manually added autoconf substitution which automake performs automatically. This is not yet full automake support, because using the temporary installation directory, preinstallation in general and building variants are in contradiction to automake's basic working principles ... ... the new Makefile.ams work still somewhat clumsy ... nevertheless they work (quite well). WARNING: At first glance this patch is small, but * it affects the whole configuration system. * it opens the road to introducing automake to all Makefile.ins currently not being under automake control. JOEL> Does this remove or add any files? Both, all Makefile.ins below libchip and libmisc get replaced with Makefile.ams.
Diffstat (limited to 'c/src/make')
-rw-r--r--c/src/make/README4
-rw-r--r--c/src/make/compilers/gcc-target-default.cfg14
-rw-r--r--c/src/make/directory.cfg4
-rw-r--r--c/src/make/lib.cfg2
-rw-r--r--c/src/make/main.cfg.in2
5 files changed, 13 insertions, 13 deletions
diff --git a/c/src/make/README b/c/src/make/README
index 8a1c7157df..911d2b8aea 100644
--- a/c/src/make/README
+++ b/c/src/make/README
@@ -416,9 +416,9 @@
XCCFLAGS -- same as XCFLAGS for C++.
- SUB_DIRS -- list of sub directories for make recursion.
+ SUBDIRS -- list of sub directories for make recursion.
directory Makefiles only.
- [ eg: SUB_DIRS=cpu bsp ]
+ [ eg: SUBDIRS=cpu bsp ]
CLEAN_ADDITIONS
-- list of files or directories that should
diff --git a/c/src/make/compilers/gcc-target-default.cfg b/c/src/make/compilers/gcc-target-default.cfg
index f91c2a6e31..92ba1637ce 100644
--- a/c/src/make/compilers/gcc-target-default.cfg
+++ b/c/src/make/compilers/gcc-target-default.cfg
@@ -22,7 +22,7 @@ CFLAGS_DEFAULT=-g -Wall -ansi -fasm
# NOTE: CPU_CFLAGS should probably be renamed to CPU_CPPFLAGS
# NOTE: CPU_DEFINES should probably be merged with CPU_CFLAGS
-CPPFLAGS = $(CPU_DEFINES) $(CPU_CFLAGS) $(DEFINES) $(XCPPFLAGS)
+CPPFLAGS += $(CPU_DEFINES) $(CPU_CFLAGS) $(DEFINES) $(XCPPFLAGS)
CFLAGS = $(CFLAGS_DEFAULT) $(XCFLAGS)
CXXFLAGS = $(CFLAGS_DEFAULT) $(XCXXFLAGS)
ASFLAGS = $(CPU_ASFLAGS) $(XASFLAGS)
@@ -183,22 +183,22 @@ MKLIB=$(RANLIB)
# COMPILE.S=$(CC) $(ASFLAGS) $(CPPFLAGS) -c
${ARCH}/%.o: %.c
- ${COMPILE.c} -o $@ $<
+ ${COMPILE.c} $(AM_CPPFLAGS) $(AM_CFLAGS) -o $@ $<
${ARCH}/%.o: %.cc
- ${COMPILE.cc} -o $@ $<
+ ${COMPILE.cc} $(AM_CPPFLAGS) $(AM_CXXFLAGS) -o $@ $<
${ARCH}/%.o: %.cpp
- ${COMPILE.cc} -o $@ $<
+ ${COMPILE.cc} $(AM_CPPFLAGS) $(AM_CXXFLAGS) -o $@ $<
${ARCH}/%.o: %.cxx
- ${COMPILE.cc} -o $@ $<
+ ${COMPILE.cc} $(AM_CPPFLAGS) $(AM_CXXFLAGS) -o $@ $<
${ARCH}/%.o: %.C
- ${COMPILE.cc} -o $@ $<
+ ${COMPILE.cc} $(AM_CPPFLAGS) $(AM_CXXFLAGS) -o $@ $<
${ARCH}/%.o: %.S
- ${COMPILE.S} -DASM -o $@ $<
+ ${COMPILE.S} $(AM_CPPFLAGS) -DASM -o $@ $<
# Make foo.rel from foo.o
${ARCH}/%.rel: ${ARCH}/%.o
diff --git a/c/src/make/directory.cfg b/c/src/make/directory.cfg
index c3efc38bf0..b9faa17db9 100644
--- a/c/src/make/directory.cfg
+++ b/c/src/make/directory.cfg
@@ -14,7 +14,7 @@ $(RECURSE_TARGETS):
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed -e s/-recursive// -e s/debug_// -e s/profile_// `; \
- list='$(SUB_DIRS)'; for subdir in $$list; do \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
local_target="$$target"; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
@@ -27,7 +27,7 @@ clean-recursive \
distclean-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
- rev=''; list='$(SUB_DIRS)'; for subdir in $$list; do \
+ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
test "$$subdir" = "." && dot_seen=yes; \
done; \
diff --git a/c/src/make/lib.cfg b/c/src/make/lib.cfg
index 6d170efed4..5c35c6236a 100644
--- a/c/src/make/lib.cfg
+++ b/c/src/make/lib.cfg
@@ -15,6 +15,4 @@ $(AR) $(ARFLAGS) $@ $(OBJS)
$(MKLIB) $@
endef
-CLEAN_ADDITIONS +=
-
.PRECIOUS: $(LIB)
diff --git a/c/src/make/main.cfg.in b/c/src/make/main.cfg.in
index 664b496d6f..3e1c8fc50e 100644
--- a/c/src/make/main.cfg.in
+++ b/c/src/make/main.cfg.in
@@ -66,6 +66,7 @@ FORCEIT:
FORCE:
+ifndef AUTOMAKE
distclean-generic:
-$(RM) Makefile .#* $(CONFIG_CLEAN_FILES)
-$(RM) -r $(CLOBBER_ADDITIONS)
@@ -73,6 +74,7 @@ distclean-generic:
clean-generic:
-$(RM) a.out core mon.out gmon.out
-$(RM) -r $(CLEAN_ADDITIONS)
+endif
.PHONY: $(RECURSE_TARGETS)
.PHONY: clean-generic