Makefile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. # Main makefile for the packages
  4. include $(TOPDIR)/rules.mk
  5. include $(TOPDIR)/package/Depends.mk
  6. ifeq (${ADK_TARGET_LIB_GLIBC},y)
  7. package-$(ADK_PACKAGE_GLIBC) += glibc
  8. endif
  9. ifeq (${ADK_TARGET_LIB_EGLIBC},y)
  10. package-$(ADK_PACKAGE_EGLIBC) += eglibc
  11. endif
  12. ifeq (${ADK_NATIVE},y)
  13. package-$(ADK_PACKAGE_LIBC) += libc
  14. endif
  15. ifneq (${ADK_NATIVE},y)
  16. package-$(ADK_PACKAGE_LIBPTHREAD) += libpthread
  17. endif
  18. ifneq (${ADK_TARGET_LIB_GLIBC},y)
  19. ifneq (${ADK_NATIVE},y)
  20. package-$(ADK_PACKAGE_UCLIBC) += uclibc
  21. endif
  22. package-$(ADK_PACKAGE_UCLIBCXX) += uclibc++
  23. endif
  24. DOWNLOAD:=$(patsubst %,%-download,$(package-y) $(package-m))
  25. COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m))
  26. INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y))
  27. all: compile
  28. download: $(DOWNLOAD)
  29. clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m) base-files)
  30. ifeq ($(ADK_TOOLCHAIN_ONLY),y)
  31. compile: $(COMPILE_PACKAGES)
  32. install: $(INSTALL_PACKAGES)
  33. else
  34. compile: base-files-compile $(COMPILE_PACKAGES)
  35. install: base-files-install $(INSTALL_PACKAGES)
  36. endif
  37. #$(COMPILE_PACKAGES): base-files-compile
  38. #$(INSTALL_PACKAGES): base-files-install
  39. $(TARGET_DIR):
  40. mkdir -p $(TARGET_DIR)
  41. %-download:
  42. $(START_TRACE) "package/$(patsubst %-download,%,$@)-download: "
  43. $(MAKE) -C $(patsubst %-download,%,$@) fetch
  44. $(CMD_TRACE) " done"
  45. $(END_TRACE)
  46. %-compile:
  47. $(START_TRACE) "package/$(patsubst %-compile,%,$@)-compile: "
  48. $(MAKE) -C $(patsubst %-compile,%,$@) fake build-all-pkgs
  49. $(CMD_TRACE) " done"
  50. $(END_TRACE)
  51. %-install: %-compile
  52. @$(START_TRACE) "package/$(patsubst %-install,%,$@)-install: "
  53. @$(MAKE) -C $(patsubst %-install,%,$@) install
  54. @$(CMD_TRACE) " done"
  55. @$(END_TRACE)
  56. %-clean:
  57. @$(START_TRACE) "package/$(patsubst %-clean,%,$@)-clean: "
  58. @$(MAKE) -C $(patsubst %-clean,%,$@) clean
  59. @$(CMD_TRACE) " done"
  60. @$(END_TRACE)