From 9431826d42584a580512f5613e5d9ff7b46840d1 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 21 Sep 2005 23:44:10 +0000 Subject: do not recurse into subdirs if related options are not set --- Makefile | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'Makefile') 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 ... -- cgit v1.2.3