ubacktrace/uargp: remove unneeded and false linker scripts
[uclibc-ng.git] / test / Makefile
blob532a43aabf6baf899ce90f9e19c555a9c32a8045
1 # Makefile for uClibc
3 # Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
5 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
8 top_srcdir=../
9 top_builddir=../
10 include Rules.mak
12 ALL_SUBDIRS := $(patsubst %/Makefile,%,$(wildcard */Makefile))
14 DIRS := $(ALL_SUBDIRS)
15 ifneq ($(HAVE_SHARED)$(UCLIBC_HAS_THREADS),yy)
16 DIRS := $(filter-out dlopen,$(DIRS))
17 endif
18 ifneq ($(findstring -static,$(LDFLAGS)),)
19 DIRS := $(filter-out dlopen,$(DIRS))
20 endif
21 ifneq ($(UCLIBC_HAS_THREADS)$(ARCH_USE_MMU),yy)
22 DIRS := $(filter-out pthread,$(DIRS))
23 endif
24 ifneq ($(UCLIBC_HAS_FLOATS),y)
25 DIRS := $(filter-out math,$(DIRS))
26 endif
27 ifneq ($(UCLIBC_HAS_FULL_RPC),y)
28 DIRS := $(filter-out rpc,$(DIRS))
29 endif
30 ifneq ($(UCLIBC_HAS_REGEX),y)
31 DIRS := $(filter-out regex,$(DIRS))
32 endif
33 ifneq ($(HAVE_SHARED)$(UCLIBC_HAS_THREADS_NATIVE),yy)
34 DIRS := $(filter-out tls nptl,$(DIRS))
35 endif
36 ifneq ($(UCLIBC_HAS_WCHAR),y)
37 DIRS := $(filter-out locale-mbwc,$(DIRS))
38 endif
39 ifneq ($(UCLIBC_HAS_LOCALE),y)
40 DIRS := $(filter-out locale,$(DIRS))
41 endif
42 ifneq ($(UCLIBC_HAS_CRYPT_IMPL),y)
43 DIRS := $(filter-out crypt,$(DIRS))
44 endif
45 ifeq ($(HAS_NO_THREADS),y)
46 DIRS := $(filter-out pthread,$(DIRS))
47 endif
48 ifneq ($(UCLIBC_HAS_ARGP),y)
49 DIRS := $(filter-out argp,$(DIRS))
50 endif
52 test check all: run
54 run: subdirs_run
56 gen:
57 -rm -f $(top_builddir)/test/uclibcng-testrunner.in
58 $(MAKE) run UCLIBCNG_GENERATE_TESTRUNNER=1
60 compile: $(top_builddir)$(LOCAL_INSTALL_PATH) subdirs_compile
62 $(top_builddir)$(LOCAL_INSTALL_PATH):
63 $(Q)$(MAKE) -C $(top_builddir) $(LOCAL_INSTALL_PATH)
65 tags:
66 ctags -R
68 clean: subdirs_clean
70 subdirs: $(patsubst %, _dir_%, $(DIRS))
71 subdirs_compile: $(patsubst %, _dircompile_%, $(DIRS))
72 subdirs_run: $(patsubst %, _dirrun_%, $(DIRS))
73 subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
75 $(patsubst %, _dir_%, $(DIRS)) : dummy
76 $(Q)$(MAKE) -C $(patsubst _dir_%, %, $@) \
77 KCONFIG_CONFIG=$(KCONFIG_CONFIG)
79 $(patsubst %, _dirrun_%, $(DIRS)) : dummy
80 $(Q)$(MAKE) -C $(patsubst _dirrun_%, %, $@) run \
81 UCLIBCNG_TEST_SUBDIR=$(strip $(patsubst _dirrun_%, %, $@)) \
82 KCONFIG_CONFIG=$(KCONFIG_CONFIG)
84 $(patsubst %, _dircompile_%, $(DIRS)) : dummy
85 $(Q)$(MAKE) -C $(patsubst _dircompile_%, %, $@) compile \
86 KCONFIG_CONFIG=$(KCONFIG_CONFIG)
88 $(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
89 $(Q)$(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
91 .PHONY: all check clean dummy subdirs_compile subdirs_run subdirs subdirs_clean test run compile