2 # Copyright (C) 2012 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
18 PKG_SOURCE_URL
:=git
://git.musl-libc.org
/musl
19 PKG_SOURCE_SUBDIR
=$(PKG_NAME
)-$(PKG_VERSION
)
20 PKG_SOURCE_VERSION
:=$(PKG_SOURCE_VERSION_
$(PKG_VERSION
))
21 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
)-$(PKG_SOURCE_VERSION
).
tar.gz
22 LIBC_SO_VERSION
:=$(PKG_VERSION
)
23 PATCH_DIR
:=$(PATH_PREFIX
)/patches-
$(PKG_VERSION
)
24 CONFIG_DIR
:=$(PATH_PREFIX
)/config-
$(PKG_VERSION
)
26 HOST_BUILD_DIR
:=$(BUILD_DIR_TOOLCHAIN
)/$(PKG_NAME
)-$(PKG_VERSION
)
28 include $(INCLUDE_DIR
)/toolchain-build.mk
31 $(TARGET_CONFIGURE_OPTS
) \
32 CFLAGS
="$(TARGET_CFLAGS)" \
33 CROSS_COMPILE
="$(TARGET_CROSS)" \
34 $(HOST_BUILD_DIR
)/configure \
36 --host
=$(GNU_HOST_NAME
) \
37 --target
=$(REAL_GNU_TARGET_NAME
) \
40 ifeq ($(CONFIG_MUSL_ENABLE_DEBUG
),y
)
46 $(call Host
/Prepare
/Default
)
47 $(if
$(strip $(QUILT
)), \
48 cd
$(HOST_BUILD_DIR
); \
49 if
$(QUILT_CMD
) next
>/dev
/null
2>&1; then \
50 $(QUILT_CMD
) push
-a
; \
53 ln
-snf
$(PKG_NAME
)-$(PKG_VERSION
) $(BUILD_DIR_TOOLCHAIN
)/$(PKG_NAME
)
57 ( cd
$(HOST_BUILD_DIR
); rm -f config.cache
; \
66 $(BUILD_DIR_TOOLCHAIN
)/$(PKG_NAME
) \
67 $(BUILD_DIR_TOOLCHAIN
)/$(LIBC
)-dev