Makefile 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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/glibc/Makefile.inc
  5. PKG_DESCR:= GNU 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,GLIBC,glibc,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
  11. do-extract:
  12. # do nothing, glibc is already build in toolchain directory
  13. do-install:
  14. ${INSTALL_DIR} $(IDIR_GLIBC)/lib $(IDIR_GLIBC)/etc
  15. # install /etc/localtime from host system (FIXME)
  16. ${CP} /etc/localtime $(IDIR_GLIBC)/etc
  17. ifeq ($(ADK_SSP),y)
  18. $(CP) $(STAGING_DIR)/lib/libssp.so* $(IDIR_GLIBC)/lib/
  19. endif
  20. $(CP) $(STAGING_DIR)/lib/libgcc_s.so.* $(IDIR_GLIBC)/lib/
  21. $(CP) $(STAGING_DIR)/lib/ld-*.so* $(IDIR_GLIBC)/lib/
  22. -for file in libc libcrypt libdl libm libresolv librt libutil libnss_compat libnss_dns libnss_files; do \
  23. $(CP) $(STAGING_DIR)/lib/$$file.so.* $(IDIR_GLIBC)/lib/; \
  24. $(CP) $(STAGING_DIR)/lib/$$file-$(PKG_VERSION).so $(IDIR_GLIBC)/lib/; \
  25. done
  26. # create ld.so link for mips gcc linker option
  27. cd $(IDIR_GLIBC)/lib && ln -sf ld-linux.so.2 ld.so.1
  28. cd $(IDIR_GLIBC)/lib && ln -sf libgcc_s.so.1 libgcc_s.so
  29. # header package
  30. ${INSTALL_DIR} $(IDIR_GLIBC_DEV)/usr/include/{sys,bits,linux,asm,asm-generic}
  31. for file in \
  32. regex errno limits alloca stdint locale ctype \
  33. stdlib string sgidefs fcntl \
  34. libintl sched pthread wchar _G_config getopt endian \
  35. features libio stdio error signal time unistd \
  36. ;do \
  37. ${CP} $(STAGING_DIR)/usr/include/$$file.h \
  38. $(IDIR_GLIBC_DEV)/usr/include; \
  39. done
  40. ${CP} $(STAGING_DIR)/usr/include/asm/*.h $(IDIR_GLIBC_DEV)/usr/include/asm
  41. ${CP} $(STAGING_DIR)/usr/include/asm-generic/*.h $(IDIR_GLIBC_DEV)/usr/include/asm-generic
  42. ${CP} $(STAGING_DIR)/usr/include/sys/*.h $(IDIR_GLIBC_DEV)/usr/include/sys
  43. ${CP} $(STAGING_DIR)/usr/include/bits/*.h $(IDIR_GLIBC_DEV)/usr/include/bits
  44. ${CP} $(STAGING_DIR)/usr/include/linux/*.h $(IDIR_GLIBC_DEV)/usr/include/linux
  45. include ${TOPDIR}/mk/pkg-bottom.mk