yann@1: # Makefile for crosstool-NG. yann@1: # Copyright 2006 Yann E. MORIN yann@1: yann@65: # Don't print directory as we descend into them yann@65: MAKEFLAGS += --no-print-directory yann@65: yann@88: export CT_TOP_DIR=$(shell pwd) yann@1: yann@88: # This is crosstool-ng version string yann@88: export CT_VERSION=$(shell cat $(CT_TOP_DIR)/version) yann@1: yann@135: export CT_STOP=$(STOP) yann@121: export CT_RESTART=$(RESTART) yann@121: yann@1: .PHONY: all yann@85: all: build yann@1: yann@1: HOST_CC = gcc -funsigned-char yann@1: yann@1: help:: yann@63: @echo 'Available make targets:' yann@1: @echo yann@1: yann@1: include $(CT_TOP_DIR)/kconfig/Makefile yann@63: include $(CT_TOP_DIR)/samples/Makefile yann@1: yann@1: help:: yann@1: @echo 'Build targets:' yann@19: @echo '* build - Build the toolchain' yann@19: @echo ' clean - Remove generated files' yann@31: @echo ' distclean - Remove generated files, configuration and build directories' yann@1: yann@1: include $(CT_TOP_DIR)/tools/Makefile yann@136: include $(CT_TOP_DIR)/Makefile.steps yann@1: yann@63: help:: yann@129: @echo 'Distribution targets:' yann@129: @echo ' tarball - Build a tarball of the configured toolchain' yann@136: @echo '' yann@168: @echo 'Environement variables (see docs/overview.txt):' yann@136: @echo ' STOP - Stop the build just after this step' yann@136: @echo ' RESTART - Restart the build just before this step' yann@147: @echo '' yann@63: @echo 'Execute "make" or "make all" to build all targets marked with [*]' yann@63: yann@158: .config: yann@158: @echo "You must run either one of \"make config\" or \"make menuconfig\" first" yann@1: yann@1: # Actual build yann@85: build: .config yann@1: @$(CT_TOP_DIR)/scripts/crosstool.sh yann@1: yann@87: .PHONY: tarball yann@87: tarball: yann@87: @$(CT_TOP_DIR)/scripts/tarball.sh yann@87: yann@1: .PHONY: distclean yann@1: distclean:: clean yann@1: @rm -f .config* ..config.tmp yann@136: @rm -f log.* yann@158: @[ ! -d "$(CT_TOP_DIR)/targets" ] || chmod -R u+w "$(CT_TOP_DIR)/targets" yann@85: @rm -rf "$(CT_TOP_DIR)/targets"