2 # Copyright (C) 2012-2013 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR)/rules.mk
8 include $(INCLUDE_DIR)/target.mk
11 PKG_VERSION:=$(call qstrip,$(CONFIG_MUSL_VERSION))
14 PKG_SOURCE_MD5SUM:=a81309e54efdf9c68baf679790fc5678
16 PKG_SOURCE_URL:=http://www.musl-libc.org/releases
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18 LIBC_SO_VERSION:=$(PKG_VERSION)
19 PATCH_DIR:=$(PATH_PREFIX)/patches
21 HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)-$(PKG_VERSION)
23 include $(INCLUDE_DIR)/toolchain-build.mk
26 $(TARGET_CONFIGURE_OPTS) \
27 CFLAGS="$(TARGET_CFLAGS)" \
28 CROSS_COMPILE="$(TARGET_CROSS)" \
29 $(HOST_BUILD_DIR)/configure \
31 --host=$(GNU_HOST_NAME) \
32 --target=$(REAL_GNU_TARGET_NAME) \
35 ifeq ($(CONFIG_MUSL_ENABLE_DEBUG),y)
41 $(call Host/Prepare/Default)
42 $(if $(strip $(QUILT)), \
43 cd $(HOST_BUILD_DIR); \
44 if $(QUILT_CMD) next >/dev/null 2>&1; then \
45 $(QUILT_CMD) push -a; \
48 ln -snf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
52 ( cd $(HOST_BUILD_DIR); rm -f config.cache; \
60 $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) \
61 $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev