1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
5 INSTALL_DIR
= install -d
-m0755
6 INSTALL_DATA
= install -m0644
7 INSTALL_BIN
= install -m0755
8 INSTALL_SCRIPT
= install -m0755
9 MAKEFLAGS
= $(EXTRA_MAKEFLAGS
)
10 BUILD_USER
= $(shell id
-un
)
11 BUILD_GROUP
= $(shell id
-gn
)
12 ADK_SUFFIX
:= ${ADK_TARGET_SYSTEM}
13 ifneq ($(ADK_TARGET_LIBC
),)
14 ADK_SUFFIX
:= $(ADK_SUFFIX
)_
$(ADK_TARGET_LIBC
)
16 ifneq ($(ADK_TARGET_CPU_TYPE
),)
17 ADK_SUFFIX
:= $(ADK_SUFFIX
)_
$(ADK_TARGET_CPU_TYPE
)
19 ifneq ($(ADK_TARGET_ENDIAN_SUFFIX
),)
20 ADK_SUFFIX
:= $(ADK_SUFFIX
)$(ADK_TARGET_ENDIAN_SUFFIX
)
22 ifneq ($(ADK_TARGET_FLOAT
),)
23 ADK_SUFFIX
:= $(ADK_SUFFIX
)_
$(ADK_TARGET_FLOAT
)
25 ifneq ($(ADK_TARGET_ABI
),)
26 ADK_SUFFIX
:= $(ADK_SUFFIX
)_
$(ADK_TARGET_ABI
)
28 ifneq ($(ADK_TARGET_BINFMT
),)
29 ADK_SUFFIX
:= $(ADK_SUFFIX
)_
$(ADK_TARGET_BINFMT
)
33 BASE_DIR
:= $(ADK_TOPDIR
)
35 DL_DIR?
= $(BASE_DIR
)/dl
37 DL_DIR?
= $(ADK_DL_DIR
)
39 SCRIPT_DIR
:= $(BASE_DIR
)/scripts
40 STAGING_HOST_DIR
:= ${BASE_DIR}/host_
${GNU_HOST_NAME}
41 HOST_BUILD_DIR
:= ${BASE_DIR}/host_build_
${GNU_HOST_NAME}
42 TOOLCHAIN_DIR
:= ${BASE_DIR}/toolchain_
${ADK_SUFFIX}
45 FW_DIR_PFX
:= $(BASE_DIR
)/firmware
46 BUILD_DIR_PFX
:= $(BASE_DIR
)/build_
*
47 STAGING_PKG_DIR_PFX
:= ${BASE_DIR}/pkg_
*
48 STAGING_TARGET_DIR_PFX
:=${BASE_DIR}/target_
*
49 TOOLCHAIN_DIR_PFX
= $(BASE_DIR
)/toolchain_
*
50 STAGING_HOST_DIR_PFX
:= ${BASE_DIR}/host_
*
51 TARGET_DIR_PFX
:= $(BASE_DIR
)/root_
*
53 TARGET_DIR
:= $(BASE_DIR
)/root_
${ADK_SUFFIX}
54 FW_DIR
:= $(BASE_DIR
)/firmware
/${ADK_SUFFIX}
55 BUILD_DIR
:= ${BASE_DIR}/build_
${ADK_SUFFIX}
56 STAGING_TARGET_DIR
:= ${BASE_DIR}/target_
${ADK_SUFFIX}
57 STAGING_PKG_DIR
:= ${BASE_DIR}/pkg_
${ADK_SUFFIX}
58 STAGING_HOST2TARGET
:= ..
/..
/target_
${ADK_SUFFIX}
59 TOOLCHAIN_BUILD_DIR
= $(BASE_DIR
)/toolchain_build_
${ADK_SUFFIX}
60 PACKAGE_DIR
:= $(FW_DIR
)/packages
61 SCRIPT_TARGET_DIR
:= ${STAGING_TARGET_DIR}/scripts
64 TARGET_PATH
= ${SCRIPT_DIR}:${STAGING_TARGET_DIR}/scripts
:${TOOLCHAIN_DIR}/usr
/bin
:${STAGING_HOST_DIR}/usr
/bin
:${_PATH}
65 HOST_PATH
= ${SCRIPT_DIR}:${TOOLCHAIN_DIR}/usr
/bin
:${STAGING_HOST_DIR}/usr
/bin
:${STAGING_HOST_DIR}/usr
/sbin
:${_PATH}
66 AUTOTOOL_PATH
= ${TOOLCHAIN_DIR}/usr
/bin
:${STAGING_HOST_DIR}/usr
/bin
:${STAGING_TARGET_DIR}/scripts
:${_PATH}
68 ifeq ($(ADK_DISABLE_HONOUR_CFLAGS
),)
69 GCC_CHECK
:= GCC_HONOUR_COPTS
=2
74 ifeq ($(ADK_TARGET_UCLINUX
),y
)
75 ADK_TARGET_LINUXTYPE
:= uclinux
77 ADK_TARGET_LINUXTYPE
:= linux
80 GNU_TARGET_NAME
:= $(ADK_TARGET_CPU_ARCH
)-$(ADK_VENDOR
)-$(ADK_TARGET_LINUXTYPE
)-$(ADK_TARGET_SUFFIX
)
81 ifeq ($(ADK_TARGET_ARCH_C6X
),y
)
82 GNU_TARGET_NAME
:= $(ADK_TARGET_CPU_ARCH
)-$(ADK_TARGET_LINUXTYPE
)
84 ifeq ($(ADK_TARGET_ARCH_CSKY
),y
)
85 GNU_TARGET_NAME
:= $(ADK_TARGET_CPU_ARCH
)-unknown-
$(ADK_TARGET_LINUXTYPE
)
87 ifeq ($(ADK_TARGET_LIB_NEWLIB
),y
)
88 ifeq ($(ADK_TARGET_OS_FROSTED
),y
)
89 GNU_TARGET_NAME
:= $(ADK_TARGET_CPU_ARCH
)-frosted-
$(ADK_TARGET_SUFFIX
)
91 GNU_TARGET_NAME
:= $(ADK_TARGET_CPU_ARCH
)-$(ADK_TARGET_SUFFIX
)
94 TARGET_CROSS
:= $(TOOLCHAIN_DIR
)/usr
/bin
/$(GNU_TARGET_NAME
)-
95 TARGET_COMPILER_PREFIX?
=${TARGET_CROSS}
96 CONFIGURE_TRIPLE
:= --build
=${GNU_HOST_NAME} \
97 --host
=${GNU_TARGET_NAME} \
98 --target
=${GNU_TARGET_NAME}
101 ifeq ($(ADK_BUILD_COMPILER_GCC
),y
)
102 TARGET_CC
:= ${TARGET_COMPILER_PREFIX}gcc
103 TARGET_CXX
:= ${TARGET_COMPILER_PREFIX}g
++
104 TARGET_CC_NO_CCACHE
:= ${TARGET_CC}
105 TARGET_CXX_NO_CCACHE
:= ${TARGET_CXX}
107 ifeq ($(ADK_BUILD_COMPILER_LLVM
),y
)
108 TARGET_CC
:= clang
--target
=${GNU_TARGET_NAME} --sysroot
=$(STAGING_TARGET_DIR
)
109 TARGET_CXX
:= clang
++ --target
=${GNU_TARGET_NAME} --sysroot
=$(STAGING_TARGET_DIR
)
110 TARGET_LDFLAGS
:= -fuse-ld
=lld
-stdlib
=libc
++
114 ifeq ($(ADK_BUILD_COMPILER_GCC
),y
)
115 ifneq ($(strip ${ADK_USE_CCACHE}),)
116 TARGET_CC
:= $(STAGING_HOST_DIR
)/usr
/bin
/ccache
${TARGET_CC_NO_CCACHE}
117 TARGET_CXX
:= $(STAGING_HOST_DIR
)/usr
/bin
/ccache
${TARGET_CXX_NO_CCACHE}
120 # for x86_64 x32 ABI we need to extend TARGET_CC/TARGET_CXX
121 ifeq ($(ADK_TARGET_ABI_X32
),y
)
122 TARGET_CC
+= $(ADK_TARGET_ABI_CFLAGS
)
123 TARGET_CXX
+= $(ADK_TARGET_ABI_CFLAGS
)
126 TARGET_LD
:= ${TARGET_COMPILER_PREFIX}ld
127 ifneq ($(ADK_TARGET_USE_LTO
),)
128 TARGET_AR
:= ${TARGET_COMPILER_PREFIX}gcc-ar
129 TARGET_RANLIB
:= ${TARGET_COMPILER_PREFIX}gcc-ranlib
131 TARGET_AR
:= ${TARGET_COMPILER_PREFIX}ar
132 TARGET_RANLIB
:= ${TARGET_COMPILER_PREFIX}ranlib
136 TARGET_CFLAGS
:= -fwrapv
-fno-ident
137 TARGET_CXXFLAGS
:= -fwrapv
-fno-ident
138 TARGET_LDFLAGS
:= -L
$(STAGING_TARGET_DIR
)/lib
-L
$(STAGING_TARGET_DIR
)/usr
/lib \
139 -Wl
,-O1
-Wl
,-rpath
-Wl
,/usr
/lib \
140 -Wl
,-rpath-link
-Wl
,${STAGING_TARGET_DIR}/usr
/lib
142 ifeq ($(ADK_BUILD_COMPILER_GCC
),y
)
143 ifeq ($(ADK_DISABLE_HONOUR_CFLAGS
),)
144 TARGET_CFLAGS
+= -fhonour-copts
145 TARGET_CXXFLAGS
+= -fhonour-copts
149 # for architectures where gcc --with-cpu matches -mcpu=
150 ifneq ($(ADK_TARGET_GCC_CPU
),)
151 TARGET_CFLAGS
+= -mcpu
=$(ADK_TARGET_GCC_CPU
)
152 TARGET_CXXFLAGS
+= -mcpu
=$(ADK_TARGET_GCC_CPU
)
155 # for archiectures where gcc --with-arch matches -march=
156 ifneq ($(ADK_TARGET_GCC_ARCH
),)
157 TARGET_CFLAGS
+= -march
=$(ADK_TARGET_GCC_ARCH
)
158 TARGET_CXXFLAGS
+= -march
=$(ADK_TARGET_GCC_ARCH
)
161 ifneq ($(ADK_TARGET_CPU_FLAGS
),)
162 TARGET_CFLAGS
+= $(ADK_TARGET_CPU_FLAGS
)
163 TARGET_CXXFLAGS
+= $(ADK_TARGET_CPU_FLAGS
)
164 TARGET_LDFLAGS
+= $(ADK_TARGET_CPU_FLAGS
)
167 ifneq ($(ADK_TARGET_FPU
),)
168 TARGET_CFLAGS
+= -mfpu
=$(ADK_TARGET_FPU
)
169 TARGET_CXXFLAGS
+= -mfpu
=$(ADK_TARGET_FPU
)
172 ifneq ($(ADK_TARGET_FLOAT
),)
173 ifeq ($(ADK_TARGET_ARCH_ARM
),y
)
174 TARGET_CFLAGS
+= -mfloat-abi
=$(ADK_TARGET_FLOAT
)
175 TARGET_CXXFLAGS
+= -mfloat-abi
=$(ADK_TARGET_FLOAT
)
177 ifeq ($(ADK_TARGET_ARCH_MIPS
),y
)
178 TARGET_CFLAGS
+= -m
$(ADK_TARGET_FLOAT
)-float
179 TARGET_CXXFLAGS
+= -m
$(ADK_TARGET_FLOAT
)-float
183 ifeq ($(ADK_TARGET_BINFMT_FLAT
),y
)
184 TARGET_LDFLAGS
+= -Wl
,-elf2flt
185 TARGET_CFLAGS
+= -Wl
,-elf2flt
186 TARGET_CXXFLAGS
+= -Wl
,-elf2flt
189 ifeq ($(ADK_TARGET_BINFMT_FLAT_SEP_DATA
),y
)
190 TARGET_CFLAGS
+= -msep-data
191 TARGET_CXXFLAGS
+= -msep-data
194 ifeq ($(ADK_TARGET_BINFMT_FLAT_SHARED
),y
)
195 TARGET_LDFLAGS
+= -mid-shared-library
198 # security optimization, see http://www.akkadia.org/drepper/dsohowto.pdf
199 ifneq ($(ADK_TARGET_USE_LD_RELRO
),)
200 TARGET_LDFLAGS
+= -Wl
,-z
,relro
202 ifneq ($(ADK_TARGET_USE_LD_BIND_NOW
),)
203 TARGET_LDFLAGS
+= -Wl
,-z
,now
206 # needed for musl ppc
207 ifeq ($(ADK_TARGET_ARCH_PPC
),y
)
208 ifeq ($(ADK_TARGET_LIB_MUSL
),y
)
209 TARGET_LDFLAGS
+= -Wl
,--secure-plt
213 ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY
),y
)
214 TARGET_CFLAGS
+= -static
215 TARGET_CXXFLAGS
+= -static
216 TARGET_LDFLAGS
+= -static
219 ifneq ($(ADK_TARGET_USE_SSP
),)
220 TARGET_CFLAGS
+= -fstack-protector-all
--param
=ssp-buffer-size
=4
221 TARGET_CXXFLAGS
+= -fstack-protector-all
--param
=ssp-buffer-size
=4
222 TARGET_LDFLAGS
+= -fstack-protector-all
225 ifneq ($(ADK_TARGET_USE_LD_GC
),)
226 TARGET_CFLAGS
+= -fdata-sections
-ffunction-sections
227 TARGET_CXXFLAGS
+= -fdata-sections
-ffunction-sections
228 TARGET_LDFLAGS
+= -Wl
,--gc-sections
231 ifneq ($(ADK_TARGET_USE_LTO
),)
232 TARGET_CFLAGS
+= -flto
233 TARGET_CXXFLAGS
+= -flto
234 TARGET_LDFLAGS
+= -flto
237 # performance optimization, see http://www.akkadia.org/drepper/dsohowto.pdf
238 ifneq ($(ADK_TARGET_USE_GNU_HASHSTYLE
),)
239 TARGET_LDFLAGS
+= -Wl
,--hash-style
=gnu
242 # special operating system flags
243 ifeq ($(ADK_TARGET_OS_FROSTED
),y
)
244 TARGET_CFLAGS
+= -mlong-calls
-fno-common
-msingle-pic-base
-mno-pic-data-is-text-relative
247 # special architecture optimization flags
248 ifeq ($(ADK_TARGET_ARCH_XTENSA
),y
)
249 ifeq ($(ADK_TARGET_BIG_ENDIAN
),)
250 TARGET_CFLAGS
+= -mlongcalls
-mauto-litpools
251 TARGET_CXXFLAGS
+= -mlongcalls
-mauto-litpools
254 ifeq ($(ADK_TARGET_ARCH_MICROBLAZE
),y
)
255 TARGET_CFLAGS
+= -mxl-barrel-shift
256 TARGET_CXXFLAGS
+= -mxl-barrel-shift
262 # add configured compiler flags for optimization
263 TARGET_CFLAGS
+= $(ADK_TARGET_CFLAGS_OPT
)
264 TARGET_CXXFLAGS
+= $(ADK_TARGET_CFLAGS_OPT
)
266 # add compiler flags for debug information
267 ifneq ($(ADK_DEBUG
),)
269 TARGET_CXXFLAGS
+= -g3
272 ifneq ($(ADK_DEBUG
),)
273 ifeq ($(ADK_TARGET_ARCH_ARM_WITH_THUMB
),)
274 TARGET_CFLAGS
+= -fno-omit-frame-pointer
275 TARGET_CXXFLAGS
+= -fno-omit-frame-pointer
277 TARGET_CFLAGS
+= -funwind-tables
-fasynchronous-unwind-tables
278 TARGET_CXXFLAGS
+= -funwind-tables
-fasynchronous-unwind-tables
280 TARGET_CPPFLAGS
+= -DNDEBUG
281 TARGET_CFLAGS
+= -fomit-frame-pointer
282 TARGET_CXXFLAGS
+= -fomit-frame-pointer
283 # stop generating eh_frame stuff
284 TARGET_CFLAGS
+= -fno-unwind-tables
-fno-asynchronous-unwind-tables
285 TARGET_CXXFLAGS
+= -fno-unwind-tables
-fno-asynchronous-unwind-tables
286 ifeq ($(ADK_TARGET_CPU_CF
),y
)
287 TARGET_CFLAGS
+= -fno-dwarf2-cfi-asm
288 TARGET_CXXFLAGS
+= -fno-dwarf2-cfi-asm
292 ifeq ($(ADK_TARGET_ARCH_ARM
),y
)
293 ifeq ($(ADK_TARGET_ARCH_ARM_WITH_NEON
),y
)
294 TARGET_CFLAGS
+= -ffast-math
295 TARGET_CXXFLAGS
+= -ffast-math
297 ifeq ($(ADK_TARGET_ARCH_ARM_WITH_THUMB
),y
)
298 TARGET_CFLAGS
+= -mthumb
-Wa
,-mimplicit-it
=thumb
-mno-thumb-interwork
299 TARGET_CXXFLAGS
+= -mthumb
-Wa
,-mimplicit-it
=thumb
-mno-thumb-interwork
301 TARGET_CFLAGS
+= -marm
302 TARGET_CXXFLAGS
+= -marm
306 # host compiler and linker flags
307 HOST_CPPFLAGS
:= -I
$(STAGING_HOST_DIR
)/usr
/include
308 ifeq ($(OS_FOR_BUILD
),Darwin
)
309 HOST_LDFLAGS
:= -L
$(STAGING_HOST_DIR
)/usr
/lib
311 HOST_LDFLAGS
:= -L
$(STAGING_HOST_DIR
)/usr
/lib
-Wl
,-rpath
-Wl
,${STAGING_HOST_DIR}/usr
/lib
314 ifneq (${ADK_UPDATE_PATCHES_GIT},)
315 PATCH
= PATH
='${HOST_PATH}' ${BASH} $(SCRIPT_DIR
)/patch_git.sh
317 PATCH
= PATH
='${HOST_PATH}' ${BASH} $(SCRIPT_DIR
)/patch.sh
319 PATCHP0
= PATH
='${HOST_PATH}' patch
-p0
321 ifeq ($(ADK_STATIC_TOOLCHAIN
),y
)
322 HOST_STATIC_CFLAGS
:= -static
-Wl
,-static
323 HOST_STATIC_CXXFLAGS
:= -static
-Wl
,-static
324 HOST_STATIC_LDFLAGS
:= -Wl
,-static
327 SED
:= PATH
='${HOST_PATH}' sed
-i
-e
328 XZ
:= PATH
='${HOST_PATH}' xz
329 CPIO
:= PATH
='${HOST_PATH}' cpio
330 LINUX_DIR
:= $(BUILD_DIR
)/linux
331 KERNEL_MODULE_FLAGS
:= ARCH
=${ADK_TARGET_KARCH} \
333 KERNEL_PATH
=${LINUX_DIR} \
334 KERNELDIR
=${LINUX_DIR} \
335 KERNEL_DIR
=${LINUX_DIR} \
336 CROSS_COMPILE
="${TARGET_CROSS}" \
339 ifeq ($(ADK_BUILD_COMPILER_GCC
),y
)
340 ifeq ($(ADK_DISABLE_HONOUR_CFLAGS
),)
341 KERNEL_MODULE_FLAGS
+= CFLAGS_MODULE
="-fhonour-copts"
345 COMMON_ENV
= CONFIG_SHELL
='$(strip ${SHELL})' \
346 AUTOM4TE
='${STAGING_HOST_DIR}/usr/bin/autom4te' \
347 M4
='${STAGING_HOST_DIR}/usr/bin/m4' \
348 LIBTOOLIZE
='${STAGING_HOST_DIR}/usr/bin/libtoolize'
350 ifneq ($(ADK_TARGET_USE_LTO
),)
351 TOOLS_ENV
= AR
='$(TARGET_CROSS)gcc-ar' \
352 RANLIB
='$(TARGET_CROSS)gcc-ranlib' \
353 NM
='$(TARGET_CROSS)gcc-nm'
355 TOOLS_ENV
= AR
='$(TARGET_CROSS)ar' \
356 RANLIB
='$(TARGET_CROSS)ranlib' \
357 NM
='$(TARGET_CROSS)nm'
360 TARGET_ENV
= $(TOOLS_ENV
) \
361 AS
='$(TARGET_CROSS)as' \
362 LD
='$(TARGET_CROSS)ld' \
363 STRIP
='$(TARGET_CROSS)strip' \
364 OBJCOPY
='$(TARGET_CROSS)objcopy' \
367 CXX
='$(TARGET_CXX)' \
368 CROSS
='$(TARGET_CROSS)' \
369 CROSS_COMPILE
='$(TARGET_CROSS)' \
370 CFLAGS
='$(TARGET_CFLAGS)' \
371 CXXFLAGS
='$(TARGET_CXXFLAGS)' \
372 CPPFLAGS
='$(TARGET_CPPFLAGS)' \
373 LDFLAGS
='$(TARGET_LDFLAGS)' \
374 CC_FOR_BUILD
='$(HOST_CC)' \
375 CXX_FOR_BUILD
='$(HOST_CXX)' \
376 CPPFLAGS_FOR_BUILD
='$(HOST_CPPFLAGS)' \
377 CFLAGS_FOR_BUILD
='$(HOST_CFLAGS)' \
378 CXXFLAGS_FOR_BUILD
='$(HOST_CXXFLAGS)' \
379 LDFLAGS_FOR_BUILD
='$(HOST_LDFLAGS)' \
380 LIBS_FOR_BUILD
='$(HOST_LIBS)'
382 HOST_ENV
= CC
='$(HOST_CC)' \
384 CPPFLAGS
='$(HOST_CPPFLAGS)' \
385 CFLAGS
='$(HOST_CFLAGS)' \
386 CXXFLAGS
='$(HOST_CXXFLAGS)' \
387 LDFLAGS
='$(HOST_LDFLAGS)' \
388 CC_FOR_BUILD
='$(HOST_CC)' \
389 CFLAGS_FOR_BUILD
='$(HOST_CFLAGS)'
391 PKG_SUFFIX
:= $(strip $(subst ",, $(ADK_PACKAGE_SUFFIX)))
393 ifeq ($(ADK_TARGET_PACKAGE_IPKG),y)
394 PKG_BUILD:= ${BASH} ${SCRIPT_DIR}/ipkg-build
395 PKG_INSTALL:= PATH='${HOST_PATH}' \
396 IPKG_TMP=$(BUILD_DIR)/tmp \
397 IPKG_INSTROOT=$(TARGET_DIR) \
398 IPKG_CONF_DIR=$(STAGING_TARGET_DIR)/etc \
399 IPKG_OFFLINE_ROOT=$(TARGET_DIR) \
400 BIN_DIR=$(STAGING_HOST_DIR)/usr/bin \
401 ${BASH} ${SCRIPT_DIR}/ipkg \
402 -force-defaults -force-depends install
403 PKG_STATE_DIR:= $(TARGET_DIR)/usr/lib/ipkg
406 ifeq ($(ADK_TARGET_PACKAGE_OPKG),y)
407 PKG_BUILD:= ${BASH} ${SCRIPT_DIR}/ipkg-build
408 PKG_INSTALL:= PATH='${HOST_PATH}' \
409 IPKG_TMP=$(BUILD_DIR)/tmp \
410 IPKG_INSTROOT=$(TARGET_DIR) \
411 IPKG_CONF_DIR=$(STAGING_TARGET_DIR)/etc \
412 IPKG_OFFLINE_ROOT=$(TARGET_DIR) \
413 BIN_DIR=$(STAGING_HOST_DIR)/usr/bin \
414 ${BASH} ${SCRIPT_DIR}/ipkg \
415 -force-defaults -force-depends install
416 PKG_STATE_DIR:= $(TARGET_DIR)/usr/lib/opkg
419 ifeq ($(ADK_TARGET_PACKAGE_TXZ),y)
420 PKG_BUILD:= ${BASH} ${SCRIPT_DIR}/tarpkg build
421 PKG_INSTALL:= PKG_INSTROOT='$(TARGET_DIR)' \
422 PATH='${HOST_PATH}' ${BASH} ${SCRIPT_DIR}/tarpkg install
423 PKG_STATE_DIR:= $(TARGET_DIR)/usr/lib/pkg
426 RSTRIP:= PATH="$(TARGET_PATH
)" prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh
428 STATCMD:=$(shell if stat -qs .>/dev/null 2>&1; then echo 'stat -f %z';else echo 'stat -c %s';fi)
430 EXTRACT_CMD= PATH='${HOST_PATH}'; mkdir -p ${WRKDIR}; \
432 for file in ${FULLDISTFILES}; do case $$file in \
434 cat $$file | cpio -i -d ;; \
437 *.cpio.Z | *.cpio.gz | *.cgz | *.mcz) \
438 gzip -dc $$file | cpio -i -d ;; \
440 xz -dc $$file | tar -xf - ;; \
441 *.tar.Z | *.tar.gz | *.taz | *.tgz) \
442 gzip -dc $$file | tar -xf - ;; \
443 *.cpio.bz2 | *.cbz) \
444 bzip2 -dc $$file | cpio -i -d ;; \
445 *.tar.bz2 | *.tbz | *.tbz2) \
446 bzip2 -dc $$file | tar -xf - ;; \
448 lzip -dc $$file | tar -xf - ;; \
450 unzip -d ${WRKDIR} $$file ;; \
451 *.arm|*.jar|*.ids.gz) \
452 mkdir ${WRKBUILD}; cp $$file ${WRKBUILD} ;; \
454 sh $$file --force --auto-accept ;; \
456 echo "Cannot extract
'$$file'" >&2; \
460 ifneq (,$(filter CYGWIN%,${OS_FOR_BUILD}))
464 include $(ADK_TOPDIR)/mk/mirrors.mk