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
/$(ADK_TARGET_OS
)-ver.mk
6 include $(ADK_TOPDIR
)/mk
/kernel-vars.mk
7 include $(ADK_TOPDIR
)/toolchain
/uclibc-ng
/Makefile.inc
10 PKG_DESCR
:= embedded c library
11 PKG_SECTION
:= base
/libs
12 PKG_OPTS
:= noremove nostaging noscripts
14 PKG_SUBPKGS
:= UCLIBC_NG UCLIBC_NG_DEV
15 PKGSD_UCLIBC_NG_DEV
:= development files for uclibc-ng
16 PKGSC_UCLIBC_NG_DEV
:= devel
20 include $(ADK_TOPDIR
)/mk
/package.mk
22 $(eval
$(call PKG_template
,UCLIBC_NG
,uclibc-ng
,$(PKG_VERSION
)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
23 $(eval
$(call PKG_template
,UCLIBC_NG_DEV
,uclibc-ng-dev
,$(PKG_VERSION
)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_UCLIBC_NG_DEV},${PKGSC_UCLIBC_NG_DEV},${PKG_OPTS}))
27 INSTALL_STYLE
:= manual
30 $(INSTALL_DIR
) $(IDIR_UCLIBC_NG
)/$(ADK_TARGET_LIBC_PATH
) $(IDIR_UCLIBC_NG
)/etc
31 -$(CP
) $(STAGING_TARGET_DIR
)/lib
/ld*-uClibc
*.so
* $(IDIR_UCLIBC_NG
)/$(ADK_TARGET_LIBC_PATH
)
32 -$(CP
) $(STAGING_TARGET_DIR
)/lib
/libc.so.
* $(IDIR_UCLIBC_NG
)/$(ADK_TARGET_LIBC_PATH
)
33 -$(CP
) $(STAGING_TARGET_DIR
)/lib
/libuClibc-
*.so
$(IDIR_UCLIBC_NG
)/$(ADK_TARGET_LIBC_PATH
)
34 ifeq ($(ADK_TARGET_BINFMT_ELF
)$(ADK_TARGET_WITH_MMU
),y
)
35 $(CP
) $(TOOLCHAIN_BUILD_DIR
)/w-
$(PKG_NAME
)-$(PKG_VERSION
)-$(PKG_RELEASE
)/${PKG_NAME}-${PKG_VERSION}/lib
/ld*-uClibc
*.so
* \
36 $(IDIR_UCLIBC_NG
)/$(ADK_TARGET_LIBC_PATH
)
38 ifeq ($(ADK_TARGET_ARCH_CSKY
),y
)
39 cd
$(IDIR_UCLIBC_NG
)/$(ADK_TARGET_LIBC_PATH
) && \
40 ln
-sf ld-uClibc.so
.0 ld.so
.1
42 test -z
$(ADK_RUNTIME_TIMEZONE
) || \
43 grep
$(ADK_RUNTIME_TIMEZONE
) .
/files
/tz.lst | \
44 cut
-f
2 > $(IDIR_UCLIBC_NG
)/etc
/TZ
45 ifeq ($(ADK_TARGET_LIBC_WITH_LOCALE
),y
)
46 ${INSTALL_DIR} $(IDIR_UCLIBC_NG
)/usr
/bin
47 $(INSTALL_BIN
) $(STAGING_TARGET_DIR
)/usr
/bin
/locale \
48 $(IDIR_UCLIBC_NG
)/usr
/bin
51 uclibc-ng-dev-install
:
52 ${INSTALL_DIR} ${IDIR_UCLIBC_NG_DEV}/usr
/lib
${IDIR_UCLIBC_NG_DEV}/$(ADK_TARGET_LIBC_PATH
)
53 ${INSTALL_DIR} ${IDIR_UCLIBC_NG_DEV}/usr
/include
54 -${CP} ${STAGING_TARGET_DIR}/usr
/lib
/libc.so
${IDIR_UCLIBC_NG_DEV}/usr
/lib
55 -${CP} ${STAGING_TARGET_DIR}/usr
/lib
/uclibc_nonshared.a
${IDIR_UCLIBC_NG_DEV}/usr
/lib
56 -${CP} ${STAGING_TARGET_DIR}/usr
/lib
/libpthread_nonshared.a
${IDIR_UCLIBC_NG_DEV}/usr
/lib
57 -${CP} ${STAGING_TARGET_DIR}/usr
/lib
/libm.a
${IDIR_UCLIBC_NG_DEV}/usr
/lib
58 -${CP} ${STAGING_TARGET_DIR}/usr
/lib
/libdl.a
${IDIR_UCLIBC_NG_DEV}/usr
/lib
59 -${CP} ${STAGING_TARGET_DIR}/usr
/lib
/librt.a
${IDIR_UCLIBC_NG_DEV}/usr
/lib
60 -${CP} ${STAGING_TARGET_DIR}/usr
/lib
/libutil.a
${IDIR_UCLIBC_NG_DEV}/usr
/lib
61 -${CP} ${STAGING_TARGET_DIR}/usr
/lib
/libpthread.a
${IDIR_UCLIBC_NG_DEV}/usr
/lib
62 ${CP} ${STAGING_TARGET_DIR}/usr
/lib
/crt
*.o
${IDIR_UCLIBC_NG_DEV}/usr
/lib
63 ${KERNEL_MAKE} INSTALL_HDR_PATH
=$(IDIR_UCLIBC_NG_DEV
)/usr headers_install
64 $(MAKE
) -C
$(TOOLCHAIN_BUILD_DIR
)/w-
$(PKG_NAME
)-$(PKG_VERSION
)-$(PKG_RELEASE
)/${PKG_NAME}-${PKG_VERSION} \
65 PREFIX
=$(IDIR_UCLIBC_NG_DEV
)/ \
67 RUNTIME_PREFIX
=$(IDIR_UCLIBC_NG_DEV
)/ \
68 HOSTCC
="$(CC_FOR_BUILD)" \
69 CPU_CFLAGS
="$(TARGET_CFLAGS)" \
71 @find
$(IDIR_UCLIBC_NG_DEV
) -name .
install -exec
rm {} \
;
72 @find
$(IDIR_UCLIBC_NG_DEV
) -name ..
install.cmd
-exec
rm {} \
;
74 include ${ADK_TOPDIR}/mk
/pkg-bottom.mk