summaryrefslogtreecommitdiff
path: root/ldso/util/Makefile
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-10-12 08:49:34 +0000
committerEric Andersen <andersen@codepoet.org>2003-10-12 08:49:34 +0000
commit042768df2bb06227e4edf47e03985ec0dc907f66 (patch)
treebe0afedf60315a50e0f2f8dabc6a33923c8fa892 /ldso/util/Makefile
parentc5d758fb1422604d727814b4633c370d2ea7956a (diff)
Always build and install ldconfig
Diffstat (limited to 'ldso/util/Makefile')
-rw-r--r--ldso/util/Makefile64
1 files changed, 41 insertions, 23 deletions
diff --git a/ldso/util/Makefile b/ldso/util/Makefile
index 4765fd2e3..87e69b4ea 100644
--- a/ldso/util/Makefile
+++ b/ldso/util/Makefile
@@ -24,59 +24,77 @@ TOPDIR=../../
include $(TOPDIR)Rules.mak
TARGET_CC = $(TOPDIR)extra/gcc-uClibc/$(TARGET_ARCH)-uclibc-gcc
-TARGETS = ldd
+TARGETS = ldd ldconfig
ifeq ($(OSTYPE),linux)
TARGETS += readelf
endif
-ifneq ($(strip $(LIBRARY_CACHE)),)
-TARGETS += ldconfig
-endif
-all: $(TARGETS)
+#ifneq ($(strip $(LIBRARY_CACHE)),)
+#TARGETS += ldconfig
+#endif
ifeq ($(strip $(LDSO_LDD_SUPPORT)),y)
-XXFLAGS=-D__LDSO_LDD_SUPPORT
+XXFLAGS = -D__LDSO_LDD_SUPPORT
endif
+all: $(TARGETS)
+
headers:
ln -fs $(TOPDIR)include/elf.h
-readelf: headers readelf.c
- $(HOSTCC) $(HOSTCFLAGS) -I . readelf.c -o $@
+readelf: readelf.c
+ $(HOSTCC) $(HOSTCFLAGS) -I. -I../include $^ -o $@
strip -x -R .note -R .comment $@
readelf.target: readelf.c
- $(TARGET_CC) $(CFLAGS) -Wl,-s readelf.c -o $@
+ $(TARGET_CC) $(CFLAGS) -Wl,-s $^ -o $@
$(STRIPTOOL) -x -R .note -R .comment $@
-readsoname.o: headers readsoname.c readsoname2.c
- $(HOSTCC) $(HOSTCFLAGS) -I . -c $< -o $@
- strip -x -R .note -R .comment $*.o
-
-ldconfig.o: headers ldconfig.c
- $(HOSTCC) $(HOSTCFLAGS) -I . \
- -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" -c $< -o $@
+readsoname.o: readsoname.c readsoname2.c
+ $(HOSTCC) $(HOSTCFLAGS) -I. -I../include -c $< -o $@
strip -x -R .note -R .comment $*.o
-ldconfig: headers ldconfig.o readsoname.o
- $(HOSTCC) $(HOSTCFLAGS) $^ -o $@
+#ldconfig.o: ldconfig.c
+# $(HOSTCC) $(HOSTCFLAGS) -I. -I../include \
+# -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" -c $< -o $@
+# strip -x -R .note -R .comment $*.o
+
+#ldconfig: ldconfig.o readsoname.o
+# $(HOSTCC) $(HOSTCFLAGS) $^ -o $@
+# strip -x -R .note -R .comment $@
+
+ldconfig: ldconfig.c readsoname.c
+ $(HOSTCC) $(HOSTCFLAGS) $(XXFLAGS) -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \
+ -DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \
+ -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \
+ -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" -I. -I../include \
+ $^ -o $@
strip -x -R .note -R .comment $@
-ldd: headers ldd.c
+ldconfig.target: ldconfig.c readsoname.c
+ $(TARGET_CC) $(CFLAGS) $(XXFLAGS) -Wl,-s -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \
+ -DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \
+ -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \
+ -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" -I. -I../include \
+ $^ -o $@
+ $(STRIPTOOL) -x -R .note -R .comment $@
+
+ldd: ldd.c
$(HOSTCC) $(HOSTCFLAGS) $(XXFLAGS) -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \
-DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \
-DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \
- -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" -I . \
- ldd.c -o $@
+ -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" -I. -I../include \
+ $^ -o $@
strip -x -R .note -R .comment $@
-ldd.target: ldd.c
+ldd.target: ldd.c
$(TARGET_CC) $(CFLAGS) $(XXFLAGS) -Wl,-s -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \
-DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \
-DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \
-DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" \
- ldd.c -o $@
+ $^ -o $@
$(STRIPTOOL) -x -R .note -R .comment $@
clean:
rm -f $(TARGETS) *.o *~ core *.target elf.h
+readelf.c readsoname.c ldconfig.c ldd.c: headers