ser2net: update to 3.2
[openadk.git] / mk / host.mk
blob9c5ca1caa0e3671b476e6b28746988004a0a243b
1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 # This is where all package operation is done in
5 ifneq (,$(findstring host,$(MAKECMDGOALS)))
6 WRKDIR?= ${HOST_BUILD_DIR}/w-${PKG_NAME}-${PKG_VERSION}-${PKG_RELEASE}-host
7 endif
9 # this is environment for 'configure'
10 HOST_CONFIGURE_ENV?= PATH='${HOST_PATH}' \
11 ${COMMON_ENV} \
12 ${HOST_ENV} \
13 PKG_CONFIG_LIBDIR='${STAGING_HOST_DIR}/usr/lib/pkgconfig:${STAGING_HOST_DIR}/usr/share/pkgconfig' \
14 PKG_CONFIG_SYSROOT_DIR='${STAGING_HOST_DIR}' \
15 PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
17 # this is environment for 'make all' and 'make install'
18 HOST_MAKE_ENV?=
19 # this is arguments for 'make all' and 'make install'
20 HOST_XAKE_FLAGS?=
21 # this is arguments for 'make all' ONLY
22 HOST_MAKE_FLAGS?=
23 # this is arguments for 'make install' ONLY
24 HOST_FAKE_FLAGS?=
25 HOST_ALL_TARGET?= all
26 HOST_INSTALL_TARGET?= install
28 HOST_MAKE_ENV+= PATH='${HOST_PATH}' \
29 ${COMMON_ENV} \
30 ${HOST_ENV}
31 HOST_MAKE_FLAGS+= ${HOST_XAKE_FLAGS} V=1
32 HOST_FAKE_FLAGS+= ${HOST_XAKE_FLAGS}
34 HOST_WRKINST= ${WRKDIR}/fake
36 _HOST_EXTRACT_COOKIE= ${WRKDIST}/.extract_done
37 _HOST_PATCH_COOKIE= ${WRKDIST}/.prepared
38 _HOST_CONFIGURE_COOKIE= ${WRKDIR}/.host_configure_done
39 _HOST_BUILD_COOKIE= ${WRKDIR}/.host_build_done
40 _HOST_FAKE_COOKIE= ${HOST_WRKINST}/.host_fake_done
41 _HOST_COOKIE= ${STAGING_PKG_DIR}/stamps/${PKG_NAME}\x01${PKG_VERSION}-${PKG_RELEASE}-host
43 hostextract: ${_HOST_EXTRACT_COOKIE}
44 hostpatch: ${_HOST_PATCH_COOKIE}
45 hostconfigure: ${_HOST_CONFIGURE_COOKIE}
46 hostbuild: ${_HOST_BUILD_COOKIE}
47 hostfake: ${_HOST_FAKE_COOKIE}
49 # there are some parameters to the HOST_template function
50 # 1.) Config.in identifier ADK_PACKAGE_$(1)
51 # 2.) name of the package, for single package mostly $(PKG_NAME)
52 # 3.) package version (upstream version) and package release (adk version),
53 # always $(PKG_VERSION)-$(PKG_RELEASE)
55 define HOST_template
56 ALL_PKGOPTS+= $(1)
57 PKGNAME_$(1)= $(2)
58 HOSTDIR_$(1)= $(WRKDIR)/fake
59 ALL_HOSTDIRS+= $${HOSTDIR_$(1)}
60 ALL_HOSTINST+= $(2)-hostinstall
62 $$(HOSTDIR_$(1)): ${_HOST_PATCH_COOKIE} ${_HOST_FAKE_COOKIE}
64 endef
66 .PHONY: all hostextract hostpatch hostconfigure \
67 hostbuild hostpackage hostfake hostclean