Makefile 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. SUB_INSTALLS-y:=
  19. SUB_INSTALLS-m:=
  20. SUB_INSTALLS-${ADK_PACKAGE_UCLIBC_DEV}+= uclibc-dev-install
  21. # do nothing, uClibc is already build in toolchain directory
  22. do-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y}
  23. ${INSTALL_DIR} $(IDIR_UCLIBC)/lib $(IDIR_UCLIBC)/etc
  24. # create timezone file
  25. test -z $(ADK_RUNTIME_TIMEZONE) || \
  26. grep $(ADK_RUNTIME_TIMEZONE) ./files/tz.lst | \
  27. cut -f 2 > $(IDIR_UCLIBC)/etc/TZ
  28. $(CP) $(STAGING_DIR)/lib/libgcc_s.so* $(IDIR_UCLIBC)/lib/
  29. $(CP) $(STAGING_DIR)/lib/libc.so* $(IDIR_UCLIBC)/lib/
  30. $(CP) $(STAGING_DIR)/lib/libuClibc-$(PKG_VERSION).so \
  31. $(IDIR_UCLIBC)/lib/
  32. $(CP) $(STAGING_DIR)/lib/ld*-uClibc-$(PKG_VERSION).so \
  33. $(IDIR_UCLIBC)/lib/
  34. $(CP) $(STAGING_DIR)/lib/ld*-uClibc.so.* $(IDIR_UCLIBC)/lib/
  35. -for file in libcrypt libdl libm libnsl libresolv librt libutil; do \
  36. $(CP) $(STAGING_DIR)/lib/$$file.so* $(IDIR_UCLIBC)/lib/; \
  37. $(CP) $(STAGING_DIR)/lib/$$file-$(PKG_VERSION).so \
  38. $(IDIR_UCLIBC)/lib/; \
  39. done
  40. uclibc-dev-install:
  41. ${INSTALL_DIR} ${IDIR_UCLIBC_DEV}/usr/lib
  42. ${CP} ${STAGING_DIR}/lib/crt* ${IDIR_UCLIBC_DEV}/usr/lib
  43. $(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/w-linux-$(KERNEL_VERSION)-$(KERNEL_RELEASE)/linux-$(KERNEL_VERSION) ARCH=$(ARCH) V=1 \
  44. INSTALL_HDR_PATH=$(IDIR_UCLIBC_DEV)/usr \
  45. headers_install
  46. $(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/${PKG_NAME}-${PKG_VERSION} \
  47. PREFIX=$(IDIR_UCLIBC_DEV)/ \
  48. DEVEL_PREFIX=/usr/ \
  49. RUNTIME_PREFIX=$(IDIR_UCLIBC_DEV)/ \
  50. HOSTCC="$(HOSTCC)" \
  51. CPU_CFLAGS="$(TARGET_CFLAGS)" \
  52. install_headers
  53. @find $(IDIR_UCLIBC_DEV) -name .install -exec rm {} \;
  54. @find $(IDIR_UCLIBC_DEV) -name ..install.cmd -exec rm {} \;
  55. include ${TOPDIR}/mk/pkg-bottom.mk