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

4.104.114.95
Last change on this file since e59d23ad was e59d23ad, checked in by Joel Sherrill <joel.sherrill@…>, on 09/09/08 at 16:30:35

2008-09-09 Joel Sherrill <joel.sherrill@…>

  • leaf.cfg, compilers/gcc-target-default.cfg: Remove use of AM_LDFLAGS. Ensure LDFLAGS works all the time. Clean up BSPs which defined their own make-exe rules inappropriately.
  • Property mode set to 100644
File size: 2.5 KB
Line 
1#
2#  $Id$
3#
4# make/leaf.cfg
5#
6#   Make(1) configuration file include'd by all leaf-node Makefiles
7#
8
9#
10# list of all known managers
11# This list is used, along with $(MANAGERS) (set by app makefile)
12#   to build the list of *not wanted* drivers.
13#
14# ref: target compiler config file for usage
15#
16
17MANAGER_LIST=barrier dpmem event io msg mp part
18MANAGER_LIST+=region sem signal timer rtmon ext
19
20# Convert *real* spellings in $(MANAGERS) (set
21#   in application makefile) to their "correct" name.
22# (I hate abbreviations :-)
23
24MANAGERS := $(patsubst message,            msg,   $(MANAGERS))
25MANAGERS := $(patsubst multi_processor,    mp,    $(MANAGERS))
26MANAGERS := $(patsubst partition,          part,  $(MANAGERS))
27MANAGERS := $(patsubst rate_monotonic,     rtmon, $(MANAGERS))
28MANAGERS := $(patsubst semaphore,          sem,   $(MANAGERS))
29MANAGERS := $(patsubst dual_ported_memory, dpmem, $(MANAGERS))
30MANAGERS := $(patsubst extension,          ext,   $(MANAGERS))
31
32# allow 'all' to mean all managers
33MANAGERS := $(patsubst all, $(MANAGER_LIST), $(MANAGERS))
34
35# and finally rip out duplicates
36MANAGERS := $(sort $(MANAGERS))
37
38# List (possibly empty) of required managers
39MANAGERS_REQUIRED=
40
41# Create a RTEMS executable based on MANAGERS which was set in
42#  app's Makefile
43
44MANAGERS_NOT_WANTED=$(filter-out $(MANAGERS) \
45        $(MANAGERS_REQUIRED), $(MANAGER_LIST))
46
47# Start file must be one of
48#    $(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o
49#    $(PROJECT_RELEASE)/lib/asmiface$(LIB_VARIANT).o
50# It defaults to start.o, but an app can override it.
51ifeq ($(START_BASE),)
52  START_FILE=
53else
54  START_FILE=$(PROJECT_RELEASE)/lib/$(START_BASE)$(LIB_VARIANT).o
55endif
56
57# Allow user to override link commands (to build a prom image, perhaps)
58ifndef LINKCMDS
59LINKCMDS=$(PROJECT_RELEASE)/lib/linkcmds
60endif
61
62## what to do about $(EXEEXT) --> $(EXEEXT)
63##    -o $(basename $@)$(EXEEXT)             OR
64##    -o $(basename $@)$(EXEEXT)                  OR
65
66DOWNEXT=.ralf
67
68define bsp-link-c
69        $(LINK.c) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
70            -o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS)
71endef
72
73define bsp-link-cxx
74        $(LINK.cc) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
75            -o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS)
76endef
77
78define default-bsp-post-link
79        $(NM) -g -n $@ > $(basename $@).num
80        $(SIZE) $@
81endef
82
83ifndef bsp-post-link
84  define bsp-post-link
85        $(default-bsp-post-link)
86        cp $(basename $@).exe $(basename $@)$(DOWNEXT)
87  endef
88endif
89
90define make-exe
91       $(bsp-link-c)
92       $(bsp-post-link)
93endef
94
95define make-cxx-exe
96       $(bsp-link-cxx)
97       $(bsp-post-link)
98endef
Note: See TracBrowser for help on using the repository browser.