source: rtems/make/leaf.cfg @ 393d271

4.104.114.84.9
Last change on this file since 393d271 was 393d271, checked in by Ralf Corsepius <ralf.corsepius@…>, on Nov 12, 2002 at 10:32:00 AM

2002-11-12 Ralf Corsepius <corsepiu@…>

  • custom/default.cfg: Remove RTEMS_BSP_SPECS. Remove reference to obsolete Makefile.
  • leaf.cfg: Various changes to LIBVARIANT processing.
  • main.cfg: Ditto.
  • Property mode set to 100644
File size: 3.3 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=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
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
50# Pull in the desired "target" compiler
51# Programs built on the host use automake generated rules.
52# This will not change $(ARCH) -- binaries will still be place as per target
53include ${CONFIG.CC}
54ifeq (${DEPEND},$(wildcard ${DEPEND}))
55include ${DEPEND}                    # pull in dependencies if they exist
56endif
57
58ifndef AUTOMAKE
59#
60# Builtin targets for compilation variants
61#
62debug:
63        $(MAKE) -f $(MAKEFILE) MAKEFILE=$(MAKEFILE) "ARCH=o-debug" \
64      "CFLAGS_DEBUG=$(CFLAGS_DEBUG_V)" \
65      "CXXFLAGS_DEBUG=$(CXXFLAGS_DEBUG_V)" \
66      "CFLAGS_OPTIMIZE=$(CFLAGS_OPTIMIZE_V)" \
67      "LDFLAGS_DEBUG=$(LDFLAGS_DEBUG_V)" $(TARGET_VA)
68
69profile:
70        $(MAKE) -f $(MAKEFILE) \
71      MAKEFILE=$(MAKEFILE) "ARCH=o-profile" \
72      "CFLAGS_PROFILE=$(CFLAGS_PROFILE_V)" \
73      "CXXFLAGS_PROFILE=$(CXXFLAGS_PROFILE_V)" \
74      "LDFLAGS_PROFILE=$(LDFLAGS_PROFILE_V)" $(TARGET_VA)
75endif
76
77#
78# VARIANT_VA will convert our ${ARCH} back into "" or "debug" or "profile".
79#   Handy when one makefile wants to hop over into a peer's tree and
80#   build something "the same" way.
81#
82
83VARIANT-OPTIMIZE-v =
84VARIANT-DEBUG-v = debug
85VARIANT-PROFILE-v = profile
86
87VARIANT_VA = $(VARIANT-$(VARIANT_V)-v)
88
89#
90# TARGET_VA will convert $@ (expected to be 'debug' or 'profile' etc.)
91#   into "" or "install" as appropriate.
92#   Used for variant recursion.
93#
94
95TARGET_debug_V = all
96TARGET_profile_V = all
97
98TARGET_VA = $(TARGET_$@_V)
99
100#
101# Builtin clean and distclean rules
102# Individual makefiles can add stuff via CLEAN_ADDITIONS and CLOBBER_ADDITIONS
103# If desperate to save something, they can override CLEAN_OS, CLEAN_CC, etc.
104#
105
106clean-am: clean-generic
107        -$(RM) -r $(CLEAN_OS) $(CLEAN_CC) $(CLEAN_DEPEND)
108        -$(RM) -r $(VARIANTS)
109
110distclean-am: distclean-generic clean-am
111        -$(RM) -r $(CLOBBER_OS) $(CLOBBER_CC) $(CLOBBER_DEPEND)
112
113ifndef AUTOMAKE
114preinstall-am:
115preinstall: preinstall-am
116
117distclean: distclean-am
118        -$(RM) ./config.status
119
120clean: clean-am
121
122.PHONY: distclean distclean-am
123.PHONY: clean clean-am
124endif
Note: See TracBrowser for help on using the repository browser.