Makefile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. $(TARGET_DIR):
  38. mkdir -p $(TARGET_DIR)
  39. %-download:
  40. $(START_TRACE) "package/$(patsubst %-download,%,$@)-download: "
  41. $(MAKE) -C $(patsubst %-download,%,$@) fetch
  42. $(CMD_TRACE) " done"
  43. $(END_TRACE)
  44. %-compile:
  45. $(START_TRACE) "package/$(patsubst %-compile,%,$@)-compile: "
  46. $(MAKE) -C $(patsubst %-compile,%,$@) fake build-all-pkgs
  47. $(CMD_TRACE) " done"
  48. $(END_TRACE)
  49. %-install:
  50. @$(START_TRACE) "package/$(patsubst %-install,%,$@)-install: "
  51. @$(MAKE) -C $(patsubst %-install,%,$@) install
  52. @$(CMD_TRACE) " done"
  53. @$(END_TRACE)
  54. %-clean:
  55. @$(START_TRACE) "package/$(patsubst %-clean,%,$@)-clean: "
  56. @$(MAKE) -C $(patsubst %-clean,%,$@) clean
  57. @$(CMD_TRACE) " done"
  58. @$(END_TRACE)