summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-09-21 23:44:10 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-09-21 23:44:10 +0000
commit9431826d42584a580512f5613e5d9ff7b46840d1 (patch)
tree04d49c23c83574f41432949753bcce52741b3339 /Makefile
parent3e458f0e82a854c37a4a843f76f6cda083d804df (diff)
do not recurse into subdirs if related options are not set
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 10 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index 8836c9de2..aef570d65 100644
--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,13 @@ noconfig_targets := menuconfig config oldconfig randconfig \
TOPDIR=./
include Rules.mak
-DIRS = ldso libc libcrypt libresolv libnsl libutil libm libpthread librt
+DIRS = ldso libc libcrypt libresolv libnsl libutil librt
+ifeq ($(strip $(UCLIBC_HAS_FLOATS)),y)
+ DIRS += libm
+endif
+ifeq ($(strip $(UCLIBC_HAS_THREADS)),y)
+ DIRS += libpthread
+endif
ifeq ($(strip $(UCLIBC_HAS_GETTEXT_AWARENESS)),y)
DIRS += libintl
endif
@@ -40,23 +46,13 @@ all: headers pregen subdirs shared finished
# In this section, we need .config
-include .config.cmd
-shared: subdirs
+shared: $(patsubst %, _shared_dir_%, $(DIRS))
+$(patsubst %, _shared_dir_%, $(DIRS)): subdirs
ifeq ($(strip $(HAVE_SHARED)),y)
$(SECHO)
$(SECHO) Building shared libraries ...
$(SECHO)
- @$(MAKE) -C libc shared
- @$(MAKE) -C ldso shared
- @$(MAKE) -C libcrypt shared
- @$(MAKE) -C libresolv shared
- @$(MAKE) -C libnsl shared
- @$(MAKE) -C libutil shared
- @$(MAKE) -C libm shared
- @$(MAKE) -C libpthread shared
- @$(MAKE) -C librt shared
-ifeq ($(strip $(UCLIBC_HAS_GETTEXT_AWARENESS)),y)
- @$(MAKE) -C libintl shared
-endif
+ $(MAKE) -C $(patsubst _shared_dir_%, %, $@) shared
else
$(SECHO)
$(SECHO) Not building shared libraries ...