Makefile
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Apr 10 15:49:38 2007 +0000 (2007-04-10)
changeset 25 b1d9951b9933
parent 19 d80e6dedcc13
child 31 97e44d892c92
permissions -rw-r--r--
While migrating the samples to use ${CT_TOP_DIR}/build as base for the build directories, the Makefile rules stoped working.
This is because 'all' depends on 'build', which does exist, and make believes there's noting to do.
Work this around by using a rule named '_ct_build' instead of plain 'build'.
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@1
     4
# The project version
yann@1
     5
export PROJECTVERSION=0.0.1
yann@1
     6
yann@1
     7
# This should eventually be computed if compiling out-of-tree is implemented
yann@1
     8
export CT_TOP_DIR=$(shell pwd)
yann@1
     9
yann@1
    10
.PHONY: all
yann@25
    11
all: _ct_build
yann@1
    12
yann@1
    13
HOST_CC = gcc -funsigned-char
yann@1
    14
yann@1
    15
help::
yann@1
    16
	@echo  'Available make targets (*: default target):'
yann@1
    17
	@echo
yann@1
    18
yann@1
    19
include $(CT_TOP_DIR)/kconfig/Makefile
yann@1
    20
#include $(CT_TOP_DIR)/samples/Makefile
yann@1
    21
yann@1
    22
help::
yann@1
    23
	@echo  'Build targets:'
yann@19
    24
	@echo  '* build          - Build the toolchain'
yann@19
    25
	@echo  '  clean          - Remove generated files'
yann@19
    26
	@echo  '  distclean      - Remove generated files and configuration'
yann@1
    27
yann@1
    28
include $(CT_TOP_DIR)/tools/Makefile
yann@1
    29
yann@1
    30
.config: config/*.in
yann@1
    31
	@make menuconfig
yann@1
    32
	@# Because exiting menuconfig without saving is not an error to menuconfig
yann@1
    33
	@test -f .config
yann@1
    34
yann@1
    35
# Actual build
yann@25
    36
_ct_build: .config
yann@1
    37
	@$(CT_TOP_DIR)/scripts/crosstool.sh
yann@1
    38
yann@1
    39
.PHONY: distclean
yann@1
    40
distclean:: clean
yann@1
    41
	@rm -f .config* ..config.tmp
yann@1
    42