source: rtems/make/leaf.cfg @ 581c3117

4.104.114.84.95
Last change on this file since 581c3117 was c2646c8, checked in by Joel Sherrill <joel.sherrill@…>, on 11/18/02 at 00:42:53

2002-11-17 Joel Sherrill <joel@…>

  • leaf.cfg, main.cfg, compilers/gcc-target-default.cfg: Make build variants work for user applications post install.
  • Property mode set to 100644
File size: 3.0 KB
RevLine 
[bffb938]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=dpmem event io msg mp part region sem signal timer rtmon ext
18
19# Convert *real* spellings in $(MANAGERS) (set
20#   in application makefile) to their "correct" name.
21# (I hate abbreviations :-)
22
23MANAGERS := $(patsubst message,            msg,   $(MANAGERS))
24MANAGERS := $(patsubst multi_processor,    mp,    $(MANAGERS))
25MANAGERS := $(patsubst partition,          part,  $(MANAGERS))
26MANAGERS := $(patsubst rate_monotonic,     rtmon, $(MANAGERS))
27MANAGERS := $(patsubst semaphore,          sem,   $(MANAGERS))
28MANAGERS := $(patsubst dual_ported_memory, dpmem, $(MANAGERS))
29MANAGERS := $(patsubst extension,          ext,   $(MANAGERS))
30
31# allow 'all' to mean all managers
32MANAGERS := $(patsubst all, $(MANAGER_LIST), $(MANAGERS))
33
34# and finally rip out duplicates
35MANAGERS := $(sort $(MANAGERS))
36
[393d271]37#
38# LIBSUFFIX_VA, will "index" into LIBSUFF-*-v macros and
39#   convert our ${ARCH} back into .a or _g.a or _p.a based on debug or profile.
40#   Useful for installing libraries.
41#
42
43LIBSUFFIX_OPTIMIZE_V=
44LIBSUFFIX_DEBUG_V=_g
45LIBSUFFIX_PROFILE_V=_p
46
47LIB_VARIANT=$(LIBSUFFIX_$(VARIANT_V)_V)
48LIBSUFFIX_VA = $(LIB_VARIANT).a
49
[65a60cd]50# Pull in the desired "target" compiler
51# Programs built on the host use automake generated rules.
[bffb938]52# This will not change $(ARCH) -- binaries will still be place as per target
[d6c83529]53include ${CONFIG.CC}
[bffb938]54ifeq (${DEPEND},$(wildcard ${DEPEND}))
55include ${DEPEND}                    # pull in dependencies if they exist
56endif
57
[df49c60]58ifndef AUTOMAKE
[bffb938]59#
60# Builtin targets for compilation variants
61#
[29e68b75]62debug:
[c2646c8]63        $(MAKE) -f $(MAKEFILE) MAKEFILE=$(MAKEFILE) VARIANT=DEBUG
[bffb938]64
[29e68b75]65profile:
[c2646c8]66        $(MAKE) -f $(MAKEFILE) MAKEFILE=$(MAKEFILE) VARIANT=PROFILE
[df49c60]67endif
[bffb938]68
69#
70# VARIANT_VA will convert our ${ARCH} back into "" or "debug" or "profile".
71#   Handy when one makefile wants to hop over into a peer's tree and
72#   build something "the same" way.
73#
74
[393d271]75VARIANT-OPTIMIZE-v =
76VARIANT-DEBUG-v = debug
77VARIANT-PROFILE-v = profile
[bffb938]78
[393d271]79VARIANT_VA = $(VARIANT-$(VARIANT_V)-v)
[bffb938]80
81#
[29e68b75]82# TARGET_VA will convert $@ (expected to be 'debug' or 'profile' etc.)
[bffb938]83#   into "" or "install" as appropriate.
84#   Used for variant recursion.
85#
86
87TARGET_debug_V = all
88TARGET_profile_V = all
89
90TARGET_VA = $(TARGET_$@_V)
91
92#
[29e68b75]93# Builtin clean and distclean rules
[bffb938]94# Individual makefiles can add stuff via CLEAN_ADDITIONS and CLOBBER_ADDITIONS
95# If desperate to save something, they can override CLEAN_OS, CLEAN_CC, etc.
96#
97
[29e68b75]98clean-am: clean-generic
99        -$(RM) -r $(CLEAN_OS) $(CLEAN_CC) $(CLEAN_DEPEND)
100        -$(RM) -r $(VARIANTS)
[bffb938]101
[29e68b75]102distclean-am: distclean-generic clean-am
103        -$(RM) -r $(CLOBBER_OS) $(CLOBBER_CC) $(CLOBBER_DEPEND)
[6693a68]104
[df49c60]105ifndef AUTOMAKE
[6693a68]106preinstall-am:
107preinstall: preinstall-am
[29e68b75]108
109distclean: distclean-am
[7dd4054]110        -$(RM) ./config.status
111
[29e68b75]112clean: clean-am
113
114.PHONY: distclean distclean-am
115.PHONY: clean clean-am
[df49c60]116endif
Note: See TracBrowser for help on using the repository browser.