[bffb938] | 1 | # |
---|
| 2 | # $Id$ |
---|
| 3 | # |
---|
| 4 | # make/main.cfg |
---|
| 5 | # |
---|
| 6 | # Make(1) configuration file include'd by all Makefile's |
---|
| 7 | # |
---|
| 8 | |
---|
[393d271] | 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 | |
---|
[bffb938] | 17 | # |
---|
| 18 | # where things are relative to PROJECT_ROOT; shouldn't need to change, |
---|
| 19 | # but could be overridden in custom files. |
---|
| 20 | # |
---|
| 21 | |
---|
[1db8d62f] | 22 | PROJECT_RELEASE=$(exec_prefix)/$(RTEMS_BSP) |
---|
[d74fdb5] | 23 | PROJECT_BIN=$(PROJECT_ROOT)/bin |
---|
[bffb938] | 24 | PROJECT_INCLUDE=$(PROJECT_RELEASE)/lib/include |
---|
| 25 | PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools |
---|
| 26 | |
---|
[393d271] | 27 | ## translate VARIANT into VARIANT_V |
---|
[c2646c8] | 28 | ifeq ($(VARIANT),) |
---|
[393d271] | 29 | VARIANT = OPTIMIZE |
---|
[c2646c8] | 30 | endif |
---|
[bffb938] | 31 | |
---|
[393d271] | 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 |
---|
[bffb938] | 38 | |
---|
[393d271] | 39 | VARIANT_V = $(VARIANT_$(VARIANT)_V) |
---|
[bffb938] | 40 | |
---|
[393d271] | 41 | ## Setup the variant build subdirectory |
---|
| 42 | ARCH_OPTIMIZE_V = o-optimize |
---|
| 43 | ARCH_DEBUG_V = o-debug |
---|
| 44 | ARCH_PROFILE_V = o-profile |
---|
[bffb938] | 45 | |
---|
[393d271] | 46 | ARCH__V = $(ARCH_OPTIMIZE_V) |
---|
| 47 | ARCH = $(ARCH_$(VARIANT_V)_V) |
---|
| 48 | |
---|
| 49 | $(ARCH): |
---|
| 50 | test -d ${ARCH} || mkdir $(ARCH) |
---|
[bffb938] | 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 | # |
---|
[d6c83529] | 61 | TARGET_VARIANTS = optimize debug profile |
---|
[bffb938] | 62 | |
---|
| 63 | # |
---|
[d6c83529] | 64 | # Generate list of object directories: o-optimize, o-debug, o-profile |
---|
[bffb938] | 65 | # |
---|
[d6c83529] | 66 | VARIANTS=${TARGET_VARIANTS:%=o-%} |
---|
[bffb938] | 67 | |
---|
| 68 | # |
---|
| 69 | # List of "recursion-able" targets for directory Makefiles |
---|
| 70 | # |
---|
| 71 | |
---|
[29e68b75] | 72 | RECURSE_TARGETS=all depend install \ |
---|
[6693a68] | 73 | preinstall-recursive \ |
---|
[29e68b75] | 74 | $(TARGET_VARIANTS) |
---|
[bffb938] | 75 | |
---|
[9608320] | 76 | ifndef AUTOMAKE |
---|
[29e68b75] | 77 | distclean-generic: |
---|
[df49c60] | 78 | -$(RM) .#* $(CONFIG_CLEAN_FILES) |
---|
[29e68b75] | 79 | -$(RM) -r $(CLOBBER_ADDITIONS) |
---|
| 80 | |
---|
| 81 | clean-generic: |
---|
| 82 | -$(RM) a.out core mon.out gmon.out |
---|
| 83 | -$(RM) -r $(CLEAN_ADDITIONS) |
---|
[9608320] | 84 | endif |
---|
[29e68b75] | 85 | |
---|
| 86 | .PHONY: $(RECURSE_TARGETS) |
---|
| 87 | .PHONY: clean-generic |
---|
| 88 | .PHONY: distclean-generic |
---|