OSDN Git Service

add missing subdirs
[uclinux-h8/uClibc.git] / 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 $(top_builddir).config
10 include Rules.mak
11
12 ALL_SUBDIRS := \
13         args assert crypt ctype mmap misc pwd_grp setjmp signal silly stat \
14         stdlib string termios unistd
15 DIRS := $(ALL_SUBDIRS)
16
17 ifeq ($(HAVE_SHARED)$(UCLIBC_HAS_THREADS),yy)
18 ifeq ($(findstring -static,$(LDFLAGS)),)
19         DIRS += dlopen
20 endif
21 endif
22 ifeq ($(UCLIBC_HAS_THREADS),y)
23         DIRS += pthread
24 endif
25 ifeq ($(UCLIBC_HAS_FULL_RPC),y)
26         DIRS += rpc
27 endif
28 ALL_SUBDIRS += dlopen pthread rpc
29 ALL_SUBDIRS := $(sort $(ALL_SUBDIRS))
30 DIRS := $(sort $(DIRS))
31
32
33 test check all: subdirs
34
35 tags:
36         ctags -R
37
38 clean: subdirs_clean
39
40 subdirs: $(patsubst %, _dir_%, $(DIRS))
41 subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
42
43 $(patsubst %, _dir_%, $(DIRS)) : dummy
44         $(Q)$(MAKE) -C $(patsubst _dir_%, %, $@)
45
46 $(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
47         $(Q)$(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
48
49 .PHONY: all check clean dummy subdirs subdirs_clean test