Makefile 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. NO_DISTFILES:= 1
  8. PKG_OPTS:= noremove
  9. include $(TOPDIR)/mk/package.mk
  10. $(eval $(call PKG_template,UCLIBC,uclibc,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
  11. $(eval $(call PKG_template,UCLIBC_DEV,uclibc-dev,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
  12. CONFIG_STYLE:= manual
  13. BUILD_STYLE:= manual
  14. INSTALL_STYLE:= manual
  15. SUB_INSTALLS-y:=
  16. SUB_INSTALLS-m:=
  17. SUB_INSTALLS-${ADK_PACKAGE_UCLIBC_DEV}+= uclibc-dev-install
  18. # do nothing, uClibc is already build in toolchain directory
  19. do-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y}
  20. ${INSTALL_DIR} $(IDIR_UCLIBC)/lib $(IDIR_UCLIBC)/etc
  21. # create timezone file
  22. echo 'CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00' > $(IDIR_UCLIBC)/etc/TZ
  23. $(CP) $(STAGING_DIR)/lib/libgcc_s.so* $(IDIR_UCLIBC)/lib/
  24. $(CP) $(STAGING_DIR)/lib/libc.so* $(IDIR_UCLIBC)/lib/
  25. $(CP) $(STAGING_DIR)/lib/libuClibc-$(PKG_VERSION).so $(IDIR_UCLIBC)/lib/
  26. $(CP) $(STAGING_DIR)/lib/ld*-uClibc-$(PKG_VERSION).so $(IDIR_UCLIBC)/lib/
  27. $(CP) $(STAGING_DIR)/lib/ld*-uClibc.so.* $(IDIR_UCLIBC)/lib/
  28. -for file in libcrypt libdl libm libnsl libresolv librt libutil; do \
  29. $(CP) $(STAGING_DIR)/lib/$$file.so* $(IDIR_UCLIBC)/lib/; \
  30. $(CP) $(STAGING_DIR)/lib/$$file-$(PKG_VERSION).so $(IDIR_UCLIBC)/lib/; \
  31. done
  32. uclibc-dev-install:
  33. ${INSTALL_DIR} ${IDIR_UCLIBC_DEV}/usr/lib
  34. ${CP} ${STAGING_DIR}/lib/crt* ${IDIR_UCLIBC_DEV}/usr/lib
  35. # header package
  36. $(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/w-linux-$(KERNEL_VERSION)-$(KERNEL_RELEASE)/linux-$(KERNEL_VERSION) ARCH=$(ARCH) V=1 \
  37. INSTALL_HDR_PATH=$(IDIR_UCLIBC_DEV)/usr \
  38. headers_install
  39. $(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/${PKG_NAME}-${PKG_VERSION} \
  40. PREFIX=$(IDIR_UCLIBC_DEV)/ \
  41. DEVEL_PREFIX=/usr/ \
  42. RUNTIME_PREFIX=$(IDIR_UCLIBC_DEV)/ \
  43. HOSTCC="$(HOSTCC)" \
  44. CPU_CFLAGS="$(TARGET_CFLAGS)" \
  45. install_headers
  46. @find $(IDIR_UCLIBC_DEV) -name .install -exec rm {} \;
  47. @find $(IDIR_UCLIBC_DEV) -name ..install.cmd -exec rm {} \;
  48. include ${TOPDIR}/mk/pkg-bottom.mk