Makefile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # Makefile for uClibc-ng-test
  2. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  3. top_srcdir=../
  4. top_builddir=../
  5. include Rules.mak
  6. ALL_SUBDIRS := $(patsubst %/Makefile,%,$(wildcard */Makefile))
  7. DIRS := $(ALL_SUBDIRS)
  8. ifeq ($(NO_THREADS),1)
  9. DIRS := $(filter-out nptl,$(DIRS))
  10. DIRS := $(filter-out pthread,$(DIRS))
  11. DIRS := $(filter-out dlopen,$(DIRS))
  12. endif
  13. ifeq ($(NO_NPTL),1)
  14. DIRS := $(filter-out nptl,$(DIRS))
  15. endif
  16. ifeq ($(NO_TLS),1)
  17. DIRS := $(filter-out tls,$(DIRS))
  18. endif
  19. ifeq ($(NO_DL),1)
  20. DIRS := $(filter-out dlopen,$(DIRS))
  21. endif
  22. ifeq ($(NO_WCHAR),1)
  23. DIRS := $(filter-out locale-mbwc,$(DIRS))
  24. endif
  25. ifeq ($(NO_LOCALE),1)
  26. DIRS := $(filter-out locale,$(DIRS))
  27. endif
  28. ifeq ($(NO_MATH),1)
  29. DIRS := $(filter-out math,$(DIRS))
  30. endif
  31. test check all: run
  32. run: subdirs_run
  33. gen:
  34. -rm -f $(top_builddir)/test/uclibcng-testrunner.in
  35. $(MAKE) run UCLIBCNG_GENERATE_TESTRUNNER=1
  36. compile: subdirs_compile
  37. clean: subdirs_clean
  38. subdirs: $(patsubst %, _dir_%, $(DIRS))
  39. subdirs_compile: $(patsubst %, _dircompile_%, $(DIRS))
  40. subdirs_run: $(patsubst %, _dirrun_%, $(DIRS))
  41. subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
  42. $(patsubst %, _dir_%, $(DIRS)) : dummy
  43. $(Q)$(MAKE) -C $(patsubst _dir_%, %, $@) \
  44. KCONFIG_CONFIG=$(KCONFIG_CONFIG)
  45. $(patsubst %, _dirrun_%, $(DIRS)) : dummy
  46. $(Q)$(MAKE) -C $(patsubst _dirrun_%, %, $@) run \
  47. UCLIBCNG_TEST_SUBDIR=$(strip $(patsubst _dirrun_%, %, $@))
  48. $(patsubst %, _dircompile_%, $(DIRS)) : dummy
  49. $(Q)$(MAKE) -C $(patsubst _dircompile_%, %, $@) compile
  50. $(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
  51. $(Q)$(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
  52. .PHONY: all check clean dummy subdirs_compile subdirs_run subdirs subdirs_clean test run compile