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_optimize_V = OPTIMIZE |
---|
35 | VARIANT_debug_V = DEBUG |
---|
36 | |
---|
37 | VARIANT_V = $(VARIANT_$(VARIANT)_V) |
---|
38 | |
---|
39 | ## Setup the variant build subdirectory |
---|
40 | ARCH_OPTIMIZE_V = o-optimize |
---|
41 | ARCH_DEBUG_V = o-debug |
---|
42 | |
---|
43 | ARCH__V = $(ARCH_OPTIMIZE_V) |
---|
44 | ARCH = $(ARCH_$(VARIANT_V)_V) |
---|
45 | |
---|
46 | $(ARCH): |
---|
47 | test -d ${ARCH} || mkdir $(ARCH) |
---|
48 | # |
---|
49 | # Default makefile name |
---|
50 | # May be overridden by command line macro assignment |
---|
51 | # |
---|
52 | |
---|
53 | MAKEFILE=Makefile |
---|
54 | |
---|
55 | # |
---|
56 | # Target variant names |
---|
57 | # |
---|
58 | TARGET_VARIANTS = optimize debug |
---|
59 | |
---|
60 | # |
---|
61 | # Generate list of object directories: o-optimize, o-debug |
---|
62 | # |
---|
63 | VARIANTS=${TARGET_VARIANTS:%=o-%} |
---|
64 | |
---|
65 | # |
---|
66 | # List of "recursion-able" targets for directory Makefiles |
---|
67 | # |
---|
68 | |
---|
69 | RECURSE_TARGETS=all depend install \ |
---|
70 | preinstall-recursive \ |
---|
71 | $(TARGET_VARIANTS) |
---|
72 | |
---|
73 | ifndef AUTOMAKE |
---|
74 | distclean-generic: |
---|
75 | -$(RM) .#* $(CONFIG_CLEAN_FILES) |
---|
76 | -$(RM) -r $(CLOBBER_ADDITIONS) |
---|
77 | |
---|
78 | clean-generic: |
---|
79 | -$(RM) a.out core mon.out gmon.out |
---|
80 | -$(RM) -r $(CLEAN_ADDITIONS) |
---|
81 | endif |
---|
82 | |
---|
83 | .PHONY: $(RECURSE_TARGETS) |
---|
84 | .PHONY: clean-generic |
---|
85 | .PHONY: distclean-generic |
---|