summaryrefslogtreecommitdiffstats
path: root/c/src/make
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-03-11 20:51:33 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-03-11 20:51:33 +0000
commit3617ebe66f7d8fb90299ac78cb0b461df25fb57e (patch)
tree271242e8b0825ef6a6e0894068a8b3cf1f3d0898 /c/src/make
parent2008-03-11 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-3617ebe66f7d8fb90299ac78cb0b461df25fb57e.tar.bz2
2008-03-11 Joel Sherrill <joel.sherrill@OARcorp.com>
* leaf.cfg: Switch to explicit .exe instead of EXEEXT to get it to work. Primarily move the executable transformation rules to leaf.cfg.
Diffstat (limited to 'c/src/make')
-rw-r--r--c/src/make/ChangeLog5
-rw-r--r--c/src/make/leaf.cfg36
2 files changed, 41 insertions, 0 deletions
diff --git a/c/src/make/ChangeLog b/c/src/make/ChangeLog
index e03a7839b5..9b8fd8a3fe 100644
--- a/c/src/make/ChangeLog
+++ b/c/src/make/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-11 Joel Sherrill <joel.sherrill@OARcorp.com>
+
+ * leaf.cfg: Switch to explicit .exe instead of EXEEXT to get it to
+ work. Primarily move the executable transformation rules to leaf.cfg.
+
2007-09-18 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile.inc.in: Add CXX and CXX_FOR_TARGET.
diff --git a/c/src/make/leaf.cfg b/c/src/make/leaf.cfg
index fec03c34d1..28932f86dc 100644
--- a/c/src/make/leaf.cfg
+++ b/c/src/make/leaf.cfg
@@ -58,3 +58,39 @@ endif
ifndef LINKCMDS
LINKCMDS=$(PROJECT_RELEASE)/lib/linkcmds
endif
+
+## what to do about $(EXEEXT) --> $(EXEEXT)
+## -o $(basename $@)$(EXEEXT) OR
+## -o $(basename $@)$(EXEEXT) OR
+
+DOWNEXT=.ralf
+
+define bsp-link-c
+ $(LINK.c) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) \
+ -o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS)
+endef
+
+define bsp-link-cxx
+ $(LINK.cc) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) \
+ -o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS)
+endef
+
+define default-bsp-post-link
+ $(NM) -g -n $@ > $(basename $@).num
+ $(SIZE) $@
+endef
+
+define bsp-post-link
+ $(default-bsp-post-link)
+ cp $(basename $@).exe $(basename $@)$(DOWNEXT)
+endef
+
+define make-exe
+ $(bsp-link-c)
+ $(bsp-post-link)
+endef
+
+define make-cxx-exe
+ $(bsp-link-cxx)
+ $(bsp-post-link)
+endef