2012-11-23 20:02:29 +00:00
|
|
|
PATH_PREFIX=.
|
|
|
|
|
|
|
|
include ./common.mk
|
|
|
|
|
|
|
|
HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built
|
|
|
|
HOST_STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.musl_installed
|
|
|
|
|
|
|
|
HOST_BUILD_PARALLEL:=1
|
|
|
|
|
2014-02-24 21:10:11 +00:00
|
|
|
MUSL_MAKEOPTS = -C $(HOST_BUILD_DIR) \
|
|
|
|
DESTDIR="$(TOOLCHAIN_DIR)/" \
|
2023-02-09 10:06:31 +00:00
|
|
|
LIBCC="$(shell $(TARGET_CC) -print-libgcc-file-name)"
|
2014-02-24 21:10:11 +00:00
|
|
|
|
2012-11-23 20:02:29 +00:00
|
|
|
define Host/SetToolchainInfo
|
|
|
|
$(SED) 's,^\(LIBC_TYPE\)=.*,\1=$(PKG_NAME),' $(TOOLCHAIN_DIR)/info.mk
|
|
|
|
$(SED) 's,^\(LIBC_URL\)=.*,\1=http://www.musl-libc.org/,' $(TOOLCHAIN_DIR)/info.mk
|
|
|
|
$(SED) 's,^\(LIBC_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk
|
|
|
|
$(SED) 's,^\(LIBC_SO_VERSION\)=.*,\1=$(LIBC_SO_VERSION),' $(TOOLCHAIN_DIR)/info.mk
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Host/Compile
|
2014-03-20 13:51:32 +00:00
|
|
|
+$(MAKE) $(HOST_JOBS) $(MUSL_MAKEOPTS) all
|
2012-11-23 20:02:29 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Host/Install
|
|
|
|
$(call Host/SetToolchainInfo)
|
2017-02-09 12:35:51 +00:00
|
|
|
+$(MAKE) $(HOST_JOBS) $(MUSL_MAKEOPTS) DESTDIR="$(TOOLCHAIN_DIR)/" install
|
2014-06-09 13:47:36 +00:00
|
|
|
$(CP) ./include $(TOOLCHAIN_DIR)/
|
2012-11-23 20:02:29 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call HostBuild))
|