OSDN Git Service

2a0f3c0a259699a21dd178ee52504e6c9233fb36
[uclinux-h8/uClibc.git] / test / Makefile
1 # Makefile for uClibc
2 #
3 # Copyright (C) 2000,2001 Erik Andersen <andersen@uclibc.org>
4 #
5 # This program is free software; you can redistribute it and/or modify it under
6 # the terms of the GNU Library General Public License as published by the Free
7 # Software Foundation; either version 2 of the License, or (at your option) any
8 # later version.
9 #
10 # This program is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 # FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
13 # details.
14 #
15 # You should have received a copy of the GNU Library General Public License
16 # along with this program; if not, write to the Free Software Foundation, Inc.,
17 # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
19 TOPDIR=../
20 -include $(TOPDIR).config
21
22 .EXPORT_ALL_VARIABLES:
23
24
25 ALL_SUBDIRS = args assert ctype dlopen pwd_grp signal silly stdlib string unistd crypt #misc
26 DIRS = $(ALL_SUBDIRS)
27 #ifeq ($(TARGET_ARCH), $(HOST_ARCH))
28 #       DIRS = $(ALL_SUBDIRS)
29 #else
30 #       DIRS =
31 #endif
32 ifeq ($(strip $(HAVE_SHARED)),true)
33   ifeq ($(strip $(DODYNAMIC)),true)
34         DIRS += dlopen
35   endif 
36 endif   
37 ifeq ($(strip $(INCLUDE_THREADS)),true)
38     DIRS += pthread
39 endif   
40
41 all: subdirs
42
43 tags:
44         ctags -R
45         
46 clean: subdirs_clean
47         rm -f *.[oa] *~ core
48
49 subdirs: $(patsubst %, _dir_%, $(DIRS))
50 subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
51
52 $(patsubst %, _dir_%, $(DIRS)) : dummy
53         $(MAKE) -C $(patsubst _dir_%, %, $@)
54
55 $(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
56         $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
57
58 .PHONY: dummy