]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/uclibc/lib/contrib/uclibc/test/Makefile
bd68884d33978f598ad4cb172f91766f745f9c39
[l4.git] / l4 / pkg / uclibc / lib / contrib / uclibc / test / Makefile
1 # Makefile for uClibc
2 #
3 # Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
4 #
5 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
6 #
7
8 top_builddir=../
9 include Rules.mak
10
11 ALL_SUBDIRS := $(patsubst %/Makefile,%,$(wildcard */Makefile))
12
13 DIRS := $(ALL_SUBDIRS)
14 ifneq ($(HAVE_SHARED)$(UCLIBC_HAS_THREADS),yy)
15         DIRS := $(filter-out dlopen,$(DIRS))
16 endif
17 ifneq ($(findstring -static,$(LDFLAGS)),)
18         DIRS := $(filter-out dlopen,$(DIRS))
19 endif
20 ifneq ($(UCLIBC_HAS_THREADS),y)
21         DIRS := $(filter-out pthread,$(DIRS))
22 endif
23 ifneq ($(UCLIBC_HAS_FULL_RPC),y)
24         DIRS := $(filter-out rpc,$(DIRS))
25 endif
26 ifneq ($(UCLIBC_HAS_REGEX),y)
27         DIRS := $(filter-out regex,$(DIRS))
28 endif
29 ifneq ($(UCLIBC_HAS_WCHAR),y)
30         DIRS := $(filter-out locale-mbwc,$(DIRS))
31 endif
32 ifneq ($(UCLIBC_HAS_LOCALE),y)
33         DIRS := $(filter-out locale,$(DIRS))
34 endif
35 ifneq ($(UCLIBC_HAS_CRYPT),y)
36         DIRS := $(filter-out crypt,$(DIRS))
37 endif
38 ifeq ($(HAS_NO_THREADS),y)
39         DIRS := $(filter-out pthread,$(DIRS))
40 endif
41
42 test check all: run
43
44 run: subdirs_run
45
46 compile: $(top_builddir)/$(LOCAL_INSTALL_PATH) subdirs_compile
47
48 $(top_builddir)/$(LOCAL_INSTALL_PATH):
49         $(Q)$(MAKE) -C $(top_builddir) $(LOCAL_INSTALL_PATH)
50
51 tags:
52         ctags -R
53
54 clean: subdirs_clean
55
56 subdirs: $(patsubst %, _dir_%, $(DIRS))
57 subdirs_compile: $(patsubst %, _dircompile_%, $(DIRS))
58 subdirs_run: $(patsubst %, _dirrun_%, $(DIRS))
59 subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
60
61 $(patsubst %, _dir_%, $(DIRS)) : dummy
62         $(Q)$(MAKE) -C $(patsubst _dir_%, %, $@)
63
64 $(patsubst %, _dirrun_%, $(DIRS)) : dummy
65         $(Q)$(MAKE) -C $(patsubst _dirrun_%, %, $@) run
66
67 $(patsubst %, _dircompile_%, $(DIRS)) : dummy
68         $(Q)$(MAKE) -C $(patsubst _dircompile_%, %, $@) compile
69
70 $(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
71         $(Q)$(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
72
73 .PHONY: all check clean dummy subdirs_compile subdirs_run subdirs subdirs_clean test run compile