2007-02-24 11:00:05 +00:00
|
|
|
# Makefile for crosstool-NG.
|
|
|
|
# Copyright 2006 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
|
|
|
|
|
2007-05-07 16:10:17 +00:00
|
|
|
# Don't print directory as we descend into them
|
|
|
|
MAKEFLAGS += --no-print-directory
|
|
|
|
|
2007-02-24 11:00:05 +00:00
|
|
|
export CT_TOP_DIR=$(shell pwd)
|
|
|
|
|
2007-05-13 19:03:49 +00:00
|
|
|
# This is crosstool-ng version string
|
|
|
|
export CT_VERSION=$(shell cat $(CT_TOP_DIR)/version)
|
|
|
|
|
2007-05-25 19:30:42 +00:00
|
|
|
export CT_STOP=$(STOP)
|
2007-05-22 20:46:07 +00:00
|
|
|
export CT_RESTART=$(RESTART)
|
|
|
|
|
2007-02-24 11:00:05 +00:00
|
|
|
.PHONY: all
|
2007-05-10 21:33:35 +00:00
|
|
|
all: build
|
2007-02-24 11:00:05 +00:00
|
|
|
|
|
|
|
HOST_CC = gcc -funsigned-char
|
|
|
|
|
|
|
|
help::
|
2007-05-07 09:04:02 +00:00
|
|
|
@echo 'Available make targets:'
|
2007-02-24 11:00:05 +00:00
|
|
|
@echo
|
|
|
|
|
|
|
|
include $(CT_TOP_DIR)/kconfig/Makefile
|
2007-05-07 09:04:02 +00:00
|
|
|
include $(CT_TOP_DIR)/samples/Makefile
|
2007-02-24 11:00:05 +00:00
|
|
|
|
|
|
|
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-05-27 20:22:06 +00:00
|
|
|
include $(CT_TOP_DIR)/Makefile.steps
|
2007-02-24 11:00:05 +00:00
|
|
|
|
2007-05-07 09:04:02 +00:00
|
|
|
help::
|
2007-05-23 21:39:18 +00:00
|
|
|
@echo 'Distribution targets:'
|
|
|
|
@echo ' tarball - Build a tarball of the configured toolchain'
|
2007-05-27 20:22:06 +00:00
|
|
|
@echo ''
|
|
|
|
@echo 'Environement variables:'
|
|
|
|
@echo ' STOP - Stop the build just after this step'
|
|
|
|
@echo ' RESTART - Restart the build just before this step'
|
2007-06-01 16:50:29 +00:00
|
|
|
@echo ''
|
2007-05-07 09:04:02 +00:00
|
|
|
@echo 'Execute "make" or "make all" to build all targets marked with [*]'
|
|
|
|
|
2007-06-16 18:00:35 +00:00
|
|
|
.config:
|
|
|
|
@echo "You must run either one of \"make config\" or \"make menuconfig\" first"
|
2007-02-24 11:00:05 +00:00
|
|
|
|
|
|
|
# Actual build
|
2007-05-10 21:33:35 +00:00
|
|
|
build: .config
|
2007-02-24 11:00:05 +00:00
|
|
|
@$(CT_TOP_DIR)/scripts/crosstool.sh
|
|
|
|
|
2007-05-12 09:54:29 +00:00
|
|
|
.PHONY: tarball
|
|
|
|
tarball:
|
|
|
|
@$(CT_TOP_DIR)/scripts/tarball.sh
|
|
|
|
|
2007-02-24 11:00:05 +00:00
|
|
|
.PHONY: distclean
|
|
|
|
distclean:: clean
|
|
|
|
@rm -f .config* ..config.tmp
|
2007-05-27 20:22:06 +00:00
|
|
|
@rm -f log.*
|
2007-06-16 18:00:35 +00:00
|
|
|
@[ ! -d "$(CT_TOP_DIR)/targets" ] || chmod -R u+w "$(CT_TOP_DIR)/targets"
|
2007-05-10 21:33:35 +00:00
|
|
|
@rm -rf "$(CT_TOP_DIR)/targets"
|