summaryrefslogtreecommitdiffstats
path: root/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 /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 'make')
-rw-r--r--make/README4
-rw-r--r--make/Templates/Makefile.dir2
-rw-r--r--make/compilers/gcc-target-default.cfg14
-rw-r--r--make/custom/Linux-posix.cfg2
-rw-r--r--make/custom/erc32.cfg5
-rw-r--r--make/directory.cfg4
-rw-r--r--make/lib.cfg2
-rw-r--r--make/main.cfg2
8 files changed, 16 insertions, 19 deletions
diff --git a/make/README b/make/README
index 8a1c7157df..911d2b8aea 100644
--- a/make/README
+++ b/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/make/Templates/Makefile.dir b/make/Templates/Makefile.dir
index e70d40c0cb..aa5a9c0b2f 100644
--- a/make/Templates/Makefile.dir
+++ b/make/Templates/Makefile.dir
@@ -5,5 +5,5 @@
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
include $(RTEMS_ROOT)/make/directory.cfg
-SUB_DIRS=a b c your-directories-go-here
+SUBDIRS=a b c your-directories-go-here
diff --git a/make/compilers/gcc-target-default.cfg b/make/compilers/gcc-target-default.cfg
index f91c2a6e31..92ba1637ce 100644
--- a/make/compilers/gcc-target-default.cfg
+++ b/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/make/custom/Linux-posix.cfg b/make/custom/Linux-posix.cfg
index 4b84c2b3cb..910dd70be2 100644
--- a/make/custom/Linux-posix.cfg
+++ b/make/custom/Linux-posix.cfg
@@ -55,7 +55,7 @@ define make-target-options
endef
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
+ $(LINK.c) $(LDLIBS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -ng $@ > $(basename $@).num
$(SIZE) $@
endef
diff --git a/make/custom/erc32.cfg b/make/custom/erc32.cfg
index 47f5f091fd..e75b6877e8 100644
--- a/make/custom/erc32.cfg
+++ b/make/custom/erc32.cfg
@@ -28,9 +28,6 @@ endif
# -O4 is ok for RTEMS
CFLAGS_OPTIMIZE_V=-O4
-# Override default start file
-START_BASE=startsis
-
# This makes the target dependent options file
# NDEBUG (C library)
@@ -90,7 +87,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
+ $(LINK.c) $(LDLIBS) -o $(basename $@).exe \
$(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $(basename $@).exe > $(basename $@).num
$(SIZE) $(basename $@).exe
diff --git a/make/directory.cfg b/make/directory.cfg
index c3efc38bf0..b9faa17db9 100644
--- a/make/directory.cfg
+++ b/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/make/lib.cfg b/make/lib.cfg
index 6d170efed4..5c35c6236a 100644
--- a/make/lib.cfg
+++ b/make/lib.cfg
@@ -15,6 +15,4 @@ $(AR) $(ARFLAGS) $@ $(OBJS)
$(MKLIB) $@
endef
-CLEAN_ADDITIONS +=
-
.PRECIOUS: $(LIB)
diff --git a/make/main.cfg b/make/main.cfg
index 9808816a9d..1a050d34ab 100644
--- a/make/main.cfg
+++ b/make/main.cfg
@@ -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