2007-02-24 11:00:05 +00:00
|
|
|
# Makefile for crosstool-NG.
|
|
|
|
# Copyright 2006 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
|
|
|
|
|
|
|
|
# The project version
|
2007-04-10 16:19:53 +00:00
|
|
|
export PROJECTVERSION=0.0.2-svn
|
2007-02-24 11:00:05 +00:00
|
|
|
|
|
|
|
# This should eventually be computed if compiling out-of-tree is implemented
|
|
|
|
export CT_TOP_DIR=$(shell pwd)
|
|
|
|
|
|
|
|
.PHONY: all
|
2007-04-10 15:49:38 +00:00
|
|
|
all: _ct_build
|
2007-02-24 11:00:05 +00:00
|
|
|
|
|
|
|
HOST_CC = gcc -funsigned-char
|
|
|
|
|
|
|
|
help::
|
|
|
|
@echo 'Available make targets (*: default target):'
|
|
|
|
@echo
|
|
|
|
|
|
|
|
include $(CT_TOP_DIR)/kconfig/Makefile
|
|
|
|
|
|
|
|
help::
|
|
|
|
@echo 'Build targets:'
|
2007-03-12 18:59:31 +00:00
|
|
|
@echo '* build - Build the toolchain'
|
|
|
|
@echo ' clean - Remove generated files'
|
2007-04-10 16:17:39 +00:00
|
|
|
@echo ' distclean - Remove generated files, configuration and build directories'
|
2007-02-24 11:00:05 +00:00
|
|
|
|
|
|
|
include $(CT_TOP_DIR)/tools/Makefile
|
|
|
|
|
2007-04-18 17:35:04 +00:00
|
|
|
.config: $(shell find $(CT_TOP_DIR)/config -type f -name '*.in')
|
2007-02-24 11:00:05 +00:00
|
|
|
@make menuconfig
|
|
|
|
@# Because exiting menuconfig without saving is not an error to menuconfig
|
|
|
|
@test -f .config
|
|
|
|
|
|
|
|
# Actual build
|
2007-04-10 15:49:38 +00:00
|
|
|
_ct_build: .config
|
2007-02-24 11:00:05 +00:00
|
|
|
@$(CT_TOP_DIR)/scripts/crosstool.sh
|
|
|
|
|
|
|
|
.PHONY: distclean
|
|
|
|
distclean:: clean
|
|
|
|
@rm -f .config* ..config.tmp
|
2007-04-10 16:17:39 +00:00
|
|
|
@rm -rf "$(CT_TOP_DIR)/build"
|