diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/Makefile | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/utils/Makefile b/utils/Makefile index 0f02a2e06..03a5cfc2d 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -32,26 +32,28 @@ endif # NOTE: We build the utils AFTER we have a uClibc-targeted toolchain. ifeq ($(strip $(HAVE_SHARED)),y) -all: $(TARGETS) $(TARGET_ICONV) +all: $(TARGETS) $(TARGET_ICONV) else -all: $(TARGET_ICONV) +all: $(TARGET_ICONV) endif headers: @$(LN) -fs $(TOPDIR)include/elf.h +readelf.c ldconfig.c ldd.c: headers + readelf: readelf.c $(CC) $(CFLAGS) -Wl,-s $^ -o $@ $(STRIPTOOL) -x -R .note -R .comment $@ -ldconfig: ldconfig.c +ldconfig: ldconfig.c $(CC) $(CFLAGS) -Wl,-s $(if $(filter $(UCLIBC_STATIC_LDCONFIG),y),-static) \ -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \ -DUCLIBC_LDSO=$(UCLIBC_LDSO) -I. -I../ldso/include \ $^ -o $@ $(STRIPTOOL) -x -R .note -R .comment $@ -ldd: ldd.c +ldd: ldd.c $(CC) $(CFLAGS) $(PIEFLAG) $(LDPIEFLAG) -Wl,-s \ -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \ -DUCLIBC_LDSO=$(UCLIBC_LDSO) -I. -I../ldso/include \ @@ -70,13 +72,13 @@ else hostutils: readelf.host endif -ldd.host: ldd.c +ldd.host: ldd.c $(HOSTCC) $(HOSTCFLAGS) -Wl,-s \ -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \ -DUCLIBC_LDSO=$(UCLIBC_LDSO) -I. -I../ldso/include \ $^ -o $@ -ldconfig.host: ldconfig.c +ldconfig.host: ldconfig.c $(HOSTCC) $(HOSTCFLAGS) -Wl,-s \ -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \ -DUCLIBC_LDSO=$(UCLIBC_LDSO) -I. -I../ldso/include \ @@ -88,9 +90,6 @@ readelf.host: readelf.c clean: $(RM) $(TARGETS) *.o *~ core *.target elf.h iconv *.host - -readelf.c ldconfig.c ldd.c: headers - install: all ifeq ($(strip $(HAVE_SHARED)),y) $(INSTALL) -d $(PREFIX)$(RUNTIME_PREFIX)sbin |