libgpg-error: fix riscv64
[openadk.git] / mk / host.mk
blob33c4378362f1768f7b5317e01c285c5acfc171e3
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 HOST_AUTOTOOL_ENV+= PATH='${HOST_PATH}' \
10 PKG_CONFIG_LIBDIR='${STAGING_HOST_DIR}/usr/lib/pkgconfig:${STAGING_HOST_DIR}/usr/share/pkgconfig' \
11 PKG_CONFIG_SYSROOT_DIR='${STAGING_HOST_DIR}' \
12 ${COMMON_ENV}
14 # this is environment for 'configure'
15 HOST_CONFIGURE_ENV?= PATH='${HOST_PATH}' \
16 ${COMMON_ENV} \
17 ${HOST_ENV} \
18 PKG_CONFIG_LIBDIR='${STAGING_HOST_DIR}/usr/lib/pkgconfig:${STAGING_HOST_DIR}/usr/share/pkgconfig:${STAGING_HOST_DIR}/usr/lib/${GNU_HOST_NAME}/pkgconfig' \
19 PKG_CONFIG_SYSROOT_DIR='${STAGING_HOST_DIR}' \
20 PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
22 # this is environment for 'make all' and 'make install'
23 HOST_MAKE_ENV?=
24 # this is arguments for 'make all' and 'make install'
25 HOST_XAKE_FLAGS?=
26 # this is arguments for 'make all' ONLY
27 HOST_MAKE_FLAGS?=
28 # this is arguments for 'make install' ONLY
29 HOST_FAKE_FLAGS?=
30 HOST_ALL_TARGET?= all
31 HOST_INSTALL_TARGET?= install
33 HOST_MAKE_ENV+= PATH='${HOST_PATH}' \
34 ${COMMON_ENV} \
35 ${HOST_ENV}
36 HOST_MAKE_FLAGS+= ${HOST_XAKE_FLAGS} V=1
37 HOST_FAKE_FLAGS+= ${HOST_XAKE_FLAGS}
39 HOST_WRKINST= ${WRKDIR}/fake
41 _HOST_EXTRACT_COOKIE= ${WRKDIST}/.extract_done
42 _HOST_PATCH_COOKIE= ${WRKDIST}/.prepared
43 _HOST_CONFIGURE_COOKIE= ${WRKDIR}/.host_configure_done
44 _HOST_BUILD_COOKIE= ${WRKDIR}/.host_build_done
45 _HOST_FAKE_COOKIE= ${HOST_WRKINST}/.host_fake_done
46 _HOST_COOKIE= ${STAGING_PKG_DIR}/stamps/${PKG_NAME}\x01${PKG_VERSION}-${PKG_RELEASE}-host
48 hostextract: ${_HOST_EXTRACT_COOKIE}
49 hostpatch: ${_HOST_PATCH_COOKIE}
50 hostconfigure: ${_HOST_CONFIGURE_COOKIE}
51 hostbuild: ${_HOST_BUILD_COOKIE}
52 hostfake: ${_HOST_FAKE_COOKIE}
54 # there are some parameters to the HOST_template function
55 # 1.) Config.in identifier ADK_PACKAGE_$(1)
56 # 2.) name of the package, for single package mostly $(PKG_NAME)
57 # 3.) package version (upstream version) and package release (adk version),
58 # always $(PKG_VERSION)-$(PKG_RELEASE)
60 define HOST_template
61 ALL_PKGOPTS+= $(1)
62 PKGNAME_$(1)= $(2)
63 HOSTDIR_$(1)= $(WRKDIR)/fake
64 ALL_HOSTDIRS+= $${HOSTDIR_$(1)}
65 ALL_HOSTINST+= $(2)-hostinstall
67 $$(HOSTDIR_$(1)): ${_HOST_PATCH_COOKIE} ${_HOST_FAKE_COOKIE}
69 endef
71 .PHONY: all hostextract hostpatch hostconfigure \
72 hostbuild hostpackage hostfake hostclean