Makefile 2.0 KB

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