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 include $(ADK_TOPDIR
)/rules.mk
5 include $(ADK_TOPDIR
)/mk
/kernel-ver.mk
6 include $(ADK_TOPDIR
)/mk
/kernel-vars.mk
7 include $(ADK_TOPDIR
)/toolchain
/musl
/Makefile.inc
10 PKG_DESCR
:= embedded C library
11 PKG_SECTION
:= base
/libs
12 PKG_OPTS
:= noremove nostaging noscripts
14 PKG_SUBPKGS
:= MUSL MUSL_DEV
15 PKGSD_MUSL_DEV
:= development files for musl
16 PKGSC_MUSL_DEV
:= dev
/header
20 include $(ADK_TOPDIR
)/mk
/package.mk
22 $(eval
$(call PKG_template
,MUSL
,musl
,$(PKG_VERSION
)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
23 $(eval
$(call PKG_template
,MUSL_DEV
,musl-dev
,$(PKG_VERSION
)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_MUSL_DEV},${PKGSC_MUSL_DEV},${PKG_OPTS}))
27 INSTALL_STYLE
:= manual
29 MARCH
:= $(ADK_TARGET_CPU_ARCH
)
30 ifeq ($(ADK_TARGET_CPU_ARCH
),i686
)
33 ifeq ($(ADK_TARGET_CPU_ARCH
),i586
)
36 ifeq ($(ADK_TARGET_CPU_ARCH
),i486
)
39 ifeq ($(ADK_TARGET_CPU_ARCH
),ppc
)
42 ifeq ($(ADK_TARGET_CPU_ARCH
),sh4
)
45 ifeq ($(ADK_TARGET_CPU_ARCH
),sh4eb
)
48 ifeq ($(ADK_TARGET_ARCH_ARM
),y
)
49 ifeq ($(ADK_TARGET_ABI
),eabihf
)
53 ifeq ($(ADK_TARGET_ABI_X32
),y
)
57 # do nothing, musl is already build in toolchain directory
59 ifneq ($(ADK_TARGET_USE_STATIC_LIBS
),y
)
60 ${INSTALL_DIR} $(IDIR_MUSL
)/bin
61 ${INSTALL_DIR} $(IDIR_MUSL
)/$(ADK_TARGET_LIBC_PATH
)
62 $(CP
) $(STAGING_TARGET_DIR
)/usr
/lib
/libc.so
$(IDIR_MUSL
)/$(ADK_TARGET_LIBC_PATH
)
63 (cd
$(IDIR_MUSL
)/$(ADK_TARGET_LIBC_PATH
) && \
64 ln
-sf libc.so ld-musl-
$(MARCH
).so
.1)
65 (cd
$(IDIR_MUSL
)/bin
&& \
66 ln
-sf ..
/lib
/ld-musl-
$(MARCH
).so
.1 ldd
)
71 ${INSTALL_DIR} ${IDIR_MUSL_DEV}/usr
/lib
72 ${CP} ${STAGING_TARGET_DIR}/usr
/lib
/crt
*.o
${IDIR_MUSL_DEV}/usr
/lib
74 $(MAKE
) -C
$(TOOLCHAIN_BUILD_DIR
)/w-linux-
$(KERNEL_VERSION
)-$(KERNEL_RELEASE
)/linux-
$(KERNEL_VERSION
) \
76 INSTALL_HDR_PATH
=$(IDIR_MUSL_DEV
)/usr \
78 $(MAKE
) -C
$(TOOLCHAIN_BUILD_DIR
)/w-
$(PKG_NAME
)-$(PKG_VERSION
)-$(PKG_RELEASE
)/${PKG_NAME}-${PKG_VERSION} \
79 DESTDIR
=$(IDIR_MUSL_DEV
) \
81 @find
$(IDIR_MUSL_DEV
) -name .
install -exec
rm {} \
;
82 @find
$(IDIR_MUSL_DEV
) -name ..
install.cmd
-exec
rm {} \
;
84 include ${ADK_TOPDIR}/mk
/pkg-bottom.mk