Makefile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. # create links for ldd / gcc
  27. cd $(IDIR_UCLIBC)/lib && ln -sf ld-uClibc.so.0 ld.so
  28. cd $(IDIR_UCLIBC)/lib && ln -sf libc.so.0 libc.so
  29. cd $(IDIR_UCLIBC)/lib && ln -sf libgcc_s.so.1 libgcc_s.so
  30. # header package
  31. ${INSTALL_DIR} $(IDIR_UCLIBC_DEV)/usr/include/{sys,bits}
  32. for file in alloca stdint locale ctype stdlib string sgidefs \
  33. libintl sched pthread wchar _G_config getopt endian \
  34. features libio stdio error signal time unistd;do \
  35. ${CP} $(STAGING_DIR)/usr/include/$$file.h \
  36. $(IDIR_UCLIBC_DEV)/usr/include; \
  37. done
  38. ${CP} $(STAGING_DIR)/usr/include/sys/*.h $(IDIR_UCLIBC_DEV)/usr/include/sys
  39. ${CP} $(STAGING_DIR)/usr/include/bits/*.h $(IDIR_UCLIBC_DEV)/usr/include/bits
  40. include ${TOPDIR}/mk/pkg-bottom.mk