From d1155a7c1e364182e441ead2d7bd3e445cd8f8bb Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 18 Jan 2005 23:18:14 +0000 Subject: rework dependencies to support parallel build and avoid re-creating header files all the time --- ldso/Makefile | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'ldso/Makefile') diff --git a/ldso/Makefile b/ldso/Makefile index 758f71fdf..b72f81792 100644 --- a/ldso/Makefile +++ b/ldso/Makefile @@ -19,37 +19,39 @@ TOPDIR=../ include $(TOPDIR)Rules.mak -ALL_SUBDIRS = ldso libdl +DIRS = ldso libdl +all: ldso -all: headers +ldso: headers ifeq ($(strip $(BUILD_UCLIBC_LDSO)),y) - $(MAKE) -C ldso; + $(MAKE) -C ldso else echo "Not building ld-uClibc" endif -shared: +shared: libdl +libdl: ldso headers ifeq ($(strip $(BUILD_UCLIBC_LDSO)),y) - $(MAKE) -C libdl; + $(MAKE) -C libdl else echo "Not building libdl" endif -include/dl-progname.h: Makefile +HEADERS = $(patsubst %, include/%, elf.h dl-startup.h dl-syscalls.h dl-sysdep.h) +headers: $(HEADERS) include/dl-progname.h +include/dl-progname.h: echo "const char *_dl_progname=\""$(UCLIBC_LDSO)"\";" \ > include/dl-progname.h echo "#include \"$(TARGET_ARCH)/elfinterp.c\"" \ >> include/dl-progname.h - -headers: include/dl-progname.h +$(HEADERS): $(LN) -fs $(TOPDIR)../include/elf.h include/ $(LN) -fs ../ldso/$(TARGET_ARCH)/dl-startup.h include/ $(LN) -fs ../ldso/$(TARGET_ARCH)/dl-syscalls.h include/ $(LN) -fs ../ldso/$(TARGET_ARCH)/dl-sysdep.h include/ clean: - set -e ; for d in $(ALL_SUBDIRS) ; do $(MAKE) -C $$d $@ ; done + set -e ; for d in $(DIRS) ; do $(MAKE) -C $$d $@ ; done -find . -name '*~' | xargs $(RM) - $(RM) include/elf.h include/dl-startup.h include/dl-syscalls.h \ - include/dl-sysdep.h include/dl-progname.h + $(RM) $(HEADERS) include/dl-progname.h -- cgit v1.2.3