Makefile
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun May 27 20:22:06 2007 +0000 (2007-05-27)
changeset 136 22b5ef41df97
parent 135 b2695c2f1919
child 147 39e4ef7d6d8d
permissions -rw-r--r--
Merge the NPTL stuff.
That still leaves the linuxthreads stuff broken, but it was just before. I don't care anyway. Time to fix that later...
     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  'Environement variables:'
    45 	@echo  '  STOP           - Stop the build just after this step'
    46 	@echo  '  RESTART        - Restart the build just before this step'
    47 	@echo
    48 	@echo  'Execute "make" or "make all" to build all targets marked with [*]'
    49 
    50 .config: $(CONFIG_FILES) $(CT_TOP_DIR)/config/debug.in
    51 	@make oldconfig
    52 
    53 # Actual build
    54 build: .config
    55 	@$(CT_TOP_DIR)/scripts/crosstool.sh
    56 
    57 .PHONY: tarball
    58 tarball:
    59 	@$(CT_TOP_DIR)/scripts/tarball.sh
    60 
    61 .PHONY: distclean
    62 distclean:: clean
    63 	@rm -f .config* ..config.tmp
    64 	@rm -f log.*
    65 	@rm -rf "$(CT_TOP_DIR)/targets"