Makefile
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat May 12 09:54:29 2007 +0000 (2007-05-12)
changeset 87 adb773fccc6b
parent 85 ac2845835b13
child 88 f67b52e42fd1
permissions -rw-r--r--
New make target to save the configured nad built!) toolchain.
     1 # Makefile for crosstool-NG.
     2 # Copyright 2006 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
     3 
     4 # Don't print directory as we descend into them
     5 MAKEFLAGS += --no-print-directory
     6 
     7 # The project version
     8 export PROJECTVERSION=0.0.2-svn
     9 
    10 # This should eventually be computed if compiling out-of-tree is implemented
    11 export CT_TOP_DIR=$(shell pwd)
    12 
    13 .PHONY: all
    14 all: build
    15 
    16 HOST_CC = gcc -funsigned-char
    17 
    18 help::
    19 	@echo  'Available make targets:'
    20 	@echo
    21 
    22 include $(CT_TOP_DIR)/kconfig/Makefile
    23 include $(CT_TOP_DIR)/samples/Makefile
    24 
    25 help::
    26 	@echo  'Build targets:'
    27 	@echo  '* build          - Build the toolchain'
    28 	@echo  '  tarball        - Build a tarball of the configured toolchain'
    29 	@echo  '  clean          - Remove generated files'
    30 	@echo  '  distclean      - Remove generated files, configuration and build directories'
    31 
    32 include $(CT_TOP_DIR)/tools/Makefile
    33 
    34 help::
    35 	@echo  'Execute "make" or "make all" to build all targets marked with [*]'
    36 
    37 .config: $(shell find $(CT_TOP_DIR)/config -type f -name '*.in')
    38 	@make menuconfig
    39 	@# Because exiting menuconfig without saving is not an error to menuconfig
    40 	@test -f .config
    41 
    42 # Actual build
    43 build: .config
    44 	@$(CT_TOP_DIR)/scripts/crosstool.sh
    45 
    46 .PHONY: tarball
    47 tarball:
    48 	@$(CT_TOP_DIR)/scripts/tarball.sh
    49 
    50 .PHONY: distclean
    51 distclean:: clean
    52 	@rm -f .config* ..config.tmp
    53 	@rm -rf "$(CT_TOP_DIR)/targets"