1 | # |
---|
2 | # $Id$ |
---|
3 | # |
---|
4 | # make/main.cfg |
---|
5 | # |
---|
6 | # Make(1) configuration file include'd by all Makefile's |
---|
7 | # |
---|
8 | |
---|
9 | # |
---|
10 | # Initial target for make(1) |
---|
11 | # Once this is established we can safely include other targets |
---|
12 | # within this make-include file. |
---|
13 | # |
---|
14 | |
---|
15 | default_target: all |
---|
16 | |
---|
17 | # |
---|
18 | # where things are relative to PROJECT_ROOT; shouldn't need to change, |
---|
19 | # but could be overridden in custom files. |
---|
20 | # |
---|
21 | |
---|
22 | PROJECT_RELEASE=$(exec_prefix)/$(RTEMS_BSP) |
---|
23 | PROJECT_BIN=$(PROJECT_ROOT)/bin |
---|
24 | PROJECT_INCLUDE=$(PROJECT_RELEASE)/lib/include |
---|
25 | PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools |
---|
26 | |
---|
27 | ## translate VARIANT into VARIANT_V |
---|
28 | ifeq ($(VARIANT),) |
---|
29 | VARIANT = OPTIMIZE |
---|
30 | endif |
---|
31 | |
---|
32 | VARIANT_OPTIMIZE_V = OPTIMIZE |
---|
33 | VARIANT_DEBUG_V = DEBUG |
---|
34 | VARIANT_PROFILE_V = PROFILE |
---|
35 | VARIANT_optimize_V = OPTIMIZE |
---|
36 | VARIANT_debug_V = DEBUG |
---|
37 | VARIANT_profile_V = PROFILE |
---|
38 | |
---|
39 | VARIANT_V = $(VARIANT_$(VARIANT)_V) |
---|
40 | |
---|
41 | ## Setup the variant build subdirectory |
---|
42 | ARCH_OPTIMIZE_V = o-optimize |
---|
43 | ARCH_DEBUG_V = o-debug |
---|
44 | ARCH_PROFILE_V = o-profile |
---|
45 | |
---|
46 | ARCH__V = $(ARCH_OPTIMIZE_V) |
---|
47 | ARCH = $(ARCH_$(VARIANT_V)_V) |
---|
48 | |
---|
49 | $(ARCH): |
---|
50 | test -d ${ARCH} || mkdir $(ARCH) |
---|
51 | # |
---|
52 | # Default makefile name |
---|
53 | # May be overridden by command line macro assignment |
---|
54 | # |
---|
55 | |
---|
56 | MAKEFILE=Makefile |
---|
57 | |
---|
58 | # |
---|
59 | # Target variant names |
---|
60 | # |
---|
61 | TARGET_VARIANTS = optimize debug profile |
---|
62 | |
---|
63 | # |
---|
64 | # Generate list of object directories: o-optimize, o-debug, o-profile |
---|
65 | # |
---|
66 | VARIANTS=${TARGET_VARIANTS:%=o-%} |
---|
67 | |
---|
68 | # |
---|
69 | # List of "recursion-able" targets for directory Makefiles |
---|
70 | # |
---|
71 | |
---|
72 | RECURSE_TARGETS=all depend install \ |
---|
73 | preinstall-recursive \ |
---|
74 | $(TARGET_VARIANTS) |
---|
75 | |
---|
76 | ifndef AUTOMAKE |
---|
77 | distclean-generic: |
---|
78 | -$(RM) .#* $(CONFIG_CLEAN_FILES) |
---|
79 | -$(RM) -r $(CLOBBER_ADDITIONS) |
---|
80 | |
---|
81 | clean-generic: |
---|
82 | -$(RM) a.out core mon.out gmon.out |
---|
83 | -$(RM) -r $(CLEAN_ADDITIONS) |
---|
84 | endif |
---|
85 | |
---|
86 | .PHONY: $(RECURSE_TARGETS) |
---|
87 | .PHONY: clean-generic |
---|
88 | .PHONY: distclean-generic |
---|