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
),y
)
22 DIRS
:= $(filter-out pthread
,$(DIRS
))
24 ifneq ($(UCLIBC_HAS_FULL_RPC
),y
)
25 DIRS
:= $(filter-out rpc
,$(DIRS
))
27 ifneq ($(UCLIBC_HAS_REGEX
),y
)
28 DIRS
:= $(filter-out regex
,$(DIRS
))
30 ifneq ($(UCLIBC_HAS_THREADS_NATIVE
),y
)
31 DIRS
:= $(filter-out tls nptl
,$(DIRS
))
33 ifneq ($(UCLIBC_HAS_WCHAR
),y
)
34 DIRS
:= $(filter-out locale-mbwc
,$(DIRS
))
36 ifneq ($(UCLIBC_HAS_LOCALE
),y
)
37 DIRS
:= $(filter-out locale
,$(DIRS
))
39 ifneq ($(UCLIBC_HAS_CRYPT_IMPL
),y
)
40 DIRS
:= $(filter-out crypt
,$(DIRS
))
42 ifeq ($(HAS_NO_THREADS
),y
)
43 DIRS
:= $(filter-out pthread
,$(DIRS
))
48 run
: compile subdirs_run
50 compile
: $(top_builddir
)$(LOCAL_INSTALL_PATH
) subdirs_compile
52 $(top_builddir
)$(LOCAL_INSTALL_PATH
):
53 $(Q
)$(MAKE
) -C
$(top_builddir
) $(LOCAL_INSTALL_PATH
)
60 subdirs
: $(patsubst %, _dir_
%, $(DIRS
))
61 subdirs_compile
: $(patsubst %, _dircompile_
%, $(DIRS
))
62 subdirs_run
: $(patsubst %, _dirrun_
%, $(DIRS
))
63 subdirs_clean
: $(patsubst %, _dirclean_
%, $(ALL_SUBDIRS
))
65 $(patsubst %, _dir_
%, $(DIRS
)) : dummy
66 $(Q
)$(MAKE
) -C
$(patsubst _dir_
%, %, $@
) \
67 KCONFIG_CONFIG
=$(KCONFIG_CONFIG
)
69 $(patsubst %, _dirrun_
%, $(DIRS
)) : dummy
70 $(Q
)$(MAKE
) -C
$(patsubst _dirrun_
%, %, $@
) run \
71 KCONFIG_CONFIG
=$(KCONFIG_CONFIG
)
73 $(patsubst %, _dircompile_
%, $(DIRS
)) : dummy
74 $(Q
)$(MAKE
) -C
$(patsubst _dircompile_
%, %, $@
) compile \
75 KCONFIG_CONFIG
=$(KCONFIG_CONFIG
)
77 $(patsubst %, _dirclean_
%, $(ALL_SUBDIRS
)) : dummy
78 $(Q
)$(MAKE
) -C
$(patsubst _dirclean_
%, %, $@
) clean
80 .PHONY
: all check clean dummy subdirs_compile subdirs_run subdirs subdirs_clean
test run compile