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.
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
))
18 ifneq ($(findstring -static
,$(LDFLAGS
)),)
19 DIRS
:= $(filter-out dlopen
,$(DIRS
))
21 ifneq ($(UCLIBC_HAS_THREADS
)$(ARCH_USE_MMU
),yy
)
22 DIRS
:= $(filter-out pthread
,$(DIRS
))
24 ifneq ($(UCLIBC_HAS_FLOATS
),y
)
25 DIRS
:= $(filter-out math
,$(DIRS
))
27 ifneq ($(UCLIBC_HAS_FULL_RPC
),y
)
28 DIRS
:= $(filter-out rpc
,$(DIRS
))
30 ifneq ($(UCLIBC_HAS_REGEX
),y
)
31 DIRS
:= $(filter-out regex
,$(DIRS
))
33 ifneq ($(UCLIBC_HAS_THREADS_NATIVE
),y
)
34 DIRS
:= $(filter-out tls nptl
,$(DIRS
))
36 ifneq ($(UCLIBC_HAS_WCHAR
),y
)
37 DIRS
:= $(filter-out locale-mbwc
,$(DIRS
))
39 ifneq ($(UCLIBC_HAS_LOCALE
),y
)
40 DIRS
:= $(filter-out locale
,$(DIRS
))
42 ifneq ($(UCLIBC_HAS_CRYPT_IMPL
),y
)
43 DIRS
:= $(filter-out crypt
,$(DIRS
))
45 ifeq ($(HAS_NO_THREADS
),y
)
46 DIRS
:= $(filter-out pthread
,$(DIRS
))
48 ifneq ($(UCLIBC_HAS_ARGP
),y
)
49 DIRS
:= $(filter-out argp
,$(DIRS
))
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
)
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