Makefile
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun May 27 20:22:06 2007 +0000 (2007-05-27)
changeset 136 22b5ef41df97
parent 135 b2695c2f1919
child 147 39e4ef7d6d8d
permissions -rw-r--r--
Merge the NPTL stuff.
That still leaves the linuxthreads stuff broken, but it was just before. I don't care anyway. Time to fix that later...
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@135
    12
export CT_STOP=$(STOP)
yann@121
    13
export CT_RESTART=$(RESTART)
yann@121
    14
yann@1
    15
.PHONY: all
yann@85
    16
all: build
yann@1
    17
yann@1
    18
HOST_CC = gcc -funsigned-char
yann@1
    19
yann@1
    20
help::
yann@63
    21
	@echo  'Available make targets:'
yann@1
    22
	@echo
yann@1
    23
yann@1
    24
include $(CT_TOP_DIR)/kconfig/Makefile
yann@63
    25
include $(CT_TOP_DIR)/samples/Makefile
yann@1
    26
yann@1
    27
help::
yann@1
    28
	@echo  'Build targets:'
yann@19
    29
	@echo  '* build          - Build the toolchain'
yann@19
    30
	@echo  '  clean          - Remove generated files'
yann@31
    31
	@echo  '  distclean      - Remove generated files, configuration and build directories'
yann@1
    32
yann@1
    33
include $(CT_TOP_DIR)/tools/Makefile
yann@136
    34
include $(CT_TOP_DIR)/Makefile.steps
yann@1
    35
yann@63
    36
help::
yann@129
    37
	@echo  'Distribution targets:'
yann@129
    38
	@echo  '  tarball        - Build a tarball of the configured toolchain'
yann@136
    39
	@echo  ''
yann@136
    40
	@echo  'Environement variables:'
yann@136
    41
	@echo  '  STOP           - Stop the build just after this step'
yann@136
    42
	@echo  '  RESTART        - Restart the build just before this step'
yann@129
    43
	@echo
yann@135
    44
	@echo  'Environement variables:'
yann@135
    45
	@echo  '  STOP           - Stop the build just after this step'
yann@135
    46
	@echo  '  RESTART        - Restart the build just before this step'
yann@135
    47
	@echo
yann@63
    48
	@echo  'Execute "make" or "make all" to build all targets marked with [*]'
yann@63
    49
yann@97
    50
.config: $(CONFIG_FILES) $(CT_TOP_DIR)/config/debug.in
yann@96
    51
	@make oldconfig
yann@1
    52
yann@1
    53
# Actual build
yann@85
    54
build: .config
yann@1
    55
	@$(CT_TOP_DIR)/scripts/crosstool.sh
yann@1
    56
yann@87
    57
.PHONY: tarball
yann@87
    58
tarball:
yann@87
    59
	@$(CT_TOP_DIR)/scripts/tarball.sh
yann@87
    60
yann@1
    61
.PHONY: distclean
yann@1
    62
distclean:: clean
yann@1
    63
	@rm -f .config* ..config.tmp
yann@136
    64
	@rm -f log.*
yann@85
    65
	@rm -rf "$(CT_TOP_DIR)/targets"