Makefile
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed May 23 21:40:57 2007 +0000 (2007-05-23)
changeset 130 9d98c59aa1c3
parent 121 82e69d88119b
child 135 b2695c2f1919
permissions -rw-r--r--
Correctly handle the log level overide in scripts/tarball.sh.
     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 export CT_RESTART=$(RESTART)
    13 
    14 .PHONY: all
    15 all: build
    16 
    17 HOST_CC = gcc -funsigned-char
    18 
    19 help::
    20 	@echo  'Available make targets:'
    21 	@echo
    22 
    23 include $(CT_TOP_DIR)/kconfig/Makefile
    24 include $(CT_TOP_DIR)/samples/Makefile
    25 
    26 help::
    27 	@echo  'Build targets:'
    28 	@echo  '* build          - Build the 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  'Distribution targets:'
    36 	@echo  '  tarball        - Build a tarball of the configured toolchain'
    37 	@echo
    38 	@echo  'Execute "make" or "make all" to build all targets marked with [*]'
    39 	@echo  'Pass RESTART=<step> to restart a previously saved step (read doc first!)'
    40 
    41 .config: $(CONFIG_FILES) $(CT_TOP_DIR)/config/debug.in
    42 	@make oldconfig
    43 
    44 # Actual build
    45 build: .config
    46 	@$(CT_TOP_DIR)/scripts/crosstool.sh
    47 
    48 .PHONY: tarball
    49 tarball:
    50 	@$(CT_TOP_DIR)/scripts/tarball.sh
    51 
    52 .PHONY: distclean
    53 distclean:: clean
    54 	@rm -f .config* ..config.tmp
    55 	@rm -rf "$(CT_TOP_DIR)/targets"