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