diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2005-09-28 12:34:41 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2005-09-28 12:34:41 +0000 |
commit | f70602be19ff8042c369ea33b29f90b8c0f5d02e (patch) | |
tree | 146eb1810d44dc99f8bf26ecd71cec4ee5ba5b32 /ldso/Makefile | |
parent | e1ac781ed8b4a0f44a696f95618b73d2fa490576 (diff) |
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
Diffstat (limited to 'ldso/Makefile')
-rw-r--r-- | ldso/Makefile | 35 |
1 files changed, 20 insertions, 15 deletions
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 |