Makefile
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu May 17 16:22:51 2007 +0000 (2007-05-17)
changeset 96 aa1a9fbd6eb8
parent 88 f67b52e42fd1
child 97 63a30dd47eb8
permissions -rw-r--r--
Debug facilities:
- add a framework to easily add new ones
- add gdb as a first debug facility
- add patches for gdb
After the kernel checked its installed headers, clean up the mess of .checked.* files.
Reorder scripts/crosstool.sh:
- dump the configuration early
- renice early
- get info about build system early, when setting up the environment
- when in cross or native, the host tools are those of the build system, and only in this case
- elapsed time calculations moved to scripts/functions
Remove handling of the color: it's gone once and for all.
Update tools/addToolVersion.sh:
- handle debug facilities
- commonalise some code
- remove dead tools (cygwin, tcc)
Point to my address for bug reports.
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@65
     4
# Don't print directory as we descend into them
yann@65
     5
MAKEFLAGS += --no-print-directory
yann@65
     6
yann@88
     7
export CT_TOP_DIR=$(shell pwd)
yann@1
     8
yann@88
     9
# This is crosstool-ng version string
yann@88
    10
export CT_VERSION=$(shell cat $(CT_TOP_DIR)/version)
yann@1
    11
yann@1
    12
.PHONY: all
yann@85
    13
all: build
yann@1
    14
yann@1
    15
HOST_CC = gcc -funsigned-char
yann@1
    16
yann@1
    17
help::
yann@63
    18
	@echo  'Available make targets:'
yann@1
    19
	@echo
yann@1
    20
yann@1
    21
include $(CT_TOP_DIR)/kconfig/Makefile
yann@63
    22
include $(CT_TOP_DIR)/samples/Makefile
yann@1
    23
yann@1
    24
help::
yann@1
    25
	@echo  'Build targets:'
yann@19
    26
	@echo  '* build          - Build the toolchain'
yann@87
    27
	@echo  '  tarball        - Build a tarball of the configured toolchain'
yann@19
    28
	@echo  '  clean          - Remove generated files'
yann@31
    29
	@echo  '  distclean      - Remove generated files, configuration and build directories'
yann@1
    30
yann@1
    31
include $(CT_TOP_DIR)/tools/Makefile
yann@1
    32
yann@63
    33
help::
yann@63
    34
	@echo  'Execute "make" or "make all" to build all targets marked with [*]'
yann@63
    35
yann@44
    36
.config: $(shell find $(CT_TOP_DIR)/config -type f -name '*.in')
yann@96
    37
	@make oldconfig
yann@1
    38
yann@1
    39
# Actual build
yann@85
    40
build: .config
yann@1
    41
	@$(CT_TOP_DIR)/scripts/crosstool.sh
yann@1
    42
yann@87
    43
.PHONY: tarball
yann@87
    44
tarball:
yann@87
    45
	@$(CT_TOP_DIR)/scripts/tarball.sh
yann@87
    46
yann@1
    47
.PHONY: distclean
yann@1
    48
distclean:: clean
yann@1
    49
	@rm -f .config* ..config.tmp
yann@85
    50
	@rm -rf "$(CT_TOP_DIR)/targets"