From de0c9a10efd21e3719dc33cb51ffb3d1615223c8 Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Thu, 4 Dec 2003 06:36:52 +0000 Subject: Building of iconv.o was accidently always disabled. Also, build the iconv app in utils. --- libc/misc/wchar/Makefile | 12 ++++-------- utils/.cvsignore | 1 + utils/Makefile | 27 ++++++++++++++++++++------- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/libc/misc/wchar/Makefile b/libc/misc/wchar/Makefile index 58d7c6f16..a96dae2b4 100644 --- a/libc/misc/wchar/Makefile +++ b/libc/misc/wchar/Makefile @@ -29,9 +29,9 @@ MOBJ1= btowc.o wctob.o mbsinit.o mbrlen.o mbrtowc.o wcrtomb.o mbsrtowcs.o \ wcsrtombs.o _wchar_utf8sntowcs.o _wchar_wcsntoutf8s.o \ __mbsnrtowcs.o __wcsnrtombs.o wcwidth.o wcswidth.o -#ifeq ($(UCLIBC_HAS_LOCALE),y) -# MOBJ1 += iconv.o -#endif +ifeq ($(UCLIBC_HAS_LOCALE),y) + MOBJ1 += iconv.o +endif MSRC2= wstdio.c MOBJ2= fwide.o \ @@ -60,10 +60,6 @@ $(MOBJ2): $(MSRC2) $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o $(STRIPTOOL) -x -R .note -R .comment $*.o -#iconv.target: wchar.c -# $(TARGET_CC) $(CFLAGS) -DL_iconv_main wchar.c -o $@ $(LDADD_LIBFLOAT) -# $(STRIPTOOL) -x -R .note -R .comment $@ - clean: - $(RM) *.[oa] *~ core #iconv.target + $(RM) *.[oa] *~ core diff --git a/utils/.cvsignore b/utils/.cvsignore index ffa8a1a88..45974479a 100644 --- a/utils/.cvsignore +++ b/utils/.cvsignore @@ -2,3 +2,4 @@ ldd readelf ldconfig elf.h +iconv diff --git a/utils/Makefile b/utils/Makefile index c843160cb..875ec784c 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -23,6 +23,12 @@ include $(TOPDIR)Rules.mak TARGETS = ldd ldconfig readelf +ifeq ($(strip $(UCLIBC_HAS_LOCALE)),y) +TARGET_ICONV = iconv +else +TARGET_ICONV = +endif + XXFLAGS= ifeq ($(strip $(LDSO_LDD_SUPPORT)),y) XXFLAGS= -D__LDSO_LDD_SUPPORT @@ -31,20 +37,20 @@ XXFLAGS= endif ifeq ($(strip $(HAVE_SHARED)),y) -all: $(TARGETS) +all: $(TARGETS) $(TARGET_ICONV) else -all: +all: $(TARGET_ICONV) endif headers: $(LN) -fs $(TOPDIR)include/elf.h readelf: readelf.c - $(CC) $(CFLAGS) -Wl,-s $^ -o $@ $(LDADD_LIBFLOAT) + $(CC) $(CFLAGS) -Wl,-s $^ -o $@ $(LDADD_LIBFLOAT) -L../lib $(STRIPTOOL) -x -R .note -R .comment $@ ldconfig: ldconfig.c readsoname.c - $(CC) $(CFLAGS) $(XXFLAGS) -Wl,-s \ + $(CC) $(CFLAGS) $(XXFLAGS) -Wl,-s -static \ -DUCLIBC_RUNTIME_PREFIX=$(R_PREFIX) \ -DUCLIBC_LDSO=$(UCLIBC_LDSO) -I. -I../ldso/include \ $^ -o $@ $(LDADD_LIBFLOAT) @@ -54,11 +60,16 @@ ldd: ldd.c $(CC) $(CFLAGS) $(XXFLAGS) -Wl,-s \ -DUCLIBC_RUNTIME_PREFIX=$(R_PREFIX) \ -DUCLIBC_LDSO=$(UCLIBC_LDSO) \ - $^ -o $@ $(LDADD_LIBFLOAT) + $^ -o $@ $(LDADD_LIBFLOAT) -L../lib + $(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 $(STRIPTOOL) -x -R .note -R .comment $@ clean: - $(RM) $(TARGETS) *.o *~ core *.target elf.h + $(RM) $(TARGETS) *.o *~ core *.target elf.h iconv readelf.c readsoname.c ldconfig.c ldd.c: headers @@ -73,4 +84,6 @@ ifeq ($(strip $(HAVE_SHARED)),y) # system has binutils, or we couldn't have gotten this far... #$(INSTALL) -m 755 readelf $(PREFIX)$(RUNTIME_PREFIX)usr/bin/readelf endif - +ifeq ($(strip $(UCLIBC_HAS_LOCALE)),y) + $(INSTALL) -m 755 iconv $(PREFIX)$(RUNTIME_PREFIX)usr/bin/iconv +endif -- cgit v1.2.3