forked from Imagelibrary/rtems
Merged from 4.5.0-beta3a
This commit is contained in:
@@ -4,12 +4,11 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign 1.4
|
||||
|
||||
rtems_makedir=$(prefix)/make
|
||||
rtems_make_compilersdir=$(rtems_makedir)/compilers
|
||||
rtems_makedir = $(prefix)/make
|
||||
rtems_make_compilersdir = $(rtems_makedir)/compilers
|
||||
|
||||
## At the moment all actively supported configurations
|
||||
## use gcc-target-default.cfg only.
|
||||
rtems_make_compilers_DATA= \
|
||||
gcc-target-default.cfg
|
||||
rtems_make_compilers_DATA = gcc-target-default.cfg
|
||||
|
||||
include $(top_srcdir)/../../../automake/local.am
|
||||
|
||||
@@ -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