Makefile 2.4 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_DESCR_LIB_DEV:= development files for uclibc
  9. PKG_SECTION_LIB_DEV:= devel
  10. NO_DISTFILES:= 1
  11. include $(TOPDIR)/mk/package.mk
  12. $(eval $(call PKG_template,UCLIBC,uclibc,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
  13. $(eval $(call PKG_template,UCLIBC_DEV,uclibc-dev,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_LIB_DEV},${PKG_SECTION_LIB_DEV},${PKG_OPTS}))
  14. CONFIG_STYLE:= manual
  15. BUILD_STYLE:= manual
  16. INSTALL_STYLE:= manual
  17. SUB_INSTALLS-y:=
  18. SUB_INSTALLS-m:=
  19. SUB_INSTALLS-${ADK_PACKAGE_UCLIBC_DEV}+= uclibc-dev-install
  20. # do nothing, uClibc is already build in toolchain directory
  21. do-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y}
  22. ${INSTALL_DIR} $(IDIR_UCLIBC)/lib $(IDIR_UCLIBC)/etc
  23. # create timezone file
  24. test -z $(ADK_RUNTIME_TIMEZONE) || \
  25. grep $(ADK_RUNTIME_TIMEZONE) ./files/tz.lst | \
  26. cut -f 2 > $(IDIR_UCLIBC)/etc/TZ
  27. $(CP) $(STAGING_DIR)/lib/libgcc_s.so* $(IDIR_UCLIBC)/lib/
  28. $(CP) $(STAGING_DIR)/lib/libc.so* $(IDIR_UCLIBC)/lib/
  29. $(CP) $(STAGING_DIR)/lib/libuClibc-$(PKG_VERSION).so \
  30. $(IDIR_UCLIBC)/lib/
  31. $(CP) $(STAGING_DIR)/lib/ld*-uClibc-$(PKG_VERSION).so \
  32. $(IDIR_UCLIBC)/lib/
  33. $(CP) $(STAGING_DIR)/lib/ld*-uClibc.so.* $(IDIR_UCLIBC)/lib/
  34. -for file in libcrypt libdl libm libnsl libresolv librt libutil; do \
  35. $(CP) $(STAGING_DIR)/lib/$$file.so* $(IDIR_UCLIBC)/lib/; \
  36. $(CP) $(STAGING_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_DIR}/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="$(HOSTCC)" \
  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