Makefile
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon May 07 09:04:02 2007 +0000 (2007-05-07)
changeset 63 89b41dbffe8d
parent 44 1bfe65e14402
child 65 312fe9ff8370
permissions -rw-r--r--
Merge the save-sample branch to trunk:
- reorder most of the environment setup,
- geting, extracting and patching are now components' sub-actions,
- save the current config as a sample to be used as a pre-configured target.
     1 # Makefile for crosstool-NG.
     2 # Copyright 2006 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
     3 
     4 # The project version
     5 export PROJECTVERSION=0.0.2-svn
     6 
     7 # This should eventually be computed if compiling out-of-tree is implemented
     8 export CT_TOP_DIR=$(shell pwd)
     9 
    10 .PHONY: all
    11 all: _ct_build
    12 
    13 HOST_CC = gcc -funsigned-char
    14 
    15 help::
    16 	@echo  'Available make targets:'
    17 	@echo
    18 
    19 include $(CT_TOP_DIR)/kconfig/Makefile
    20 include $(CT_TOP_DIR)/samples/Makefile
    21 
    22 help::
    23 	@echo  'Build targets:'
    24 	@echo  '* build          - Build the toolchain'
    25 	@echo  '  clean          - Remove generated files'
    26 	@echo  '  distclean      - Remove generated files, configuration and build directories'
    27 
    28 include $(CT_TOP_DIR)/tools/Makefile
    29 
    30 help::
    31 	@echo  'Execute "make" or "make all" to build all targets marked with [*]'
    32 
    33 .config: $(shell find $(CT_TOP_DIR)/config -type f -name '*.in')
    34 	@make menuconfig
    35 	@# Because exiting menuconfig without saving is not an error to menuconfig
    36 	@test -f .config
    37 
    38 # Actual build
    39 _ct_build: .config
    40 	@$(CT_TOP_DIR)/scripts/crosstool.sh
    41 
    42 .PHONY: distclean
    43 distclean:: clean
    44 	@rm -f .config* ..config.tmp
    45 	@rm -rf "$(CT_TOP_DIR)/build"