1
0

Makefile 2.2 KB

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