summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-04-03 14:44:39 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-04-03 14:44:39 +0000
commiteffc2c4e6b345b1333f2f9ec75ee540c76295ffe (patch)
treed94bf58697da92732107215a48898832716bc19f /make
parentPatch from Jay Kulpinski <jskulpin@eng01.gdds.com> that makes (diff)
downloadrtems-effc2c4e6b345b1333f2f9ec75ee540c76295ffe.tar.bz2
Patch rtems-rc-4.5.0-6-cvs.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
The patch contains: * build variants support * Reworked make-exe custom/*.cfg for all targets (Should be self-explanatory, may still be incomplete) * Several fixes to custom/*.cfgs related to setting debug flags * Fixes to some bsp_specs for BSPs which apparently have never been build with debugging before ;) * pc386.cfg fix attempts (cf. my mail from earlier today) * Updated ampolish (No need to run it, the patch contains the result from having applied it) Known bugs/deficiencies related to this work: * "make [clean|distclean]" support is still incomplete (e.g. "make clean" does not delete all Depends-o-*) * Completely untested for linux/posix and hppa. * Build failures of i960 BSPs (make VARIANT=DEBUG) - I guess, they are not related to this patch. * Successfully tested for all sh, sparc, i386, ppc, m68k BSPs (make VARIANT=DEBUG) * make VARIANT=PROFILE not supported by all BSPs (I don't care :) * make VARIANT=DEBUG failures below tests/ for some BSPs (e.g. gensh1), because of the tests's binaries being too large to fit into the target memory layout.
Diffstat (limited to 'make')
-rw-r--r--make/compilers/gcc-target-default.cfg6
-rw-r--r--make/custom/FreeBSD-posix.cfg2
-rw-r--r--make/custom/HPUX9-posix.cfg2
-rw-r--r--make/custom/Linux-posix.cfg2
-rw-r--r--make/custom/Solaris-posix.cfg2
-rw-r--r--make/custom/cvme961.cfg2
-rw-r--r--make/custom/dmv152.cfg2
-rw-r--r--make/custom/dmv177.cfg2
-rw-r--r--make/custom/efi332.cfg2
-rw-r--r--make/custom/efi68k.cfg2
-rw-r--r--make/custom/erc32.cfg2
-rw-r--r--make/custom/eth_comm.cfg2
-rw-r--r--make/custom/gen68302.cfg6
-rw-r--r--make/custom/gen68340.cfg36
-rw-r--r--make/custom/gen68360.cfg2
-rw-r--r--make/custom/gensh1.cfg3
-rw-r--r--make/custom/gensh2.cfg2
-rw-r--r--make/custom/helas403.cfg2
-rw-r--r--make/custom/i386ex.cfg2
-rw-r--r--make/custom/idp.cfg2
-rw-r--r--make/custom/mcp750.cfg3
-rw-r--r--make/custom/mvme136.cfg2
-rw-r--r--make/custom/mvme147.cfg2
-rw-r--r--make/custom/mvme162.cfg2
-rw-r--r--make/custom/mvme167.cfg6
-rw-r--r--make/custom/p4000.cfg2
-rw-r--r--make/custom/p4600.cfg10
-rw-r--r--make/custom/p4650.cfg2
-rw-r--r--make/custom/papyrus.cfg2
-rw-r--r--make/custom/pc386.cfg13
-rw-r--r--make/custom/ppcn_60x.cfg2
-rw-r--r--make/custom/psim.cfg2
-rw-r--r--make/custom/score603e.cfg2
-rw-r--r--make/custom/simhppa.cfg4
-rw-r--r--make/custom/ts_386ex.cfg2
35 files changed, 72 insertions, 67 deletions
diff --git a/make/compilers/gcc-target-default.cfg b/make/compilers/gcc-target-default.cfg
index 62757713d9..0be680898c 100644
--- a/make/compilers/gcc-target-default.cfg
+++ b/make/compilers/gcc-target-default.cfg
@@ -96,14 +96,18 @@ endif
# 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
@@ -210,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)
diff --git a/make/custom/FreeBSD-posix.cfg b/make/custom/FreeBSD-posix.cfg
index 99c111bf49..f15e790dff 100644
--- a/make/custom/FreeBSD-posix.cfg
+++ b/make/custom/FreeBSD-posix.cfg
@@ -53,7 +53,7 @@ define make-target-options
endef
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -ng $@ > $(basename $@).num
$(SIZE) $@
endef
diff --git a/make/custom/HPUX9-posix.cfg b/make/custom/HPUX9-posix.cfg
index 700f5f48f6..907505811f 100644
--- a/make/custom/HPUX9-posix.cfg
+++ b/make/custom/HPUX9-posix.cfg
@@ -59,7 +59,7 @@ define make-target-options
endef
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -ng $@ > $(basename $@).num
$(SIZE) $@
endef
diff --git a/make/custom/Linux-posix.cfg b/make/custom/Linux-posix.cfg
index 910dd70be2..b7e8e40060 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
- $(LINK.c) $(LDLIBS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -ng $@ > $(basename $@).num
$(SIZE) $@
endef
diff --git a/make/custom/Solaris-posix.cfg b/make/custom/Solaris-posix.cfg
index 3f3f1f29d2..ef7472b6a4 100644
--- a/make/custom/Solaris-posix.cfg
+++ b/make/custom/Solaris-posix.cfg
@@ -52,7 +52,7 @@ define make-target-options
endef
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -ng $@ > $(basename $@).num
$(SIZE) $@
endef
diff --git a/make/custom/cvme961.cfg b/make/custom/cvme961.cfg
index 0ea5cd1703..fca81ffb99 100644
--- a/make/custom/cvme961.cfg
+++ b/make/custom/cvme961.cfg
@@ -61,7 +61,7 @@ endef
else
define make-exe
- $(LINK.c) \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
$(LDLIBS) -o $@ \
$(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $@ > $(basename $@).num
diff --git a/make/custom/dmv152.cfg b/make/custom/dmv152.cfg
index a76804d6aa..80458060ef 100644
--- a/make/custom/dmv152.cfg
+++ b/make/custom/dmv152.cfg
@@ -67,7 +67,7 @@ define make-exe
endef
else
define make-exe
- $(LINK.c) $(LDLIBS) -o $(basename $@).nxe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).nxe \
$(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
diff --git a/make/custom/dmv177.cfg b/make/custom/dmv177.cfg
index 73f2042a5e..a0600ab5b0 100644
--- a/make/custom/dmv177.cfg
+++ b/make/custom/dmv177.cfg
@@ -106,7 +106,7 @@ HAS_RTC=yes
# $(LD_LIBS) \
# -Wl,-\( -Wl,-lc -Wl,-lrtemsall -Wl,-lgcc -Wl,-\)
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
-o $(basename $@).nxe $(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
diff --git a/make/custom/efi332.cfg b/make/custom/efi332.cfg
index 03d85b0e2a..08390ead1d 100644
--- a/make/custom/efi332.cfg
+++ b/make/custom/efi332.cfg
@@ -52,7 +52,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).nxe \
$(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
diff --git a/make/custom/efi68k.cfg b/make/custom/efi68k.cfg
index da24446a9a..8b8e6e6554 100644
--- a/make/custom/efi68k.cfg
+++ b/make/custom/efi68k.cfg
@@ -55,7 +55,7 @@ define make-exe
endef
else
define make-exe
- $(LINK.c) $(LDLIBS) -o $(basename $@).nxe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).nxe \
$(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
diff --git a/make/custom/erc32.cfg b/make/custom/erc32.cfg
index e75b6877e8..3196fcd492 100644
--- a/make/custom/erc32.cfg
+++ b/make/custom/erc32.cfg
@@ -87,7 +87,7 @@ define make-exe
endef
else
define make-exe
- $(LINK.c) $(LDLIBS) -o $(basename $@).exe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).exe \
$(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $(basename $@).exe > $(basename $@).num
$(SIZE) $(basename $@).exe
diff --git a/make/custom/eth_comm.cfg b/make/custom/eth_comm.cfg
index 89e1d663e0..9f44eb4e91 100644
--- a/make/custom/eth_comm.cfg
+++ b/make/custom/eth_comm.cfg
@@ -60,7 +60,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).exe \
$(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $@ > $(basename $@).num
$(SIZE) $@
diff --git a/make/custom/gen68302.cfg b/make/custom/gen68302.cfg
index 265c5b22a4..334d803fe5 100644
--- a/make/custom/gen68302.cfg
+++ b/make/custom/gen68302.cfg
@@ -58,10 +58,10 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ \
$(LINK_OBJS) $(LINK_LIBS)
- $(NM) -g -n $(basename $@).exe > $(basename $@).num
- $(SIZE) $(basename $@).exe
+ $(NM) -g -n $@ > $(basename $@).num
+ $(SIZE) $@
endef
endif
# Miscellaneous additions go here
diff --git a/make/custom/gen68340.cfg b/make/custom/gen68340.cfg
index f2c2f71fc8..7511e795e4 100644
--- a/make/custom/gen68340.cfg
+++ b/make/custom/gen68340.cfg
@@ -59,25 +59,25 @@ endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) \
- -o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS)
- $(NM) -g -n $(basename $@).exe > $(basename $@).num
- $(SIZE) $(basename $@).exe
- # if you want to make a prom image
- # m68k-rtems-objcopy --adjust-section-vma \
- # .data=`m68k-rtems-objdump --section-headers $(basename $@).exe | \
- # awk 'function h2d(x) { x=toupper(x); digits=length(x); s=0 ; \
- # for (p=digits; p>0; p--) \
- # s += (16^(p-1)) * ( index("0123456789ABCDEF",\
- # substr(x,1+digits-p,1)) -1 );\
- # return s } ;\
- # /\.text/ { base = $$4 ; size = $$3 };\
- # END { printf("0x%x", h2d(base) + h2d(size)) }'\
- # ` $(basename $@).exe
- # if you want to convert it to ieee
- # m68k-rtems-objcopy --output-target=ieee --debugging \
- # $(basename $@).exe $(basename $@).ieee
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
+ -o $@ $(LINK_OBJS) $(LINK_LIBS)
+ $(NM) -g -n $@ > $(basename $@).num
+ $(SIZE) $@
endef
+# if you want to make a prom image
+# m68k-rtems-objcopy --adjust-section-vma \
+# .data=`m68k-rtems-objdump --section-headers $(basename $@).exe | \
+# awk 'function h2d(x) { x=toupper(x); digits=length(x); s=0 ; \
+# for (p=digits; p>0; p--) \
+# s += (16^(p-1)) * ( index("0123456789ABCDEF",\
+# substr(x,1+digits-p,1)) -1 );\
+# return s } ;\
+# /\.text/ { base = $$4 ; size = $$3 };\
+# END { printf("0x%x", h2d(base) + h2d(size)) }'\
+# ` $(basename $@).exe
+# if you want to convert it to ieee
+# m68k-rtems-objcopy --output-target=ieee --debugging \
+# $(basename $@).exe $(basename $@).ieee
endif
diff --git a/make/custom/gen68360.cfg b/make/custom/gen68360.cfg
index c607d5acae..01b81ddd9c 100644
--- a/make/custom/gen68360.cfg
+++ b/make/custom/gen68360.cfg
@@ -79,7 +79,7 @@ endef
else
define make-exe
- $(LINK.c) $(LDLIBS) -o $@ \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ \
$(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $@ > $(basename $@).num
$(SIZE) $@
diff --git a/make/custom/gensh1.cfg b/make/custom/gensh1.cfg
index 1b52be1c2a..f5a2b0b489 100644
--- a/make/custom/gensh1.cfg
+++ b/make/custom/gensh1.cfg
@@ -71,7 +71,8 @@ define make-exe
endef
else
define make-exe
- $(LINK.c) -Wl,-Map,$(basename $@).map \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
+ -Wl,-Map,$(basename $@).map \
$(LDLIBS) -o $@ \
$(LINK_OBJS) $(LINK_LIBS)
$(NM) -n $@ > $(basename $@).num
diff --git a/make/custom/gensh2.cfg b/make/custom/gensh2.cfg
index 4ef24d80f5..ed83ed3946 100644
--- a/make/custom/gensh2.cfg
+++ b/make/custom/gensh2.cfg
@@ -81,7 +81,7 @@ define make-exe
endef
else
define make-exe
- $(LINK.c) -Wl,-Map,$(basename $@).map \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -Wl,-Map,$(basename $@).map \
$(LDLIBS) -o $@ \
$(LINK_OBJS) $(LINK_LIBS) -lstdc++
$(NM) -n $@ > $(basename $@).num
diff --git a/make/custom/helas403.cfg b/make/custom/helas403.cfg
index e78f93a954..974d3e79c5 100644
--- a/make/custom/helas403.cfg
+++ b/make/custom/helas403.cfg
@@ -94,7 +94,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) -o $(basename $@).exe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).exe \
$(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $@ > $(basename $@).num
$(SIZE) $@
diff --git a/make/custom/i386ex.cfg b/make/custom/i386ex.cfg
index 282c70912b..c18a3590eb 100644
--- a/make/custom/i386ex.cfg
+++ b/make/custom/i386ex.cfg
@@ -65,7 +65,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).coff \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).coff \
$(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).coff $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
diff --git a/make/custom/idp.cfg b/make/custom/idp.cfg
index af34965f40..7654bf9b56 100644
--- a/make/custom/idp.cfg
+++ b/make/custom/idp.cfg
@@ -60,7 +60,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).nxe \
$(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
diff --git a/make/custom/mcp750.cfg b/make/custom/mcp750.cfg
index 7d5501fa51..ddacd5549a 100644
--- a/make/custom/mcp750.cfg
+++ b/make/custom/mcp750.cfg
@@ -99,7 +99,8 @@ CFLAGS_DEBUG_V = -O1 -mmultiple -mstring -mstrict-align
# $(LD_LIBS) \
# -Wl,-\( -Wl,-lc -Wl,-lrtemsall -Wl,-lgcc -Wl,-\)
define make-exe
- $(LINK.c) $(LDLIBS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
+ -o $@ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $@ > $(basename $@).num
$(SIZE) $@
test -d ${PROJECT_RELEASE}/bin || mkdir ${PROJECT_RELEASE}/bin
diff --git a/make/custom/mvme136.cfg b/make/custom/mvme136.cfg
index e41efc479e..5ff5411dd3 100644
--- a/make/custom/mvme136.cfg
+++ b/make/custom/mvme136.cfg
@@ -56,7 +56,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).nxe \
$(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
diff --git a/make/custom/mvme147.cfg b/make/custom/mvme147.cfg
index bb6b567e0d..3e57706ed9 100644
--- a/make/custom/mvme147.cfg
+++ b/make/custom/mvme147.cfg
@@ -53,7 +53,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).nxe \
$(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
diff --git a/make/custom/mvme162.cfg b/make/custom/mvme162.cfg
index 66787178f6..93cf2b42b8 100644
--- a/make/custom/mvme162.cfg
+++ b/make/custom/mvme162.cfg
@@ -87,7 +87,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
-o $(basename $@).nxe $(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
diff --git a/make/custom/mvme167.cfg b/make/custom/mvme167.cfg
index 6b7032705d..78853bd3a4 100644
--- a/make/custom/mvme167.cfg
+++ b/make/custom/mvme167.cfg
@@ -76,10 +76,10 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ \
$(LINK_OBJS) $(LINK_LIBS)
- $(NM) -g -n $(basename $@).exe > $(basename $@).nm
- $(SIZE) $(basename $@).exe
+ $(NM) -g -n $@ > $(basename $@).nm
+ $(SIZE) $@
endef
endif
diff --git a/make/custom/p4000.cfg b/make/custom/p4000.cfg
index a5965f8124..ac970a8e6a 100644
--- a/make/custom/p4000.cfg
+++ b/make/custom/p4000.cfg
@@ -58,7 +58,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).exe \
$(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
$(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
diff --git a/make/custom/p4600.cfg b/make/custom/p4600.cfg
index 11de96e414..f4dff4dedd 100644
--- a/make/custom/p4600.cfg
+++ b/make/custom/p4600.cfg
@@ -70,13 +70,13 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) \
- -o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS)
- $(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
+ -o $@ $(LINK_OBJS) $(LINK_LIBS)
+ $(OBJCOPY) -O srec $@ $(basename $@).srec1
$(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
$(RM) $(basename $@).srec1
- $(NM) -n $(basename $@).exe > $(basename $@).num
- $(SIZE) $(basename $@).exe
+ $(NM) -n $@ > $(basename $@).num
+ $(SIZE) $@
endef
endif
diff --git a/make/custom/p4650.cfg b/make/custom/p4650.cfg
index 6b2ff786c2..e0f6cc58e0 100644
--- a/make/custom/p4650.cfg
+++ b/make/custom/p4650.cfg
@@ -69,7 +69,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).exe \
$(LINK_OBJS) $(LINK_LIBS) $(LD_LIBS)
$(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
$(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
diff --git a/make/custom/papyrus.cfg b/make/custom/papyrus.cfg
index b65536675c..e1637b4b96 100644
--- a/make/custom/papyrus.cfg
+++ b/make/custom/papyrus.cfg
@@ -88,7 +88,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) -o $(basename $@).exe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).exe \
$(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $@ > $(basename $@).num
$(SIZE) $@
diff --git a/make/custom/pc386.cfg b/make/custom/pc386.cfg
index b6edacea8d..a9b23ad1ab 100644
--- a/make/custom/pc386.cfg
+++ b/make/custom/pc386.cfg
@@ -90,8 +90,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -Wl,-Ttext,$(RELOCADDR) \
- -Wl,--oformat,elf32-i386 -o $(basename $@).obj \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -Wl,-Ttext,$(RELOCADDR) \
-o $(basename $@).obj \
$(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O elf32-i386 \
@@ -111,13 +110,12 @@ define make-exe
${PROJECT_RELEASE}/BootImgs/$${f}$(LIB_VARIANT).bt \
&& chmod 755 \
${PROJECT_RELEASE}/BootImgs/$${f}$(LIB_VARIANT).bt
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -Wl,-Ttext,$(RELOCADDR) \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -Wl,-Ttext,$(RELOCADDR) \
-o $@ $(LINK_OBJS) $(LINK_LIBS)
endef
define make-cxx-exe
- $(CXX) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -Wl,-Ttext,$(RELOCADDR) \
- -Wl,--oformat,elf32-i386 -o $(basename $@).obj \
- -o $(basename $@).obj \
+ $(LINK.cc) $(AM_CFLAGS) $(AM_CXXFLAGS) $(AM_LDFLAGS) \
+ -Wl,-Ttext,$(RELOCADDR) -o $(basename $@).obj \
$(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O elf32-i386 \
--remove-section=.rodata \
@@ -136,7 +134,8 @@ define make-cxx-exe
${PROJECT_RELEASE}/BootImgs/$${f}$(LIB_VARIANT).bt \
&& chmod 755 \
${PROJECT_RELEASE}/BootImgs/$${f}$(LIB_VARIANT).bt
- $(CXX) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -Wl,-Ttext,$(RELOCADDR) \
+ $(LINK.cc) $(AM_CFLAGS) $(AM_CXXFLAGS) $(AM_LDFLAGS) \
+ -Wl,-Ttext,$(RELOCADDR) \
-o $(basename $@).coff $(LINK_OBJS) $(LINK_LIBS)
endef
endif
diff --git a/make/custom/ppcn_60x.cfg b/make/custom/ppcn_60x.cfg
index 6c2ea5dcc3..89d8402400 100644
--- a/make/custom/ppcn_60x.cfg
+++ b/make/custom/ppcn_60x.cfg
@@ -93,7 +93,7 @@ CFLAGS_OPTIMIZE_V=-O0 -fno-keep-inline-functions -fvolatile-global -fvolatile
# $(LD_LIBS) \
# -Wl,-\( -Wl,-lc -Wl,-lrtemsall -Wl,-lgcc -Wl,-\)
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
-o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $(basename $@).exe > $(basename $@).num
$(SIZE) $(basename $@).exe
diff --git a/make/custom/psim.cfg b/make/custom/psim.cfg
index 4dbce3d394..3ec564d0ea 100644
--- a/make/custom/psim.cfg
+++ b/make/custom/psim.cfg
@@ -100,7 +100,7 @@ endef
else
# -Wl,--gc-sections
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) -o $(basename $@).exe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).exe \
$(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $@ > $(basename $@).num
$(SIZE) $@
diff --git a/make/custom/score603e.cfg b/make/custom/score603e.cfg
index 7dff53f7a2..bf5ce6faad 100644
--- a/make/custom/score603e.cfg
+++ b/make/custom/score603e.cfg
@@ -125,7 +125,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
-o $(basename $@).elf $(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $(basename $@).elf > $(basename $@).num
$(SIZE) $(basename $@).elf
diff --git a/make/custom/simhppa.cfg b/make/custom/simhppa.cfg
index ed5de71bda..2f222108c4 100644
--- a/make/custom/simhppa.cfg
+++ b/make/custom/simhppa.cfg
@@ -117,8 +117,8 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) $(GCC_LD_LOC_OPTIONS) \
- -o $(basename $@).exe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) $(GCC_LD_LOC_OPTIONS) \
+ -o $@ \
$(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $@ > $(basename $@).num
$(SIZE) $@
diff --git a/make/custom/ts_386ex.cfg b/make/custom/ts_386ex.cfg
index 6d87e8e9ae..aa73067866 100644
--- a/make/custom/ts_386ex.cfg
+++ b/make/custom/ts_386ex.cfg
@@ -76,7 +76,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).elf \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).elf \
$(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O binary $(basename $@).elf $(basename $@).exe
$(NM) -g -n $(basename $@).elf > $(basename $@).num