OSDN Git Service

start pulling in top level Rules.mak so we get access to import CFLAGS/LDFLAGS/CPPFLAGS
[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 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 DIRS := $(filter-out math,$(DIRS))
30
31
32 test check all: subdirs
33
34 tags:
35         ctags -R
36
37 clean: subdirs_clean
38
39 subdirs: $(patsubst %, _dir_%, $(DIRS))
40 subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
41
42 $(patsubst %, _dir_%, $(DIRS)) : dummy
43         $(Q)$(MAKE) -C $(patsubst _dir_%, %, $@)
44
45 $(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
46         $(Q)$(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
47
48 .PHONY: all check clean dummy subdirs subdirs_clean test