summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-01-20 21:28:42 +0000
committerEric Andersen <andersen@codepoet.org>2004-01-20 21:28:42 +0000
commitec84ed99f5f39a063abfd165077b44b561973d2c (patch)
tree1be11c6b885e6757ce894d19356423519969ed89
parent4c1038a2b69f88db35b8cfedb429a86b7f819078 (diff)
support building the uClibc utils for the host system...
-rw-r--r--utils/Makefile29
1 files changed, 23 insertions, 6 deletions
diff --git a/utils/Makefile b/utils/Makefile
index f53f0cdf4..45d61fde3 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -43,33 +43,50 @@ all: $(TARGET_ICONV)
endif
headers:
- $(LN) -fs $(TOPDIR)include/elf.h
+ @$(LN) -fs $(TOPDIR)include/elf.h
readelf: readelf.c
- $(CC) $(CFLAGS) -Wl,-s $^ -o $@ $(LDADD_LIBFLOAT) -L../lib
+ $(CC) $(CFLAGS) -Wl,-s $^ -o $@ $(LDADD_LIBFLOAT)
$(STRIPTOOL) -x -R .note -R .comment $@
ldconfig: ldconfig.c readsoname.c
$(CC) $(CFLAGS) $(XXFLAGS) -Wl,-s -static \
-DUCLIBC_RUNTIME_PREFIX=$(R_PREFIX) \
-DUCLIBC_LDSO=$(UCLIBC_LDSO) -I. -I../ldso/include \
- $^ -o $@ $(LDADD_LIBFLOAT) -L../lib
+ $^ -o $@ $(LDADD_LIBFLOAT)
$(STRIPTOOL) -x -R .note -R .comment $@
ldd: ldd.c
$(CC) $(CFLAGS) $(XXFLAGS) -Wl,-s \
-DUCLIBC_RUNTIME_PREFIX=$(R_PREFIX) \
-DUCLIBC_LDSO=$(UCLIBC_LDSO) \
- $^ -o $@ $(LDADD_LIBFLOAT) -L../lib
+ $^ -o $@ $(LDADD_LIBFLOAT)
$(STRIPTOOL) -x -R .note -R .comment $@
iconv: ../libc/misc/wchar/wchar.c
$(CC) $(CFLAGS) -DL_iconv_main ../libc/misc/wchar/wchar.c -o $@ \
- $(LDADD_LIBFLOAT) -L../lib
+ $(LDADD_LIBFLOAT)
$(STRIPTOOL) -x -R .note -R .comment $@
+hostutils: ldd.host ldconfig.host readelf.host
+
+ldd.host: ldd.c
+ $(HOSTCC) $(HOSTCFLAGS) -Wl,-s \
+ -DUCLIBC_RUNTIME_PREFIX=$(R_PREFIX) \
+ -DUCLIBC_LDSO=$(UCLIBC_LDSO) \
+ $^ -o $@
+
+ldconfig.host: ldconfig.c readsoname.c
+ $(HOSTCC) $(HOSTCFLAGS) -Wl,-s \
+ -DUCLIBC_RUNTIME_PREFIX=$(R_PREFIX) \
+ -DUCLIBC_LDSO=$(UCLIBC_LDSO) -I. -I../ldso/include \
+ $^ -o $@
+
+readelf.host: readelf.c
+ $(HOSTCC) $(HOSTCFLAGS) -Wl,-s $^ -o $@
+
clean:
- $(RM) $(TARGETS) *.o *~ core *.target elf.h iconv
+ $(RM) $(TARGETS) *.o *~ core *.target elf.h iconv *.host
readelf.c readsoname.c ldconfig.c ldd.c: headers