Makefile
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Jun 01 20:06:22 2007 +0000 (2007-06-01)
changeset 150 9fd545714174
parent 136 22b5ef41df97
child 158 14f6a1d442f2
permissions -rw-r--r--
Rename two steps to their real names:
- cc_core_pass_1 is really cc_core_static,
- cc_core_pass_2 is really cc_core_shared.
     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_STOP=$(STOP)
    13 export CT_RESTART=$(RESTART)
    14 
    15 .PHONY: all
    16 all: build
    17 
    18 HOST_CC = gcc -funsigned-char
    19 
    20 help::
    21 	@echo  'Available make targets:'
    22 	@echo
    23 
    24 include $(CT_TOP_DIR)/kconfig/Makefile
    25 include $(CT_TOP_DIR)/samples/Makefile
    26 
    27 help::
    28 	@echo  'Build targets:'
    29 	@echo  '* build          - Build the toolchain'
    30 	@echo  '  clean          - Remove generated files'
    31 	@echo  '  distclean      - Remove generated files, configuration and build directories'
    32 
    33 include $(CT_TOP_DIR)/tools/Makefile
    34 include $(CT_TOP_DIR)/Makefile.steps
    35 
    36 help::
    37 	@echo  'Distribution targets:'
    38 	@echo  '  tarball        - Build a tarball of the configured toolchain'
    39 	@echo  ''
    40 	@echo  'Environement variables:'
    41 	@echo  '  STOP           - Stop the build just after this step'
    42 	@echo  '  RESTART        - Restart the build just before this step'
    43 	@echo  ''
    44 	@echo  'Execute "make" or "make all" to build all targets marked with [*]'
    45 
    46 .config: $(CONFIG_FILES) $(CT_TOP_DIR)/config/debug.in
    47 	@make oldconfig
    48 
    49 # Actual build
    50 build: .config
    51 	@$(CT_TOP_DIR)/scripts/crosstool.sh
    52 
    53 .PHONY: tarball
    54 tarball:
    55 	@$(CT_TOP_DIR)/scripts/tarball.sh
    56 
    57 .PHONY: distclean
    58 distclean:: clean
    59 	@rm -f .config* ..config.tmp
    60 	@rm -f log.*
    61 	@rm -rf "$(CT_TOP_DIR)/targets"