ct-ng.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Jul 13 10:32:38 2008 +0000 (2008-07-13)
changeset 645 8e58024f8e37
parent 543 1df70ed4510d
child 675 efaf88c66ec1
permissions -rw-r--r--
Ioannis E. VENETIS <venetis@mail.capsl.udel.edu> pointed out that GMP and MPFR were not used by gcc.
Turned out that none could use GMP and MPFR as the config option changed its name, but the change was not propagated to all users.

/trunk/scripts/build/binutils.sh | 2 1 1 0 +-
/trunk/scripts/build/debug/300-gdb.sh | 2 1 1 0 +-
/trunk/scripts/build/cc_gcc.sh | 6 3 3 0 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
yann@289
     1
#!@@CT_MAKE@@ -rf
yann@182
     2
# Makefile for crosstool-NG.
yann@182
     3
# Copyright 2006 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
yann@182
     4
yann@182
     5
# Don't print directory as we descend into them
yann@411
     6
# Don't use built-in rules, we know what we're doing
yann@289
     7
MAKEFLAGS += --no-print-directory --no-builtin-rules
yann@182
     8
yann@411
     9
# Some distributions (eg. Ubuntu) thought it wise to point /bin/sh to
yann@411
    10
# a truly POSIX-conforming shell, ash in this case. This is not so good
yann@411
    11
# as we, smart (haha!) developers (as smart we ourselves think we are),
yann@411
    12
# got used to bashisms, and are enclined to easiness... So force use of
yann@411
    13
# bash. (Note: this is ugly, but ./configure checks for it).
yann@411
    14
export SHELL=/bin/bash
yann@411
    15
yann@372
    16
# This is where ct-ng is.
yann@372
    17
# Don't bother to change it other than with a new ./configure!
yann@372
    18
CT_NG:=@@CT_BINDIR@@/ct-ng
yann@182
    19
yann@182
    20
export CT_TOP_DIR:=$(shell pwd)
yann@182
    21
export CT_LIB_DIR:=@@CT_LIBDIR@@
yann@182
    22
export CT_DOC_DIR:=@@CT_DOCDIR@@
yann@182
    23
yann@197
    24
# This is crosstool-NG version string
yann@543
    25
export CT_VERSION:=@@CT_VERSION@@
yann@182
    26
yann@334
    27
export CT_STOP:=$(STOP)
yann@334
    28
export CT_RESTART:=$(RESTART)
yann@182
    29
yann@544
    30
.FORCE:
yann@182
    31
.PHONY: $(PHONY)
yann@182
    32
PHONY += all
yann@197
    33
all: help
yann@182
    34
yann@284
    35
HOST_CC := gcc -funsigned-char
yann@182
    36
yann@182
    37
# Help system
yann@229
    38
help:: help-head help-config help-samples help-build help-clean help-distrib help-env help-tail
yann@182
    39
yann@544
    40
help-head:: version
yann@544
    41
	@echo  'See below for a list of available actions, listed by category:'
yann@182
    42
yann@182
    43
help-config::
yann@182
    44
	@echo
yann@197
    45
	@echo  'Configuration actions:'
yann@182
    46
yann@182
    47
help-samples::
yann@182
    48
	@echo
yann@229
    49
	@echo  'Preconfigured toolchains:'
yann@182
    50
yann@182
    51
help-build::
yann@182
    52
	@echo
yann@333
    53
	@echo  'Build actions (#: force number of // jobs):'
yann@182
    54
yann@229
    55
help-clean::
yann@229
    56
	@echo
yann@229
    57
	@echo  'Clean actions:'
yann@229
    58
yann@182
    59
help-distrib::
yann@182
    60
	@echo
yann@197
    61
	@echo  'Distribution actions:'
yann@182
    62
yann@182
    63
help-env::
yann@182
    64
	@echo
yann@182
    65
	@echo  'Environement variables (see @@CT_DOCDIR@@/overview.txt):'
yann@182
    66
yann@182
    67
help-tail::
yann@182
    68
	@echo
yann@197
    69
	@echo  'Execute "$(CT_NG) config" or "$(CT_NG) menuconfig" to configure crosstool-NG'
yann@197
    70
	@echo  'Execute "$(CT_NG) build" to build your toolchain'
yann@268
    71
	@echo  'Execute "$(CT_NG) version" to see the version'
yann@185
    72
	@echo  'See "man 1 ct-ng" for some help as well'
yann@182
    73
yann@182
    74
# End help system
yann@182
    75
yann@182
    76
help-build::
yann@333
    77
	@echo  '  build[.#]          - Build the toolchain'
yann@229
    78
yann@229
    79
help-clean::
yann@333
    80
	@echo  '  clean              - Remove generated files'
yann@333
    81
	@echo  '  distclean          - Remove generated files, configuration and build directories'
yann@182
    82
yann@261
    83
include $(CT_LIB_DIR)/kconfig/kconfig.mk
yann@333
    84
include $(CT_LIB_DIR)/steps.mk
yann@261
    85
include $(CT_LIB_DIR)/samples/samples.mk
yann@261
    86
include $(CT_LIB_DIR)/tools/tools.mk
yann@182
    87
yann@182
    88
help-distrib::
yann@333
    89
	@echo  '  tarball            - Build a tarball of the configured toolchain'
yann@182
    90
yann@182
    91
help-env::
yann@333
    92
	@echo  '  STOP               - Stop the build just after this step'
yann@333
    93
	@echo  '  RESTART            - Restart the build just before this step'
yann@182
    94
yann@182
    95
.config:
yann@182
    96
	@echo  'You must run either one of "$(CT_NG) config" or "$(CT_NG) menuconfig" first'
yann@182
    97
	@false
yann@182
    98
yann@182
    99
# Actual build
yann@372
   100
build: .config
yann@182
   101
	@$(CT_LIB_DIR)/scripts/crosstool.sh
yann@182
   102
yann@372
   103
build.%:
yann@333
   104
	@$(CT_NG) $(shell echo "$(@)" |sed -r -e 's|^([^.]+)\.([[:digit:]]+)$$|\1 CT_JOBS=\2|;')
yann@333
   105
yann@182
   106
PHONY += tarball
yann@214
   107
#tarball:
yann@214
   108
#	@$(CT_LIB_DIR)/scripts/tarball.sh
yann@182
   109
tarball:
yann@268
   110
	@echo 'Tarbal creation disabled for now... Sorry.'
yann@214
   111
	@true
yann@182
   112
yann@268
   113
PHONY += version
yann@268
   114
version:
yann@273
   115
	@echo 'This is crosstool-NG version $(CT_VERSION)'
yann@268
   116
yann@182
   117
PHONY += clean
yann@182
   118
clean::
yann@182
   119
	@rm -f $(CT_TOP_DIR)/.config.*
yann@182
   120
yann@182
   121
PHONY += distclean
yann@182
   122
distclean:: clean
yann@182
   123
	@rm -f $(CT_TOP_DIR)/.config* $(CT_TOP_DIR)/..config.tmp
yann@182
   124
	@rm -f $(CT_TOP_DIR)/log.*
yann@182
   125
	@[ ! -d "$(CT_TOP_DIR)/targets" ] || chmod -R u+w "$(CT_TOP_DIR)/targets"
yann@182
   126
	@rm -rf "$(CT_TOP_DIR)/targets"