Makefile
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue May 01 16:49:15 2007 +0000 (2007-05-01)
changeset 56 07a6a48962b7
parent 33 24f1e56e89a0
child 63 89b41dbffe8d
permissions -rw-r--r--
Merge patches sent by Robert P. J. Day <rpjday@mindspring.com>.
Warning: the buildroot folks purposedly removed the skip-comment patch but didn't really said why. Keeping it for the sake of having it in svn just in case (removing it will be easier thant not having it at all).
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@1
    16
	@echo  'Available make targets (*: default target):'
yann@1
    17
	@echo
yann@1
    18
yann@1
    19
include $(CT_TOP_DIR)/kconfig/Makefile
yann@1
    20
yann@1
    21
help::
yann@1
    22
	@echo  'Build targets:'
yann@19
    23
	@echo  '* build          - Build the toolchain'
yann@19
    24
	@echo  '  clean          - Remove generated files'
yann@31
    25
	@echo  '  distclean      - Remove generated files, configuration and build directories'
yann@1
    26
yann@1
    27
include $(CT_TOP_DIR)/tools/Makefile
yann@1
    28
yann@44
    29
.config: $(shell find $(CT_TOP_DIR)/config -type f -name '*.in')
yann@1
    30
	@make menuconfig
yann@1
    31
	@# Because exiting menuconfig without saving is not an error to menuconfig
yann@1
    32
	@test -f .config
yann@1
    33
yann@1
    34
# Actual build
yann@25
    35
_ct_build: .config
yann@1
    36
	@$(CT_TOP_DIR)/scripts/crosstool.sh
yann@1
    37
yann@1
    38
.PHONY: distclean
yann@1
    39
distclean:: clean
yann@1
    40
	@rm -f .config* ..config.tmp
yann@31
    41
	@rm -rf "$(CT_TOP_DIR)/build"