Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 309 lines (266 sloc) 9.505 kb
efd888e Revert r12510. Remove -rpath-link form TARGET_LDFLAGS as it breaks some
lars authored
1 #
9e8f219 there are quite a lot of package using ln -sf in their Makefile, so
thepeople authored
2 # Copyright (C) 2006-2010 OpenWrt.org
02cdebb credit where credit is due
mbm authored
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
6db7ad7 major target cleanup. it is now possible to have subtargets that can ove...
nbd authored
8 ifneq ($(__rules_inc),1)
9 __rules_inc=1
10
2e8859e don't include .config if DUMP is set
nbd authored
11 ifeq ($(DUMP),)
12 -include $(TOPDIR)/.config
13 endif
40aa2d8 clean up recursive dependency handling, use timestamp.pl again, because ...
nbd authored
14 include $(TOPDIR)/include/debug.mk
242527c switch on new verbose system
mbm authored
15 include $(TOPDIR)/include/verbose.mk
dda8643 set default shell to bash
nbd authored
16
12c49b6 build system cleanup/restructuring as described in http://lists.openwrt....
nbd authored
17 TMP_DIR:=$(TOPDIR)/tmp
18
805beb6 [buildroot] fix for GREP_OPTIONS
florian authored
19 GREP_OPTIONS=
20 export GREP_OPTIONS
21
8e52b00 replace a few unnecessary $(shell) calls
nbd authored
22 qstrip=$(strip $(subst ",,$(1)))
12c49b6 build system cleanup/restructuring as described in http://lists.openwrt....
nbd authored
23 #"))
f77b88d nbd's makefile/menuconfig rewrite
mbm authored
24
83b31e0 large improvement for parallel builds. works without V=99 now and withou...
nbd authored
25 empty:=
26 space:= $(empty) $(empty)
27 merge=$(subst $(space),,$(1))
28 confvar=$(call merge,$(foreach v,$(1),$(if $($(v)),y,n)))
df27ff9 add helper macro for stripping the last part of a version number
nbd authored
29 strip_last=$(patsubst %.$(lastword $(subst .,$(space),$(1))),%,$(1))
83b31e0 large improvement for parallel builds. works without V=99 now and withou...
nbd authored
30
0630427 [include]
jow authored
31 define sep
32
33 endef
34
3e8bff3 rework parallel building to get rid of some warnings
nbd authored
35 _SINGLE=export MAKEFLAGS=$(space);
3ce8595 move cflags default setting to target makefiles
nbd authored
36 CFLAGS:=
8e52b00 replace a few unnecessary $(shell) calls
nbd authored
37 ARCH:=$(subst i486,i386,$(subst i586,i386,$(subst i686,i386,$(call qstrip,$(CONFIG_ARCH)))))
ab6e442 [buildroot] Implement an ARCH_PACKAGES variable which defaults to BOARD ...
jow authored
38 ARCH_PACKAGES:=$(call qstrip,$(CONFIG_TARGET_ARCH_PACKAGES))
6db7ad7 major target cleanup. it is now possible to have subtargets that can ove...
nbd authored
39 BOARD:=$(call qstrip,$(CONFIG_TARGET_BOARD))
12c49b6 build system cleanup/restructuring as described in http://lists.openwrt....
nbd authored
40 TARGET_OPTIMIZATION:=$(call qstrip,$(CONFIG_TARGET_OPTIMIZATION))
eed8637 Revert r14071
nbd authored
41 TARGET_SUFFIX=$(call qstrip,$(CONFIG_TARGET_SUFFIX))
12c49b6 build system cleanup/restructuring as described in http://lists.openwrt....
nbd authored
42 BUILD_SUFFIX:=$(call qstrip,$(CONFIG_BUILD_SUFFIX))
40aa2d8 clean up recursive dependency handling, use timestamp.pl again, because ...
nbd authored
43 SUBDIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR})
d6520c7 fix compile errors by forcing bash to be used as a shell in all submake ...
nbd authored
44 export SHELL:=/usr/bin/env bash
f77b88d nbd's makefile/menuconfig rewrite
mbm authored
45
8e52b00 replace a few unnecessary $(shell) calls
nbd authored
46 OPTIMIZE_FOR_CPU=$(subst i386,i486,$(ARCH))
f77b88d nbd's makefile/menuconfig rewrite
mbm authored
47
05e6976 add a variable that contains the proper architecture-dependent -fPIC/-fp...
nbd authored
48 ifeq ($(ARCH),powerpc)
49 FPIC:=-fPIC
50 else
51 FPIC:=-fpic
52 endif
53
23f0f29 Add HOST_FPIC. It currently always is -fPIC, because that should work on...
mb authored
54 HOST_FPIC:=-fPIC
55
30c92b3 add an arch suffix for handling different variants of arm/mips for the t...
nbd authored
56 ARCH_SUFFIX:=
251a813 We use different toolchain directories for different
kaloz authored
57 GCC_ARCH:=
58
59 ifneq ($(filter -march=armv%,$(TARGET_OPTIMIZATION)),)
60 ARCH_SUFFIX:=_$(patsubst -march=arm%,%,$(filter -march=armv%,$(TARGET_OPTIMIZATION)))
61 GCC_ARCH:=$(patsubst -march=%,%,$(filter -march=armv%,$(TARGET_OPTIMIZATION)))
62 endif
30c92b3 add an arch suffix for handling different variants of arm/mips for the t...
nbd authored
63 ifneq ($(findstring -mips32r2,$(TARGET_OPTIMIZATION)),)
64 ARCH_SUFFIX:=_r2
65 endif
89a10d9 mpc85xx: add a new 'spe_fpu' feature flag for the FPU used on freescale ...
nbd authored
66 ifdef CONFIG_HAS_SPE_FPU
67 TARGET_SUFFIX:=$(TARGET_SUFFIX)spe
68 endif
30c92b3 add an arch suffix for handling different variants of arm/mips for the t...
nbd authored
69
8418c95 fix empty download dir error
nbd authored
70 DL_DIR:=$(if $(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(TOPDIR)/dl)
392f107 output firmware files in bin/$(BOARD) instead of bin/
florian authored
71 BIN_DIR:=$(TOPDIR)/bin/$(BOARD)
0b0afa4 add INCLUDE_DIR variable for $(TOPDIR)/include
nbd authored
72 INCLUDE_DIR:=$(TOPDIR)/include
ad209c7 cleanup
mbm authored
73 SCRIPT_DIR:=$(TOPDIR)/scripts
12c49b6 build system cleanup/restructuring as described in http://lists.openwrt....
nbd authored
74 BUILD_DIR_BASE:=$(TOPDIR)/build_dir
75 BUILD_DIR_HOST:=$(BUILD_DIR_BASE)/host
76 STAGING_DIR_HOST:=$(TOPDIR)/staging_dir/host
6a36104 [toolchain] add external toolchain support, enhance native toolchain sup...
nico authored
77 ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
78 GCCV:=$(call qstrip,$(CONFIG_GCC_VERSION))
79 LIBC:=$(call qstrip,$(CONFIG_LIBC))
80 LIBCV:=$(call qstrip,$(CONFIG_LIBC_VERSION))
81 REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-openwrt-linux$(if $(TARGET_SUFFIX),-$(TARGET_SUFFIX))
82 GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-openwrt-linux
c0b7eec only support EABI on ARM targets
kaloz authored
83 DIR_SUFFIX:=_$(LIBC)-$(LIBCV)$(if $(CONFIG_arm),_eabi)
30c92b3 add an arch suffix for handling different variants of arm/mips for the t...
nbd authored
84 BUILD_DIR:=$(BUILD_DIR_BASE)/target-$(ARCH)$(ARCH_SUFFIX)$(DIR_SUFFIX)$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
338bcc5 [include] Use build suffix on build_dir paths
blogic authored
85 STAGING_DIR:=$(TOPDIR)/staging_dir/target-$(ARCH)$(ARCH_SUFFIX)$(DIR_SUFFIX)$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
30c92b3 add an arch suffix for handling different variants of arm/mips for the t...
nbd authored
86 BUILD_DIR_TOOLCHAIN:=$(BUILD_DIR_BASE)/toolchain-$(ARCH)$(ARCH_SUFFIX)_gcc-$(GCCV)$(DIR_SUFFIX)
87 TOOLCHAIN_DIR:=$(TOPDIR)/staging_dir/toolchain-$(ARCH)$(ARCH_SUFFIX)_gcc-$(GCCV)$(DIR_SUFFIX)
a1ca414 oops, forgot one small change in the last commit
nbd authored
88 PACKAGE_DIR:=$(BIN_DIR)/packages
6a36104 [toolchain] add external toolchain support, enhance native toolchain sup...
nico authored
89 else
90 ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
91 GNU_TARGET_NAME=$(call qstrip,$(CONFIG_TARGET_NAME))
92 else
93 GNU_TARGET_NAME=$(shell gcc -dumpmachine)
94 endif
95 REAL_GNU_TARGET_NAME=$(GNU_TARGET_NAME)
96 BUILD_DIR:=$(BUILD_DIR_BASE)/target-$(GNU_TARGET_NAME)$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
338bcc5 [include] Use build suffix on build_dir paths
blogic authored
97 STAGING_DIR:=$(TOPDIR)/staging_dir/target-$(GNU_TARGET_NAME)$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
6a36104 [toolchain] add external toolchain support, enhance native toolchain sup...
nico authored
98 BUILD_DIR_TOOLCHAIN:=$(BUILD_DIR_BASE)/toolchain-$(GNU_TARGET_NAME)
99 TOOLCHAIN_DIR:=$(TOPDIR)/staging_dir/toolchain-$(GNU_TARGET_NAME)
b4ebf55 remove the redundant subdirectory from the packages directory variable
nbd authored
100 PACKAGE_DIR:=$(BIN_DIR)/packages
6a36104 [toolchain] add external toolchain support, enhance native toolchain sup...
nico authored
101 endif
f77b88d nbd's makefile/menuconfig rewrite
mbm authored
102 STAMP_DIR:=$(BUILD_DIR)/stamp
12c49b6 build system cleanup/restructuring as described in http://lists.openwrt....
nbd authored
103 STAMP_DIR_HOST=$(BUILD_DIR_HOST)/stamp
0ca9e02 second part of target rootfs relocation
ralph authored
104 TARGET_ROOTFS_DIR?=$(if $(call qstrip,$(CONFIG_TARGET_ROOTFS_DIR)),$(call qstrip,$(CONFIG_TARGET_ROOTFS_DIR)),$(BUILD_DIR))
105 TARGET_DIR:=$(TARGET_ROOTFS_DIR)/root-$(BOARD)
b698050 add a staging directory for unstripped package files, useful for debuggi...
nbd authored
106 STAGING_DIR_ROOT:=$(STAGING_DIR)/root-$(BOARD)
51def42 added BUILD_LOG_DIR variable, make clean will delete the ./logs dir
ralph authored
107 BUILD_LOG_DIR:=$(TOPDIR)/logs
a5ff4c2 build: rework the package/install step - collect package install lists d...
nbd authored
108 PKG_INFO_DIR := $(STAGING_DIR)/pkginfo
ad209c7 cleanup
mbm authored
109
544a3a6 [buildroot] rules.mk: filter "." and "./" entries from $PATH, prevents t...
jow authored
110 TARGET_PATH:=$(STAGING_DIR_HOST)/bin:$(subst $(space),:,$(filter-out .,$(filter-out ./,$(subst :,$(space),$(PATH)))))
1238a16 fix whitespace order in cflags without CONFIG_DEBUG to prevent breakage ...
nbd authored
111 TARGET_CFLAGS:=$(TARGET_OPTIMIZATION)$(if $(CONFIG_DEBUG), -g3)
08faa98 build: add TARGET_CXXFLAGS and EXTRA_CXXFLAGS, defaulting to *_CFLAGS vi...
nbd authored
112 TARGET_CXXFLAGS = $(TARGET_CFLAGS)
3746779 Native toolchain does not support -fhonour-copts, do not add it to the T...
florian authored
113 TARGET_CPPFLAGS:=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include
6a36104 [toolchain] add external toolchain support, enhance native toolchain sup...
nico authored
114 TARGET_LDFLAGS:=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib
cf191d9 [buildroot] rules.mk: properly populate $(LIBGCC_S) for external toolcha...
jow authored
115 ifneq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
116 LIBGCC_S_PATH=$(realpath $(wildcard $(call qstrip,$(CONFIG_LIBGCC_ROOT_DIR))/$(call qstrip,$(CONFIG_LIBGCC_FILE_SPEC))))
117 LIBGCC_S=$(if $(LIBGCC_S_PATH),-L$(dir $(LIBGCC_S_PATH)) -lgcc_s)
36efdd7 [buildroot] rules.mk: provide a LIBGCC_A variable
jow authored
118 LIBGCC_A=$(realpath $(wildcard $(dir $(LIBGCC_S_PATH))/gcc/*/*/libgcc.a))
cf191d9 [buildroot] rules.mk: properly populate $(LIBGCC_S) for external toolcha...
jow authored
119 else
36efdd7 [buildroot] rules.mk: provide a LIBGCC_A variable
jow authored
120 LIBGCC_A=$(wildcard $(TOOLCHAIN_DIR)/lib/gcc/*/*/libgcc.a)
121 LIBGCC_S=$(if $(wildcard $(TOOLCHAIN_DIR)/lib/libgcc_s.so),-L$(TOOLCHAIN_DIR)/lib -lgcc_s,$(LIBGCC_A))
cf191d9 [buildroot] rules.mk: properly populate $(LIBGCC_S) for external toolcha...
jow authored
122 endif
ab6c99e add a variable LIBRPC to refer to the external librpc if used
nbd authored
123 LIBRPC=-lrpc
7efa150 make librpc compatible with eglibc, unconditionally enable it for packag...
nbd authored
124 LIBRPC_DEPENDS=+librpc
3746779 Native toolchain does not support -fhonour-copts, do not add it to the T...
florian authored
125
039dd74 [buildroot] move LIB_SUFFIX from base-files to rules.mk
florian authored
126 ifneq ($(findstring $(ARCH) , mips64 x86_64 ),)
127 LIB_SUFFIX:=64
128 endif
129
7f3b481 speed up metadata scanning a lot by avoiding unnecessary shell commands ...
nbd authored
130 ifndef DUMP
6a36104 [toolchain] add external toolchain support, enhance native toolchain sup...
nico authored
131 ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
132 -include $(TOOLCHAIN_DIR)/info.mk
aeb7091 only export GCC_HONOUR_COPTS for the built-in toolchain, fixes missing-f...
nbd authored
133 export GCC_HONOUR_COPTS:=0
6a36104 [toolchain] add external toolchain support, enhance native toolchain sup...
nico authored
134 TARGET_CROSS:=$(if $(TARGET_CROSS),$(TARGET_CROSS),$(OPTIMIZE_FOR_CPU)-openwrt-linux$(if $(TARGET_SUFFIX),-$(TARGET_SUFFIX))-)
f9e3261 build: add -Wno-error=unused-but-set-variable to cflags for gcc 4.6 and ...
nbd authored
135 TARGET_CFLAGS+= -fhonour-copts $(if $(CONFIG_GCC_VERSION_4_4)$(CONFIG_GCC_VERSION_4_5),,-Wno-error=unused-but-set-variable)
6a36104 [toolchain] add external toolchain support, enhance native toolchain sup...
nico authored
136 TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/usr/include -I$(TOOLCHAIN_DIR)/include
137 TARGET_LDFLAGS+= -L$(TOOLCHAIN_DIR)/usr/lib -L$(TOOLCHAIN_DIR)/lib
dc74adf toolchain: fix the sysroot mess by getting rid of $(TOOLCHAIN_DIR)/usr a...
nbd authored
138 TARGET_PATH:=$(TOOLCHAIN_DIR)/bin:$(TARGET_PATH)
6a36104 [toolchain] add external toolchain support, enhance native toolchain sup...
nico authored
139 else
140 ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
141 TARGET_CROSS:=$(call qstrip,$(CONFIG_TOOLCHAIN_PREFIX))
142 TOOLCHAIN_ROOT_DIR:=$(call qstrip,$(CONFIG_TOOLCHAIN_ROOT))
143 TOOLCHAIN_BIN_DIRS:=$(patsubst ./%,$(TOOLCHAIN_ROOT_DIR)/%,$(call qstrip,$(CONFIG_TOOLCHAIN_BIN_PATH)))
144 TOOLCHAIN_INC_DIRS:=$(patsubst ./%,$(TOOLCHAIN_ROOT_DIR)/%,$(call qstrip,$(CONFIG_TOOLCHAIN_INC_PATH)))
145 TOOLCHAIN_LIB_DIRS:=$(patsubst ./%,$(TOOLCHAIN_ROOT_DIR)/%,$(call qstrip,$(CONFIG_TOOLCHAIN_LIB_PATH)))
146 ifneq ($(TOOLCHAIN_BIN_DIRS),)
147 TARGET_PATH:=$(subst $(space),:,$(TOOLCHAIN_BIN_DIRS)):$(TARGET_PATH)
148 endif
149 ifneq ($(TOOLCHAIN_INC_DIRS),)
150 TARGET_CPPFLAGS+= $(patsubst %,-I%,$(TOOLCHAIN_INC_DIRS))
151 endif
152 ifneq ($(TOOLCHAIN_LIB_DIRS),)
153 TARGET_LDFLAGS+= $(patsubst %,-L%,$(TOOLCHAIN_LIB_DIRS))
154 endif
ae5914a [buildroot] use ext-toolchain.sh to integrate external toolchains
jow authored
155 TARGET_PATH:=$(TOOLCHAIN_DIR)/bin:$(TARGET_PATH)
6a36104 [toolchain] add external toolchain support, enhance native toolchain sup...
nico authored
156 endif
157 endif
7f3b481 speed up metadata scanning a lot by avoiding unnecessary shell commands ...
nbd authored
158 endif
6a36104 [toolchain] add external toolchain support, enhance native toolchain sup...
nico authored
159 TARGET_PATH_PKG:=$(STAGING_DIR)/host/bin:$(TARGET_PATH)
20f30a6 add secret option to use host's toolchain when native compiling
mbm authored
160
11c2779 fixup softfloat handling
kaloz authored
161 ifeq ($(CONFIG_SOFT_FLOAT),y)
6017696 [cosmetic] indent soft-float options
nico authored
162 SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft
163 TARGET_CFLAGS+= -msoft-float
11c2779 fixup softfloat handling
kaloz authored
164 else
6017696 [cosmetic] indent soft-float options
nico authored
165 SOFT_FLOAT_CONFIG_OPTION:=
11c2779 fixup softfloat handling
kaloz authored
166 endif
167
ef998d6 set PATH in rules.mk
mbm authored
168 export PATH:=$(TARGET_PATH)
2880f4e export STAGING_DIR
nbd authored
169 export STAGING_DIR
37b9bb7 speed up the build system by including include/shell.sh on shell command...
nbd authored
170 export SH_FUNC:=. $(INCLUDE_DIR)/shell.sh;
ef998d6 set PATH in rules.mk
mbm authored
171
32d35e5 refreshed madwifi patches
blogic authored
172 PKG_CONFIG:=$(STAGING_DIR_HOST)/bin/pkg-config
173
174 export PKG_CONFIG
175
ad209c7 cleanup
mbm authored
176 HOSTCC:=gcc
f78b4e1 [buildroot] do not pass optimization flags in HOST_CPPFLAGS (#12153)
jow authored
177 HOST_CPPFLAGS:=-I$(STAGING_DIR_HOST)/include
178 HOST_CFLAGS:=-O2 $(HOST_CPPFLAGS)
12c49b6 build system cleanup/restructuring as described in http://lists.openwrt....
nbd authored
179 HOST_LDFLAGS:=-L$(STAGING_DIR_HOST)/lib
180
ad209c7 cleanup
mbm authored
181 TARGET_CC:=$(TARGET_CROSS)gcc
1745f44 rules.mk: add TARGET_AR and TARGET_RANLIB
nbd authored
182 TARGET_AR:=$(TARGET_CROSS)ar
183 TARGET_RANLIB:=$(TARGET_CROSS)ranlib
e1f39ca Set TARGET_CXX to 'no' if c++ is not enabled in the toolchain.
lars authored
184 TARGET_CXX:=$(if $(CONFIG_INSTALL_LIBSTDCPP),$(TARGET_CROSS)g++,no)
60004be [include] rename PATCH to KPATCH
jow authored
185 KPATCH:=$(SCRIPT_DIR)/patch-kernel.sh
12c49b6 build system cleanup/restructuring as described in http://lists.openwrt....
nbd authored
186 SED:=$(STAGING_DIR_HOST)/bin/sed -i -e
ad209c7 cleanup
mbm authored
187 CP:=cp -fpR
9e8f219 there are quite a lot of package using ln -sf in their Makefile, so
thepeople authored
188 LN:=ln -sf
f77b88d nbd's makefile/menuconfig rewrite
mbm authored
189
35edb7e add INSTALL_BIN, INSTALL_DIR, INSTALL_DATA variables
nbd authored
190 INSTALL_BIN:=install -m0755
191 INSTALL_DIR:=install -d -m0755
192 INSTALL_DATA:=install -m0644
2751644 Add an install rule for configuration files
florian authored
193 INSTALL_CONF:=install -m0600
35edb7e add INSTALL_BIN, INSTALL_DIR, INSTALL_DATA variables
nbd authored
194
f12d141 [include] fix up scons vs ccache
blogic authored
195 TARGET_CC_NOCACHE:=$(TARGET_CC)
196 TARGET_CXX_NOCACHE:=$(TARGET_CXX)
197 HOSTCC_NOCACHE:=$(HOSTCC)
198 export TARGET_CC_NOCACHE
199 export TARGET_CXX_NOCACHE
200 export HOSTCC_NOCACHE
201
4c102c1 and now, finally, enable ccache support
mbm authored
202 ifneq ($(CONFIG_CCACHE),)
0d08b76 [tools] add ccache wrapper
blogic authored
203 TARGET_CC:= ccache_cc
204 TARGET_CXX:= ccache_cxx
9943867 tools: clean up Makefiles / make ccache work
blogic authored
205 HOSTCC:= ccache $(HOSTCC)
4c102c1 and now, finally, enable ccache support
mbm authored
206 endif
207
66bce4a use lazy evaluation for TARGET_CONFIGURE_OPTS to make it possible to ove...
nbd authored
208 TARGET_CONFIGURE_OPTS = \
ad209c7 cleanup
mbm authored
209 AR=$(TARGET_CROSS)ar \
ef998d6 set PATH in rules.mk
mbm authored
210 AS="$(TARGET_CC) -c $(TARGET_CFLAGS)" \
ad209c7 cleanup
mbm authored
211 LD=$(TARGET_CROSS)ld \
212 NM=$(TARGET_CROSS)nm \
4c102c1 and now, finally, enable ccache support
mbm authored
213 CC="$(TARGET_CC)" \
214 GCC="$(TARGET_CC)" \
56b1ad3 add TARGET_CXX variable which points to the c++ cross compiler
nbd authored
215 CXX="$(TARGET_CXX)" \
ad209c7 cleanup
mbm authored
216 RANLIB=$(TARGET_CROSS)ranlib \
cde9f30 Added OBJCOPY variable for calling the cross-objcopy command (required f...
rwhitby authored
217 STRIP=$(TARGET_CROSS)strip \
6d08e7e Added rule for objdump
hcg authored
218 OBJCOPY=$(TARGET_CROSS)objcopy \
44ba00b remove uneeded PATH setting in ipkg invocation
nico authored
219 OBJDUMP=$(TARGET_CROSS)objdump \
220 SIZE=$(TARGET_CROSS)size
ad209c7 cleanup
mbm authored
221
222 # strip an entire directory
e5b23cb add new option for enabling debugging symbols
nbd authored
223 ifneq ($(CONFIG_NO_STRIP),)
fbaee64 adds missing patch for native toolchain
blogic authored
224 RSTRIP:=:
9a319f4 add a config option to select the binary stripping method to use (betwee...
nico authored
225 STRIP:=:
fbaee64 adds missing patch for native toolchain
blogic authored
226 else
9a319f4 add a config option to select the binary stripping method to use (betwee...
nico authored
227 ifneq ($(CONFIG_USE_STRIP),)
1bf76dc add a config item to specify arguments to strip
nico authored
228 STRIP:=$(TARGET_CROSS)strip $(call qstrip,$(CONFIG_STRIP_ARGS))
9a319f4 add a config option to select the binary stripping method to use (betwee...
nico authored
229 else
230 ifneq ($(CONFIG_USE_SSTRIP),)
231 STRIP:=$(STAGING_DIR_HOST)/bin/sstrip
232 endif
233 endif
fbaee64 adds missing patch for native toolchain
blogic authored
234 RSTRIP:= \
ba66a4b kernel: keep more symbols in the kernel modules when doing profiling
nbd authored
235 export CROSS="$(TARGET_CROSS)" \
236 $(if $(CONFIG_KERNEL_KALLSYMS),NO_RENAME=1) \
237 $(if $(CONFIG_KERNEL_PROFILING),KEEP_SYMBOLS=1); \
fbaee64 adds missing patch for native toolchain
blogic authored
238 NM="$(TARGET_CROSS)nm" \
239 STRIP="$(STRIP)" \
2685b06 strip kernel modules more aggressively: make all global symbols local, r...
nbd authored
240 STRIP_KMOD="$(SCRIPT_DIR)/strip-kmod.sh" \
fbaee64 adds missing patch for native toolchain
blogic authored
241 $(SCRIPT_DIR)/rstrip.sh
242 endif
ad209c7 cleanup
mbm authored
243
244 ifeq ($(CONFIG_ENABLE_LOCALE),true)
53ea39e [package] globally define IPv6 support or not in OpenWrt, just like for ...
florian authored
245 DISABLE_NLS:=--enable-nls
f77b88d nbd's makefile/menuconfig rewrite
mbm authored
246 else
ad209c7 cleanup
mbm authored
247 DISABLE_NLS:=--disable-nls
f77b88d nbd's makefile/menuconfig rewrite
mbm authored
248 endif
249
53ea39e [package] globally define IPv6 support or not in OpenWrt, just like for ...
florian authored
250 ifeq ($(CONFIG_IPV6),y)
a31a51e [package] do not set anything in DISABLE_IPV6 when set, let the package ...
florian authored
251 DISABLE_IPV6:=
53ea39e [package] globally define IPv6 support or not in OpenWrt, just like for ...
florian authored
252 else
253 DISABLE_IPV6:=--disable-ipv6
254 endif
255
ad209c7 cleanup
mbm authored
256 ifeq ($(CONFIG_TAR_VERBOSITY),y)
e5105e6 use := for TAR_OPTIONS
nbd authored
257 TAR_OPTIONS:=-xvf -
ad209c7 cleanup
mbm authored
258 else
e5105e6 use := for TAR_OPTIONS
nbd authored
259 TAR_OPTIONS:=-xf -
ad209c7 cleanup
mbm authored
260 endif
859af2c move FORCE to toplevel rules.mk
mbm authored
261
913081d add menuconfig option to enable log files during build process
blogic authored
262 ifeq ($(CONFIG_BUILD_LOG),y)
263 BUILD_LOG:=1
264 endif
265
e158d8b make target/linux/* directories self-contained, use the selected kernel ...
nbd authored
266 define shvar
267 V_$(subst .,_,$(subst -,_,$(subst /,_,$(1))))
268 endef
269
270 define shexport
271 $(call shvar,$(1))=$$(call $(1))
272 export $(call shvar,$(1))
273 endef
274
89d4450 Add include_mk template which makes it a bit more convienient to include...
lars authored
275 define include_mk
276 $(eval -include $(if $(DUMP),,$(STAGING_DIR)/mk/$(strip $(1))))
277 endef
278
4af18f4 Add macro for locking of recipe commands.
mb authored
279 # Execute commands under flock
280 # $(1) => The shell expression.
281 # $(2) => The lock name. If not given, the global lock will be used.
282 define locked
a9812d9 fix usage of flock - use the command mode instead of locking a file desc...
nbd authored
283 SHELL= \
284 $(STAGING_DIR_HOST)/bin/flock \
285 $(TMP_DIR)/.$(if $(2),$(strip $(2)),global).flock \
286 -c '$(subst ','\'',$(1))'
4af18f4 Add macro for locking of recipe commands.
mb authored
287 endef
288
900c05f Refactor downloading code into download.mk
nbd authored
289 # file extension
290 ext=$(word $(words $(subst ., ,$(1))),$(subst ., ,$(1)))
291
859af2c move FORCE to toplevel rules.mk
mbm authored
292 all:
ad209c7 cleanup
mbm authored
293 FORCE: ;
859af2c move FORCE to toplevel rules.mk
mbm authored
294 .PHONY: FORCE
6db7ad7 major target cleanup. it is now possible to have subtargets that can ove...
nbd authored
295
36d3a76 [buildroot] Add two debug rules the examine the values of runtime make v...
jow authored
296 val.%:
297 @$(if $(filter undefined,$(origin $*)),\
298 echo "$* undefined" >&2, \
299 echo '$(subst ','"'"',$($*))' \
300 )
301
302 var.%:
303 @$(if $(filter undefined,$(origin $*)),\
304 echo "$* undefined" >&2, \
305 echo "$*='"'$(subst ','"'\"'\"'"',$($*))'"'" \
306 )
307
6db7ad7 major target cleanup. it is now possible to have subtargets that can ove...
nbd authored
308 endif #__rules_inc
Something went wrong with that request. Please try again.