Makefile
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon May 07 09:04:02 2007 +0000 (2007-05-07)
changeset 63 89b41dbffe8d
parent 44 1bfe65e14402
child 65 312fe9ff8370
permissions -rw-r--r--
Merge the save-sample branch to trunk:
- reorder most of the environment setup,
- geting, extracting and patching are now components' sub-actions,
- save the current config as a sample to be used as a pre-configured target.
yann@1
     1
# Makefile for crosstool-NG.
yann@1
     2
# Copyright 2006 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
yann@1
     3
yann@1
     4
# The project version
yann@33
     5
export PROJECTVERSION=0.0.2-svn
yann@1
     6
yann@1
     7
# This should eventually be computed if compiling out-of-tree is implemented
yann@1
     8
export CT_TOP_DIR=$(shell pwd)
yann@1
     9
yann@1
    10
.PHONY: all
yann@25
    11
all: _ct_build
yann@1
    12
yann@1
    13
HOST_CC = gcc -funsigned-char
yann@1
    14
yann@1
    15
help::
yann@63
    16
	@echo  'Available make targets:'
yann@1
    17
	@echo
yann@1
    18
yann@1
    19
include $(CT_TOP_DIR)/kconfig/Makefile
yann@63
    20
include $(CT_TOP_DIR)/samples/Makefile
yann@1
    21
yann@1
    22
help::
yann@1
    23
	@echo  'Build targets:'
yann@19
    24
	@echo  '* build          - Build the toolchain'
yann@19
    25
	@echo  '  clean          - Remove generated files'
yann@31
    26
	@echo  '  distclean      - Remove generated files, configuration and build directories'
yann@1
    27
yann@1
    28
include $(CT_TOP_DIR)/tools/Makefile
yann@1
    29
yann@63
    30
help::
yann@63
    31
	@echo  'Execute "make" or "make all" to build all targets marked with [*]'
yann@63
    32
yann@44
    33
.config: $(shell find $(CT_TOP_DIR)/config -type f -name '*.in')
yann@1
    34
	@make menuconfig
yann@1
    35
	@# Because exiting menuconfig without saving is not an error to menuconfig
yann@1
    36
	@test -f .config
yann@1
    37
yann@1
    38
# Actual build
yann@25
    39
_ct_build: .config
yann@1
    40
	@$(CT_TOP_DIR)/scripts/crosstool.sh
yann@1
    41
yann@1
    42
.PHONY: distclean
yann@1
    43
distclean:: clean
yann@1
    44
	@rm -f .config* ..config.tmp
yann@31
    45
	@rm -rf "$(CT_TOP_DIR)/build"