Makefile 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. ifeq ($(NO_CRYPT),1)
  32. DIRS := $(filter-out crypt,$(DIRS))
  33. endif
  34. test check all: run
  35. run: subdirs_run
  36. gen:
  37. -rm -f $(top_builddir)/test/uclibcng-testrunner.in
  38. $(MAKE) run UCLIBCNG_GENERATE_TESTRUNNER=1
  39. compile: subdirs_compile
  40. clean: subdirs_clean
  41. subdirs: $(patsubst %, _dir_%, $(DIRS))
  42. subdirs_compile: $(patsubst %, _dircompile_%, $(DIRS))
  43. subdirs_run: $(patsubst %, _dirrun_%, $(DIRS))
  44. subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
  45. $(patsubst %, _dir_%, $(DIRS)) : dummy
  46. $(Q)$(MAKE) -C $(patsubst _dir_%, %, $@) \
  47. KCONFIG_CONFIG=$(KCONFIG_CONFIG)
  48. $(patsubst %, _dirrun_%, $(DIRS)) : dummy
  49. $(Q)$(MAKE) -C $(patsubst _dirrun_%, %, $@) run \
  50. UCLIBCNG_TEST_SUBDIR=$(strip $(patsubst _dirrun_%, %, $@))
  51. $(patsubst %, _dircompile_%, $(DIRS)) : dummy
  52. $(Q)$(MAKE) -C $(patsubst _dircompile_%, %, $@) compile
  53. $(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
  54. $(Q)$(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
  55. .PHONY: all check clean dummy subdirs_compile subdirs_run subdirs subdirs_clean test run compile