summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
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