1
0

Makefile 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 $(TOPDIR)/rules.mk
  4. include $(TOPDIR)/toolchain/uClibc/Makefile.inc
  5. PKG_DESCR:= embedded C library
  6. PKG_SECTION:= base
  7. PKG_OPTS:= noremove
  8. PKG_SUBPKGS:= UCLIBC UCLIBC_DEV
  9. PKGSD_UCLIBC_DEV:= development files for uclibc
  10. PKGSC_UCLIBC_DEV:= devel
  11. NO_DISTFILES:= 1
  12. include $(TOPDIR)/mk/package.mk
  13. $(eval $(call PKG_template,UCLIBC,uclibc,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
  14. $(eval $(call PKG_template,UCLIBC_DEV,uclibc-dev,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_UCLIBC_DEV},${PKGSC_UCLIBC_DEV},${PKG_OPTS}))
  15. CONFIG_STYLE:= manual
  16. BUILD_STYLE:= manual
  17. INSTALL_STYLE:= manual
  18. # do nothing, uClibc is already build in toolchain directory
  19. do-install: $(STAGING_TARGET_DIR)/lib/libc.so
  20. ${INSTALL_DIR} $(IDIR_UCLIBC)/lib $(IDIR_UCLIBC)/etc
  21. # create timezone file
  22. test -z $(ADK_RUNTIME_TIMEZONE) || \
  23. grep $(ADK_RUNTIME_TIMEZONE) ./files/tz.lst | \
  24. cut -f 2 > $(IDIR_UCLIBC)/etc/TZ
  25. ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
  26. $(CP) $(STAGING_TARGET_DIR)/lib/libssp.so* $(IDIR_UCLIBC)/lib/
  27. endif
  28. $(CP) $(STAGING_TARGET_DIR)/lib/libc.so* $(IDIR_UCLIBC)/lib/
  29. $(CP) $(STAGING_TARGET_DIR)/lib/libuClibc-$(PKG_VERSION).so \
  30. $(IDIR_UCLIBC)/lib/
  31. $(CP) $(STAGING_TARGET_DIR)/lib/ld*-uClibc-$(PKG_VERSION).so \
  32. $(IDIR_UCLIBC)/lib/
  33. $(CP) $(STAGING_TARGET_DIR)/lib/ld*-uClibc.so.* $(IDIR_UCLIBC)/lib/
  34. -for file in libcrypt libdl libm libnsl libresolv librt libutil; do \
  35. $(CP) $(STAGING_TARGET_DIR)/lib/$$file.so* $(IDIR_UCLIBC)/lib/; \
  36. $(CP) $(STAGING_TARGET_DIR)/lib/$$file-$(PKG_VERSION).so \
  37. $(IDIR_UCLIBC)/lib/; \
  38. done
  39. uclibc-dev-install:
  40. ${INSTALL_DIR} ${IDIR_UCLIBC_DEV}/usr/lib
  41. ${CP} ${STAGING_TARGET_DIR}/usr/lib/crt* ${IDIR_UCLIBC_DEV}/usr/lib
  42. $(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/w-linux-$(KERNEL_VERSION)-$(KERNEL_RELEASE)/linux-$(KERNEL_VERSION) ARCH=$(ARCH) V=1 \
  43. INSTALL_HDR_PATH=$(IDIR_UCLIBC_DEV)/usr \
  44. headers_install
  45. $(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/${PKG_NAME}-${PKG_VERSION} \
  46. PREFIX=$(IDIR_UCLIBC_DEV)/ \
  47. DEVEL_PREFIX=/usr/ \
  48. RUNTIME_PREFIX=$(IDIR_UCLIBC_DEV)/ \
  49. HOSTCC="$(CC_FOR_BUILD)" \
  50. CPU_CFLAGS="$(TARGET_CFLAGS)" \
  51. install_headers
  52. @find $(IDIR_UCLIBC_DEV) -name .install -exec rm {} \;
  53. @find $(IDIR_UCLIBC_DEV) -name ..install.cmd -exec rm {} \;
  54. include ${TOPDIR}/mk/pkg-bottom.mk