Makefile
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon May 14 19:28:14 2007 +0000 (2007-05-14)
changeset 94 f32c4f663805
parent 87 adb773fccc6b
child 96 aa1a9fbd6eb8
permissions -rw-r--r--
Quiet some messages from the configurators. We don't need them.
     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 export CT_TOP_DIR=$(shell pwd)
     8 
     9 # This is crosstool-ng version string
    10 export CT_VERSION=$(shell cat $(CT_TOP_DIR)/version)
    11 
    12 .PHONY: all
    13 all: build
    14 
    15 HOST_CC = gcc -funsigned-char
    16 
    17 help::
    18 	@echo  'Available make targets:'
    19 	@echo
    20 
    21 include $(CT_TOP_DIR)/kconfig/Makefile
    22 include $(CT_TOP_DIR)/samples/Makefile
    23 
    24 help::
    25 	@echo  'Build targets:'
    26 	@echo  '* build          - Build the toolchain'
    27 	@echo  '  tarball        - Build a tarball of the configured toolchain'
    28 	@echo  '  clean          - Remove generated files'
    29 	@echo  '  distclean      - Remove generated files, configuration and build directories'
    30 
    31 include $(CT_TOP_DIR)/tools/Makefile
    32 
    33 help::
    34 	@echo  'Execute "make" or "make all" to build all targets marked with [*]'
    35 
    36 .config: $(shell find $(CT_TOP_DIR)/config -type f -name '*.in')
    37 	@make menuconfig
    38 	@# Because exiting menuconfig without saving is not an error to menuconfig
    39 	@test -f .config
    40 
    41 # Actual build
    42 build: .config
    43 	@$(CT_TOP_DIR)/scripts/crosstool.sh
    44 
    45 .PHONY: tarball
    46 tarball:
    47 	@$(CT_TOP_DIR)/scripts/tarball.sh
    48 
    49 .PHONY: distclean
    50 distclean:: clean
    51 	@rm -f .config* ..config.tmp
    52 	@rm -rf "$(CT_TOP_DIR)/targets"