forked from Imagelibrary/rtems
Merged from 4.5.0-beta3a
This commit is contained in:
@@ -4,10 +4,7 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign 1.4
|
||||
|
||||
EXTRA_DIST = \
|
||||
gcc-no_bsp.cfg \
|
||||
gcc-portsw.cfg \
|
||||
gcc-target-default.cfg
|
||||
EXTRA_DIST = gcc-no_bsp.cfg gcc-portsw.cfg gcc-target-default.cfg
|
||||
|
||||
## -------------------------------------------------------
|
||||
include $(top_srcdir)/automake/local.am
|
||||
include $(top_srcdir)/automake/host.am
|
||||
|
||||
@@ -78,10 +78,6 @@ CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
|
||||
# debug flag; typically -g
|
||||
CFLAGS_DEBUG_V=-g -Wno-unused
|
||||
|
||||
# when debugging, optimize flag: typically empty
|
||||
# some compilers do allow optimization with their "-g"
|
||||
CFLAGS_DEBUG_OPTIMIZE_V=
|
||||
|
||||
# profile flag; use gprof(1)
|
||||
CFLAGS_PROFILE_V=-pg
|
||||
|
||||
@@ -211,10 +207,10 @@ ${ARCH}/%: %.sh
|
||||
$(CHMOD) +x $@
|
||||
|
||||
# Dependency files for use by gmake
|
||||
# NOTE: we don't put in $(TARGET_ARCH)
|
||||
# NOTE: we don't put them into $(ARCH)
|
||||
# so that 'make clean' doesn't blow it away
|
||||
|
||||
DEPEND=Depends-$(TARGET_ARCH:o-%=%)
|
||||
DEPEND=Depends-${ARCH}
|
||||
|
||||
CLEAN_DEPEND=$(DEPEND).tmp
|
||||
CLOBBER_DEPEND=$(DEPEND)
|
||||
|
||||
@@ -59,10 +59,6 @@ CFLAGS_OPTIMIZE_V=-Os
|
||||
# debug flag; typically -g
|
||||
CFLAGS_DEBUG_V=-g -O0 -DRTEMS_DEBUG -DSTACK_CHECKER_ON
|
||||
|
||||
# when debugging, optimize flag: typically empty
|
||||
# some compilers do allow optimization with their "-g"
|
||||
CFLAGS_DEBUG_OPTIMIZE_V=
|
||||
|
||||
# profile flag; use gprof(1)
|
||||
CFLAGS_PROFILE_V=
|
||||
|
||||
@@ -198,10 +194,10 @@ ${ARCH}/%: %.sh
|
||||
$(CHMOD) -f g+w $@
|
||||
|
||||
# Dependency files for use by gmake
|
||||
# NOTE: we don't put in $(TARGET_ARCH)
|
||||
# NOTE: we don't put them into $(ARCH)
|
||||
# so that 'make clean' doesn't blow it away
|
||||
|
||||
DEPEND=Depends-$(TARGET_ARCH:o-%=%)
|
||||
DEPEND=Depends-${ARCH}
|
||||
|
||||
CLEAN_DEPEND=$(DEPEND).tmp
|
||||
CLOBBER_DEPEND=$(DEPEND)
|
||||
|
||||
@@ -93,21 +93,21 @@ ifeq ($(RTEMS_USE_GCC272),no)
|
||||
CFLAGS_DEBUG_V+=-qrtems_debug
|
||||
endif
|
||||
|
||||
# when debugging, optimize flag: typically empty
|
||||
# some compilers do allow optimization with their "-g"
|
||||
CFLAGS_DEBUG_OPTIMIZE_V=-g
|
||||
|
||||
# profile flag; use gprof(1)
|
||||
CFLAGS_PROFILE_V=-pg
|
||||
|
||||
ifndef AUTOMAKE
|
||||
# default is to optimize
|
||||
CFLAGS_OPTIMIZE=$(CFLAGS_OPTIMIZE_V)
|
||||
endif
|
||||
|
||||
# dynamic libraries
|
||||
#CFLAGS_DYNAMIC_V=-fpic
|
||||
#ASFLAGS_DYNAMIC_V=
|
||||
|
||||
ifndef AUTOMAKE
|
||||
CFLAGS += $(CFLAGS_OPTIMIZE) $(CFLAGS_DEBUG) $(CFLAGS_PROFILE)
|
||||
endif
|
||||
|
||||
# List of library paths without -L
|
||||
LD_PATHS= $(PROJECT_RELEASE)/lib
|
||||
@@ -186,7 +186,7 @@ ${ARCH}/%.o: %.S
|
||||
|
||||
# Make foo.rel from foo.o
|
||||
${ARCH}/%.rel: ${ARCH}/%.o
|
||||
${LD} $(LDFLAGS_INCOMPLETE) -o $@ $^
|
||||
${make-rel}
|
||||
|
||||
# create $(ARCH)/pgm from pgm.sh
|
||||
${ARCH}/%: %.sh
|
||||
@@ -214,7 +214,7 @@ ifneq ($(words $(C_FILES) $(CC_FILES) $(S_FILES)), 0)
|
||||
# Replace foo.o with $(ARCH)/foo.o
|
||||
# Replace $(ARCH) value with string $(ARCH)
|
||||
# so that it will for debug and profile cases
|
||||
$(COMPILE.c) -M $^ | \
|
||||
$(COMPILE.c) $(AM_CPPFLAGS) $(AM_CFLAGS) -M $^ | \
|
||||
$(SED) -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \
|
||||
-e 's?$(ARCH)/?$$(ARCH)/?' >$(DEPEND).tmp
|
||||
$(MV) $(DEPEND).tmp $(DEPEND)
|
||||
@@ -289,7 +289,13 @@ ifndef LINKCMDS
|
||||
LINKCMDS=$(PROJECT_RELEASE)/lib/linkcmds
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(RTEMS_USE_GCC272),yes)
|
||||
define make-rel
|
||||
$(LD) $(LDFLAGS_INCOMPLETE) $(XLDFLAGS) -o $@ $^
|
||||
endef
|
||||
else
|
||||
define make-rel
|
||||
$(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
|
||||
-qnolinkcmds -nostdlib -Wl,-r $(XLDFLAGS) -o $@ $^
|
||||
endef
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user