X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c6b71bffdf1c57371b048e2b0be04bf88b9e4b3e..0286d08d1453506f9ff9a830d58b3b35817d0b14:/src/png/scripts/makefile.sggcc diff --git a/src/png/scripts/makefile.sggcc b/src/png/scripts/makefile.sggcc index edae317256..0902697848 100644 --- a/src/png/scripts/makefile.sggcc +++ b/src/png/scripts/makefile.sggcc @@ -18,7 +18,7 @@ ZLIBINC=../zlib LIBNAME=libpng12 PNGMAJ = 0 -PNGMIN = 1.2.4 +PNGMIN = 1.2.7 PNGVER = $(PNGMAJ).$(PNGMIN) CC=gcc @@ -29,7 +29,10 @@ ABI= WARNMORE= # -g -DPNG_DEBUG=5 CFLAGS=$(ABI) -I$(ZLIBINC) -O2 $(WARNMORE) -fPIC -mabi=n32 LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm -LDSHARED=cc $(ABI) -shared -soname $(LIBNAME).so.$(PNGMAJ) +LDSHARED=cc $(ABI) -shared -soname $(LIBNAME).so.$(PNGMAJ) \ + -set_version sgi$(PNGMAJ).0 +LDLEGACY=cc $(ABI) -shared -soname libpng.so.3 \ + -set_version sgi$3.0 # See "man dso" for info about shared objects RANLIB=echo @@ -69,17 +72,16 @@ libpng.a: $(OBJS) shared: $(LIBNAME).so.$(PNGVER) libpng.pc: - cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > \ - libpng.pc + cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc libpng-config: ( cat scripts/libpng-config-head.in; \ echo prefix=\"$(prefix)\"; \ - echo cppflags=\"-I$(INCPATH)/$(LIBNAME) -DPNG_USE_PNGGCCRD \ - -DPNG_NO_ASSEMBLER_CODE\"; \ - echo cflags=\"$(ABI)\"; \ - echo ldflags=\"-L$(LIBPATH)\"; \ - echo rpath=\"$(LIBPATH)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo ccopts=\"$(ABI)\"; \ + echo ldopts=\"$(ABI)\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo libdir=\"$(LIBPATH)\"; \ echo libs=\"-lpng12 -lz -lm\"; \ cat scripts/libpng-config-body.in ) > libpng-config chmod +x libpng-config @@ -94,6 +96,9 @@ $(LIBNAME).so.$(PNGVER): $(OBJS) $(LDSHARED) -o $@ $(OBJS) rm -f $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ) +libpng.so.3.$(PNGMIN): $(OBJS) + $(LDLEGACY) -o $@ $(OBJS) + pngtest: pngtest.o libpng.a $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -118,18 +123,21 @@ install-static: install-headers libpng.a -@/bin/rm -f $(DL)/libpng.a (cd $(DL); ln -sf $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc +install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ + libpng.so.3.$(PNGMIN) -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ) -@/bin/rm -f $(DL)/libpng.so -@/bin/rm -f $(DL)/libpng.so.3 - -@/bin/rm -f $(DL)/libpng.so.3.* + -@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* cp $(LIBNAME).so.$(PNGVER) $(DL) + cp libpng.so.3.$(PNGMIN) $(DL) chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + chmod 755 $(DL)/libpng.so.3.$(PNGMIN) (cd $(DL); \ - ln -sf $(LIBNAME).so.$(PNGVER) libpng.so; \ - ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3; \ - ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \ + ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \ + ln -sf libpng.so.3 libpng.so; \ ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi @@ -161,20 +169,34 @@ install-config: libpng-config install: install-static install-shared install-man install-config # If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. +# move the library to its final location. Use test-dd to test it +# before then. + +test-dd: + echo + echo Testing installed dynamic shared library in $(DL). + $(CC) -I$(DI) -I$(ZLIBINC) \ + `$(BINPATH)/libpng12-config --cflags` pngtest.c \ + -L$(DL) -L$(ZLIBLIB) \ + -rpath $(ZLIBLIB):$(DL)\ + -o pngtestd `$(BINPATH)/libpng12-config --ldflags` + ./pngtestd pngtest.png test-installed: - $(CC) -I$(ZLIBINC) \ - `$(BINPATH)/libpng12-config --cppflags --cflags` pngtest.c \ - -L$(ZLIBLIB) -rpath $(ZLIBLIB):`$(BINPATH)/libpng12-config --rpath` \ - -o pngtesti `$(BINPATH)/libpng12-config --ldflags --libs` echo echo Testing installed dynamic shared library. + $(CC) -I$(ZLIBINC) \ + `$(BINPATH)/libpng12-config --cflags` pngtest.c \ + -L$(ZLIBLIB) \ + -rpath $(ZLIBLIB):`$(BINPATH)/libpng12-config --libdir` \ + -o pngtesti `$(BINPATH)/libpng12-config --ldflags` ./pngtesti pngtest.png clean: - rm -f *.o libpng.a pngtest pngout.png libpng.pc libpng-config \ - $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* so_locations + rm -f *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \ + $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ + libpng.so.3.$(PNGMIN) \ + so_locations DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: