source: rtems/c/src/make/leaf.cfg @ f2e0f8e

5
Last change on this file since f2e0f8e was efdda565, checked in by Nick Withers <nick.withers@…>, on Aug 9, 2013 at 4:18:17 AM

Use $(EXEEXT) [defaults to "exe"] to generate binaries

  • Property mode set to 100644
File size: 895 bytes
Line 
1# make/leaf.cfg
2#
3#   Make(1) configuration file include'd by all leaf-node Makefiles
4#
5
6# Allow user to override link commands (to build a prom image, perhaps)
7ifndef LINKCMDS
8LINKCMDS=$(PROJECT_RELEASE)/lib/linkcmds
9endif
10
11EXEEXT?=.exe
12DOWNEXT?=.ralf
13
14define bsp-link-c
15        $(LINK.c) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) \
16            -o $(basename $@)$(EXEEXT) $(LINK_OBJS) $(LINK_LIBS)
17endef
18
19define bsp-link-cxx
20        $(LINK.cc) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) \
21            -o $(basename $@)$(EXEEXT) $(LINK_OBJS) $(LINK_LIBS)
22endef
23
24define default-bsp-post-link
25        $(NM) -g -n $@ > $(basename $@).num
26        $(SIZE) $@
27endef
28
29ifndef bsp-post-link
30  define bsp-post-link
31        $(default-bsp-post-link)
32        cp $(basename $@)$(EXEEXT) $(basename $@)$(DOWNEXT)
33  endef
34endif
35
36define make-exe
37       $(bsp-link-c)
38       $(bsp-post-link)
39endef
40
41define make-cxx-exe
42       $(bsp-link-cxx)
43       $(bsp-post-link)
44endef
Note: See TracBrowser for help on using the repository browser.