Makefile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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: %-compile
  50. %-install:
  51. @$(START_TRACE) "package/$(patsubst %-install,%,$@)-install: "
  52. @$(MAKE) -C $(patsubst %-install,%,$@) install
  53. @$(CMD_TRACE) " done"
  54. @$(END_TRACE)
  55. %-clean:
  56. @$(START_TRACE) "package/$(patsubst %-clean,%,$@)-clean: "
  57. @$(MAKE) -C $(patsubst %-clean,%,$@) clean
  58. @$(CMD_TRACE) " done"
  59. @$(END_TRACE)