From: Glenn Randers-P. <gl...@gm...> - 2011-08-29 14:05:17
|
>Comment By: Ingo von Borstel (planetmaker) Date: 2011-08-29 14:51 Message: Thanks for the quick response. The -isystem flag kinda slipped in and is not essential and should and could have been left out. wrt the $(ARCH) variable: it could possibly be argued that on OSX it might even be better to build a universal libary out-of-the box which contains both i386 and x86_64 as both might be needed. That would mean ARCH="-arch i386 -arch x86_64" On Mon, Aug 29, 2011 at 8:26 AM, Glenn Randers-Pehrson <gl...@gm...>wrote: > I've pushed this patch, minus the -isystem/opt/local/include > and using "=" instead of the gnu-ish "?=", to the git "devel" branch. > > ../glennrp > > > On Mon, Aug 29, 2011 at 7:57 AM, Glenn Randers-Pehrson <gl...@gm...>wrote: > >> On OSX 10.6 the default architecture libpng builds with the darwin >> makefile is x86_64 while zlib defaults to i386. >> >> Being in the need to compile fat binaries, a more general architecture >> flag seemed useful to mediff --git a/scripts/makefile.darwin >> b/scripts/makefile.darwin >> >> >> --- a/scripts/makefile.darwin >> +++ b/scripts/makefile.darwin >> @@ -37,10 +37,11 @@ >> LN_SF=ln -sf >> RANLIB=ranlib >> RM_F=/bin/rm -f >> +ARCH?=-arch i386 >> >> # CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops >> -CFLAGS=-I$(ZLIBINC) -W -Wall -O -funroll-loops >> -LDFLAGS=-L. -L$(ZLIBLIB) -lpng15 -lz >> +CFLAGS=-I$(ZLIBINC) -W -Wall -O -funroll-loops -isystem/opt/local/include >> $(ARCH) >> +LDFLAGS=-L. -L$(ZLIBLIB) -lpng15 -lz $(ARCH) >> >> INCPATH=$(prefix)/include >> LIBPATH=$(exec_prefix)/lib >> @@ -107,6 +108,7 @@ >> -install_name $(LIBPATH)/$(LIBSOMAJ) \ >> -current_version 15 -compatibility_version 15 \ >> -o $(LIBSOMAJ) \ >> + $(ARCH) \ >> $(OBJSDLL) -L$(ZLIBLIB) -lz >> >> pngtest: pngtest.o $(LIBSO) > > > |