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))
12 PKG_RELEASE=$(PKG_SOURCE_VERSION)
14 PKG_SOURCE_VERSION_0.9.8:=e6dcebd5efa2d390f0a24dc11444024e9fd1990c
15 PKG_SOURCE_VERSION_0.9.9:=a57ac9bf64ba202bd94d1b81bddd93b850c7b9d6
16 PKG_SOURCE_VERSION_0.9.10:=7bec92e793d4b8a349796848cf43c7329b0f2ed0
17 PKG_SOURCE_VERSION_0.9.11:=6688a778b0419eab32e715f269319248edee9da5
20 PKG_SOURCE_URL:=git://git.musl-libc.org/musl
21 PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION)
22 PKG_SOURCE_VERSION:=$(PKG_SOURCE_VERSION_$(PKG_VERSION))
23 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
24 LIBC_SO_VERSION:=$(PKG_VERSION)
25 PATCH_DIR:=$(PATH_PREFIX)/patches-$(PKG_VERSION)
26 CONFIG_DIR:=$(PATH_PREFIX)/config-$(PKG_VERSION)
28 HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)-$(PKG_VERSION)
30 include $(INCLUDE_DIR)/toolchain-build.mk
33 $(TARGET_CONFIGURE_OPTS) \
34 CFLAGS="$(TARGET_CFLAGS)" \
35 CROSS_COMPILE="$(TARGET_CROSS)" \
36 $(HOST_BUILD_DIR)/configure \
38 --host=$(GNU_HOST_NAME) \
39 --target=$(REAL_GNU_TARGET_NAME) \
42 ifeq ($(CONFIG_MUSL_ENABLE_DEBUG),y)
48 $(call Host/Prepare/Default)
49 $(if $(strip $(QUILT)), \
50 cd $(HOST_BUILD_DIR); \
51 if $(QUILT_CMD) next >/dev/null 2>&1; then \
52 $(QUILT_CMD) push -a; \
55 ln -snf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
59 ( cd $(HOST_BUILD_DIR); rm -f config.cache; \
67 $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) \
68 $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev