From f70602be19ff8042c369ea33b29f90b8c0f5d02e Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 28 Sep 2005 12:34:41 +0000 Subject: Remove ar-target and shared targets, at build time now we traverse the tree only once. Generalize all toplevel makefiles. Make sure, that libdl.so is built against libc.so and not libc.a --- ldso/Makefile | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'ldso/Makefile') diff --git a/ldso/Makefile b/ldso/Makefile index dd7ff2052..340ddfacb 100644 --- a/ldso/Makefile +++ b/ldso/Makefile @@ -21,33 +21,38 @@ include $(TOPDIR)Rules.mak DIRS = ldso libdl -all: ldso libdl - ifeq ($(strip $(BUILD_UCLIBC_LDSO)),y) -ldso: headers - $(MAKE) -C ldso -libdl: ldso headers - $(MAKE) -C libdl -shared: libdl - $(MAKE) -C libdl shared +all: subdirs else -ldso libdl shared: - echo "Skipping $@ target" +all: endif LN_HEADERS := $(patsubst %, include/%, elf.h) LN_ARCH_HEADERS := $(patsubst %, include/%, dl-startup.h dl-syscalls.h dl-sysdep.h dl-debug.h) HEADERS := $(LN_HEADERS) $(LN_ARCH_HEADERS) include/dl-progname.h + headers: $(HEADERS) + $(LN_HEADERS): - $(LN) -fs $(TOPDIR)../$@ $@ + $(LN) -sf $(TOPDIR)../$@ $@ + $(LN_ARCH_HEADERS): - $(LN) -fs ../ldso/$(TARGET_ARCH)/$(patsubst include/%,%,$@) $@ + $(LN) -sf ../ldso/$(TARGET_ARCH)/$(patsubst include/%,%,$@) $@ + include/dl-progname.h: echo '#include "$(TARGET_ARCH)/elfinterp.c"' \ > include/dl-progname.h -clean: - set -e ; for d in $(DIRS) ; do $(MAKE) -C $$d $@ ; done - -find . -name '*~' | xargs $(RM) +clean: subdirs_clean $(RM) $(HEADERS) + +subdirs: $(patsubst %, _dir_%, $(DIRS)) +subdirs_clean: $(patsubst %, _dirclean_%, $(DIRS)) + +$(patsubst %, _dir_%, $(DIRS)): headers + $(MAKE) -C $(patsubst _dir_%, %, $@) + +$(patsubst %, _dirclean_%, $(DIRS)): dummy + $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean + +.PHONY: dummy -- cgit v1.2.3