1
0

Makefile 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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_MUSL},y)
  10. package-$(ADK_PACKAGE_MUSL) += musl
  11. gcc-compile: musl-compile
  12. endif
  13. ifeq (${ADK_TARGET_LIB_UCLIBC},y)
  14. package-$(ADK_PACKAGE_UCLIBC) += uclibc
  15. package-$(ADK_PACKAGE_UCLIBCXX) += uclibc++
  16. gcc-compile: uclibc-compile
  17. endif
  18. package-$(ADK_PACKAGE_LIBPTHREAD) += libpthread
  19. include $(TOPDIR)/package/Depends.mk
  20. DOWNLOAD:=$(patsubst %,%-download,$(package-y) $(package-m))
  21. REBUILD_PACKAGES:=$(patsubst %,%-rebuild,$(package-y) $(package-m))
  22. COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m))
  23. HOST_COMPILE_PACKAGES:=$(patsubst %,%-host-compile,$(hostpackage-y))
  24. INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y))
  25. all: compile
  26. download: $(DOWNLOAD)
  27. clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m) base-files)
  28. hostcompile: $(HOST_COMPILE_PACKAGES)
  29. ifeq ($(ADK_TOOLCHAIN_ONLY),y)
  30. compile: $(REBUILD_PACKAGES) $(COMPILE_PACKAGES)
  31. install: $(INSTALL_PACKAGES)
  32. else
  33. compile: $(REBUILD_PACKAGES) base-files-compile $(COMPILE_PACKAGES)
  34. install: base-files-install $(INSTALL_PACKAGES)
  35. endif
  36. %-download:
  37. $(START_TRACE) "package/$(patsubst %-download,%,$@)-download: "
  38. $(MAKE) -C $(patsubst %-download,%,$@) fetch
  39. $(CMD_TRACE) " done"
  40. $(END_TRACE)
  41. %-host-compile:
  42. $(START_TRACE) "package/$(patsubst %-host-compile,%,$@)-host-compile: "
  43. $(MAKE) -C $(patsubst %-host-compile,%,$@) hostpackage
  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. %-rebuild:
  52. $(START_TRACE) "package/$(patsubst %-rebuild,%,$@)-rebuild: "
  53. $(MAKE) -C $(patsubst %-rebuild,%,$@) rebuild
  54. $(CMD_TRACE) " done"
  55. $(END_TRACE)
  56. %-install:
  57. $(START_TRACE) "package/$(patsubst %-install,%,$@)-install: "
  58. $(MAKE) -C $(patsubst %-install,%,$@) install
  59. $(CMD_TRACE) " done"
  60. $(END_TRACE)
  61. %-clean:
  62. $(START_TRACE) "package/$(patsubst %-clean,%,$@)-clean: "
  63. $(MAKE) -C $(patsubst %-clean,%,$@) clean
  64. $(CMD_TRACE) " done"
  65. $(END_TRACE)