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 | |
---|
17 | MANAGER_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 | |
---|
23 | MANAGERS := $(patsubst message, msg, $(MANAGERS)) |
---|
24 | MANAGERS := $(patsubst multi_processor, mp, $(MANAGERS)) |
---|
25 | MANAGERS := $(patsubst partition, part, $(MANAGERS)) |
---|
26 | MANAGERS := $(patsubst rate_monotonic, rtmon, $(MANAGERS)) |
---|
27 | MANAGERS := $(patsubst semaphore, sem, $(MANAGERS)) |
---|
28 | MANAGERS := $(patsubst dual_ported_memory, dpmem, $(MANAGERS)) |
---|
29 | MANAGERS := $(patsubst extension, ext, $(MANAGERS)) |
---|
30 | |
---|
31 | # allow 'all' to mean all managers |
---|
32 | MANAGERS := $(patsubst all, $(MANAGER_LIST), $(MANAGERS)) |
---|
33 | |
---|
34 | # and finally rip out duplicates |
---|
35 | MANAGERS := $(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. |
---|
40 | # Useful for installing libraries. |
---|
41 | # |
---|
42 | |
---|
43 | LIBSUFFIX_OPTIMIZE_V= |
---|
44 | LIBSUFFIX_DEBUG_V=_g |
---|
45 | |
---|
46 | LIB_VARIANT=$(LIBSUFFIX_$(VARIANT_V)_V) |
---|
47 | LIBSUFFIX_VA = $(LIB_VARIANT).a |
---|
48 | |
---|
49 | # Pull in the desired "target" compiler |
---|
50 | # Programs built on the host use automake generated rules. |
---|
51 | # This will not change $(ARCH) -- binaries will still be place as per target |
---|
52 | include ${CONFIG.CC} |
---|
53 | ifeq (${DEPEND},$(wildcard ${DEPEND})) |
---|
54 | include ${DEPEND} # pull in dependencies if they exist |
---|
55 | endif |
---|
56 | |
---|
57 | ifndef AUTOMAKE |
---|
58 | # |
---|
59 | # Builtin targets for compilation variants |
---|
60 | # |
---|
61 | debug: |
---|
62 | $(MAKE) -f $(MAKEFILE) MAKEFILE=$(MAKEFILE) VARIANT=DEBUG |
---|
63 | endif |
---|
64 | |
---|
65 | # |
---|
66 | # VARIANT_VA will convert our ${ARCH} back into "" or "debug". |
---|
67 | # Handy when one makefile wants to hop over into a peer's tree and |
---|
68 | # build something "the same" way. |
---|
69 | # |
---|
70 | |
---|
71 | VARIANT-OPTIMIZE-v = |
---|
72 | VARIANT-DEBUG-v = debug |
---|
73 | |
---|
74 | VARIANT_VA = $(VARIANT-$(VARIANT_V)-v) |
---|
75 | |
---|
76 | # |
---|
77 | # TARGET_VA will convert $@ (expected to be 'debug' etc.) |
---|
78 | # into "" or "install" as appropriate. |
---|
79 | # Used for variant recursion. |
---|
80 | # |
---|
81 | |
---|
82 | TARGET_debug_V = all |
---|
83 | |
---|
84 | TARGET_VA = $(TARGET_$@_V) |
---|
85 | |
---|
86 | # |
---|
87 | # Builtin clean and distclean rules |
---|
88 | # Individual makefiles can add stuff via CLEAN_ADDITIONS and CLOBBER_ADDITIONS |
---|
89 | # If desperate to save something, they can override CLEAN_OS, CLEAN_CC, etc. |
---|
90 | # |
---|
91 | |
---|
92 | clean-am: clean-generic |
---|
93 | -$(RM) -r $(CLEAN_OS) $(CLEAN_CC) $(CLEAN_DEPEND) |
---|
94 | -$(RM) -r $(VARIANTS) |
---|
95 | |
---|
96 | distclean-am: distclean-generic clean-am |
---|
97 | -$(RM) -r $(CLOBBER_OS) $(CLOBBER_CC) $(CLOBBER_DEPEND) |
---|
98 | |
---|
99 | ifndef AUTOMAKE |
---|
100 | preinstall-am: |
---|
101 | preinstall: preinstall-am |
---|
102 | |
---|
103 | distclean: distclean-am |
---|
104 | -$(RM) ./config.status |
---|
105 | |
---|
106 | clean: clean-am |
---|
107 | |
---|
108 | .PHONY: distclean distclean-am |
---|
109 | .PHONY: clean clean-am |
---|
110 | endif |
---|