aboutsummaryrefslogtreecommitdiff
path: root/project/Makefile.in
blob: 69c8572e0a390741f4353ec224771071e43f7bc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
PROJECT:=$(call qstrip,$(BR2_PROJECT))
TARGET_HOSTNAME:=$(call qstrip,$(BR2_HOSTNAME))
BANNER:=$(call qstrip,$(BR2_BANNER))

# silent mode requested?
QUIET:=$(if $(findstring s,$(MAKEFLAGS)),-q,)

# Strip off the annoying quoting
ARCH:=$(call qstrip,$(BR2_ARCH))
ifeq ($(ARCH),xtensa)
ARCH:=$(ARCH)_$(call qstrip,$(BR2_xtensa_core_name))
endif
WGET:=$(call qstrip,$(BR2_WGET)) $(SPIDER) $(QUIET)
SVN_CO:=$(call qstrip,$(BR2_SVN_CO)) $(QUIET)
SVN_UP:=$(call qstrip,$(BR2_SVN_UP)) $(QUIET)
BZR_CO:=$(call qstrip,$(BR2_BZR_CO)) $(QUIET)
BZR_UP:=$(call qstrip,$(BR2_BZR_UP)) $(QUIET)
GIT:=$(call qstrip,$(BR2_GIT)) $(QUIET)
ZCAT:=$(call qstrip,$(BR2_ZCAT))
BZCAT:=$(call qstrip,$(BR2_BZCAT))
TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf

# Buildroot supports building out of tree similarly to the Linux kernel.
# To use, add O= to the make command line (make O=/tmp/build)
BASE_DIR:=$(shell pwd)
ifdef O
ifeq ("$(origin O)", "command line")
BASE_DIR := $(shell mkdir -p $(O) && cd $(O) && pwd)
$(if $(BASE_DIR),, $(error output directory "$(O)" does not exist))

# other packages might also support Linux-style out of tree builds
# with the O=<dir> syntax (E.G. Busybox does). As make automatically
# forwards command line variable definitions those packages get very
# confused. Fix this by telling make to not do so
MAKEOVERRIDES =
endif
endif

TOPDIR_PREFIX:=$(call qstrip,$(BR2_TOPDIR_PREFIX))_
TOPDIR_SUFFIX:=_$(call qstrip,$(BR2_TOPDIR_SUFFIX))
ifeq ($(TOPDIR_PREFIX),_)
TOPDIR_PREFIX:=
endif
ifeq ($(TOPDIR_SUFFIX),_)
TOPDIR_SUFFIX:=
endif

DL_DIR=$(call qstrip,$(BR2_DL_DIR))
ifeq ($(DL_DIR),)
DL_DIR:=$(BASE_DIR)/dl
endif

# All non-configurable packages should be built in BUILD_DIR
BUILD_DIR:=$(BASE_DIR)/$(TOPDIR_PREFIX)build_$(ARCH)$(ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)

GNU_TARGET_SUFFIX:=-$(call qstrip,$(BR2_GNU_TARGET_SUFFIX))

STAGING_DIR:=$(call qstrip,$(BR2_STAGING_DIR))

# packages compiled for the host goes here
HOST_DIR:=$(BUILD_DIR)/host_dir

# stamp (dependency) files go here
STAMP_DIR:=$(BUILD_DIR)/stamps

# All configurable packages (like Busybox,Linux etc) should be built
# in PROJECT_BUILD_DIR
PROJECT_BUILD_DIR:=$(BASE_DIR)/$(TOPDIR_PREFIX)project_build_$(ARCH)$(ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)/$(PROJECT)
BINARIES_DIR:=$(BASE_DIR)/binaries/$(PROJECT)
TARGET_DIR:=$(PROJECT_BUILD_DIR)/root

# define values for prepatched source trees for toolchains
VENDOR_SITE:=$(call qstrip,$(BR2_VENDOR_SITE))
VENDOR_SUFFIX:=$(call qstrip,$(BR2_VENDOR_SUFFIX))
VENDOR_BINUTILS_RELEASE:=$(call qstrip,$(BR2_VENDOR_BINUTILS_RELEASE))
VENDOR_GCC_RELEASE:=$(call qstrip,$(BR2_VENDOR_GCC_RELEASE))
VENDOR_UCLIBC_RELEASE:=$(call qstrip,$(BR2_VENDOR_UCLIBC_RELEASE))
VENDOR_GDB_RELEASE:=$(call qstrip,$(BR2_VENDOR_GDB_RELEASE))
VENDOR_PATCH_DIR:=$(call qstrip,$(BR2_VENDOR_PATCH_DIR))