Makefile 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include $(ADK_TOPDIR)/rules.mk
  4. include $(ADK_TOPDIR)/mk/$(ADK_TARGET_OS)-ver.mk
  5. include $(ADK_TOPDIR)/mk/kernel-vars.mk
  6. include $(ADK_TOPDIR)/toolchain/uclibc-ng/Makefile.inc
  7. PKG_NAME:= uClibc-ng
  8. PKG_DESCR:= embedded c library
  9. PKG_SECTION:= base/libs
  10. PKG_OPTS:= noremove nostaging noscripts
  11. PKG_SUBPKGS:= UCLIBC_NG UCLIBC_NG_DEV
  12. PKGSD_UCLIBC_NG_DEV:= development files for uclibc-ng
  13. PKGSC_UCLIBC_NG_DEV:= devel
  14. NO_DISTFILES:= 1
  15. include $(ADK_TOPDIR)/mk/package.mk
  16. $(eval $(call PKG_template,UCLIBC_NG,uclibc-ng,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
  17. $(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}))
  18. CONFIG_STYLE:= manual
  19. BUILD_STYLE:= manual
  20. INSTALL_STYLE:= manual
  21. uclibc-ng-install:
  22. $(INSTALL_DIR) $(IDIR_UCLIBC_NG)/$(ADK_TARGET_LIBC_PATH) $(IDIR_UCLIBC_NG)/etc
  23. -$(CP) $(STAGING_TARGET_DIR)/lib/ld*-uClibc*.so* $(IDIR_UCLIBC_NG)/$(ADK_TARGET_LIBC_PATH)
  24. -$(CP) $(STAGING_TARGET_DIR)/lib/libc.so.* $(IDIR_UCLIBC_NG)/$(ADK_TARGET_LIBC_PATH)
  25. -$(CP) $(STAGING_TARGET_DIR)/lib/libuClibc-*.so $(IDIR_UCLIBC_NG)/$(ADK_TARGET_LIBC_PATH)
  26. ifeq ($(ADK_TARGET_ARCH_CSKY),y)
  27. cd $(IDIR_UCLIBC_NG)/$(ADK_TARGET_LIBC_PATH) && \
  28. ln -sf ld-uClibc.so.0 ld.so.1
  29. endif
  30. test -z $(ADK_RUNTIME_TIMEZONE) || \
  31. grep $(ADK_RUNTIME_TIMEZONE) ./files/tz.lst | \
  32. cut -f 2 > $(IDIR_UCLIBC_NG)/etc/TZ
  33. ifeq ($(ADK_TARGET_LIBC_WITH_LOCALE),y)
  34. ${INSTALL_DIR} $(IDIR_UCLIBC_NG)/usr/bin
  35. $(INSTALL_BIN) $(STAGING_TARGET_DIR)/usr/bin/locale \
  36. $(IDIR_UCLIBC_NG)/usr/bin
  37. endif
  38. uclibc-ng-dev-install:
  39. ${INSTALL_DIR} ${IDIR_UCLIBC_NG_DEV}/usr/lib ${IDIR_UCLIBC_NG_DEV}/$(ADK_TARGET_LIBC_PATH)
  40. -${CP} ${STAGING_TARGET_DIR}/usr/lib/libc.so ${IDIR_UCLIBC_NG_DEV}/usr/lib
  41. -${CP} ${STAGING_TARGET_DIR}/usr/lib/uclibc_nonshared.a ${IDIR_UCLIBC_NG_DEV}/usr/lib
  42. ${CP} ${STAGING_TARGET_DIR}/usr/lib/crt*.o ${IDIR_UCLIBC_NG_DEV}/usr/lib
  43. ${KERNEL_MAKE} INSTALL_HDR_PATH=$(IDIR_UCLIBC_NG_DEV)/usr headers_install
  44. $(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/${PKG_NAME}-${PKG_VERSION} \
  45. PREFIX=$(IDIR_UCLIBC_NG_DEV)/ \
  46. DEVEL_PREFIX=/usr \
  47. RUNTIME_PREFIX=$(IDIR_UCLIBC_NG_DEV)/ \
  48. HOSTCC="$(CC_FOR_BUILD)" \
  49. CPU_CFLAGS="$(TARGET_CFLAGS)" \
  50. install_headers
  51. @find $(IDIR_UCLIBC_NG_DEV) -name .install -exec rm {} \;
  52. @find $(IDIR_UCLIBC_NG_DEV) -name ..install.cmd -exec rm {} \;
  53. include ${ADK_TOPDIR}/mk/pkg-bottom.mk