Makefile 1.9 KB

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