Makefile
changeset 9 22fec39016f4
child 12 343721860361
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Makefile	Sun Mar 04 20:09:22 2007 +0000
     1.3 @@ -0,0 +1,46 @@
     1.4 +# Makefile for crosstool-NG.
     1.5 +# Copyright 2006 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
     1.6 +
     1.7 +# The project version
     1.8 +export PROJECTVERSION=0.0.1
     1.9 +
    1.10 +# This should eventually be computed if compiling out-of-tree is implemented
    1.11 +export CT_TOP_DIR=$(shell pwd)
    1.12 +
    1.13 +.PHONY: all
    1.14 +all: build
    1.15 +
    1.16 +HOST_CC = gcc -funsigned-char
    1.17 +
    1.18 +help::
    1.19 +	@echo  'Available make targets (*: default target):'
    1.20 +	@echo
    1.21 +
    1.22 +include $(CT_TOP_DIR)/kconfig/Makefile
    1.23 +#include $(CT_TOP_DIR)/samples/Makefile
    1.24 +
    1.25 +help::
    1.26 +	@echo  'Build targets:'
    1.27 +	@echo  '* build		  - Build the toolchain'
    1.28 +	@echo  '  clean		  - Remove generated files'
    1.29 +	@echo  '  distclean	  - Remove generated files and configuration'
    1.30 +
    1.31 +include $(CT_TOP_DIR)/tools/Makefile
    1.32 +
    1.33 +.config: config/*.in
    1.34 +	@make menuconfig
    1.35 +	@# Because exiting menuconfig without saving is not an error to menuconfig
    1.36 +	@test -f .config
    1.37 +
    1.38 +# Actual build
    1.39 +build: .config
    1.40 +	@$(CT_TOP_DIR)/scripts/crosstool.sh
    1.41 +
    1.42 +.PHONY: clean
    1.43 +clean::
    1.44 +	@rm -f .crosstool.config
    1.45 +
    1.46 +.PHONY: distclean
    1.47 +distclean:: clean
    1.48 +	@rm -f .config* ..config.tmp
    1.49 +