OSDN Git Service

touchup CFLAGS and also link the link.h header file like we do with elf.h
authorMike Frysinger <vapier@gentoo.org>
Wed, 21 Sep 2005 23:48:05 +0000 (23:48 -0000)
committerMike Frysinger <vapier@gentoo.org>
Wed, 21 Sep 2005 23:48:05 +0000 (23:48 -0000)
utils/Makefile

index 4225ade..83dc7b1 100644 (file)
@@ -39,6 +39,7 @@ endif
 
 headers:
        @$(LN) -fs $(TOPDIR)include/elf.h
+       @$(LN) -fs $(TOPDIR)include/link.h
 
 readelf.c ldconfig.c ldd.c:    headers
 
@@ -58,15 +59,17 @@ ldconfig: ldconfig.c
                $^ -o $@
        $(STRIPTOOL) -s -x -R .note -R .comment $@
 
+LDD_CFLAGS := $(PIEFLAG) $(LDPIEFLAG)
 ldd: ldd.c
-       $(CC) $(CFLAGS) $(PIEFLAG) $(LDPIEFLAG) \
+       $(CC) $(CFLAGS) $(LDD_CFLAGS) \
                -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \
                -DUCLIBC_LDSO=$(UCLIBC_LDSO) -I. -I../ldso/include \
                $^ -o $@
        $(STRIPTOOL) -s -x -R .note -R .comment $@
 
+ICONV_CFLAGS := $(PIEFLAG) $(LDPIEFLAG)
 iconv: ../libc/misc/wchar/wchar.c
-       $(CC) $(CFLAGS) $(PIEFLAG) $(LDPIEFLAG) \
+       $(CC) $(CFLAGS) $(ICONV_CFLAGS) \
                -DL_iconv_main \
                $^ -o $@
        $(STRIPTOOL) -s -x -R .note -R .comment $@
@@ -93,7 +96,7 @@ readelf.host: readelf.c
        $(HOSTCC) $(HOSTCFLAGS) -Wl,-s $^ -o $@
 
 clean:
-       $(RM) $(TARGETS) *.o *~ core *.target elf.h iconv *.host
+       $(RM) $(TARGETS) *.o *~ core *.target elf.h link.h iconv *.host
 
 install: all
 ifeq ($(strip $(HAVE_SHARED)),y)