X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c6b71bffdf1c57371b048e2b0be04bf88b9e4b3e..0286d08d1453506f9ff9a830d58b3b35817d0b14:/src/png/scripts/makefile.gcmmx diff --git a/src/png/scripts/makefile.gcmmx b/src/png/scripts/makefile.gcmmx index 0b6b14ce11..fc4b797ca3 100644 --- a/src/png/scripts/makefile.gcmmx +++ b/src/png/scripts/makefile.gcmmx @@ -15,7 +15,7 @@ LIBNAME = libpng12 PNGMAJ = 0 -PNGMIN = 1.2.4 +PNGMIN = 1.2.7 PNGVER = $(PNGMAJ).$(PNGMIN) CC=gcc @@ -104,10 +104,10 @@ libpng.pc: libpng-config: ( cat scripts/libpng-config-head.in; \ echo prefix=\"$(prefix)\"; \ - echo cppflags=\"-I$(INCPATH)/$(LIBNAME) -DPNG_THREAD_UNSAFE_OK \ - -DPNG_USE_PNGGCCRD\"; \ - echo cflags=\"\"; \ - echo ldflags=\"-L$(LIBPATH) -Wl,-rpath,$(LIBPATH)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo cppflags=\"-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \ echo libs=\"-lpng12 -lz -lm\"; \ cat scripts/libpng-config-body.in ) > libpng-config chmod +x libpng-config @@ -127,7 +127,12 @@ $(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGVER): $(OBJSDLL) $(CC) -shared -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) \ -o $(LIBNAME).so.$(PNGVER) \ - $(OBJSDLL) -L$(ZLIBLIB) -lz -lm -lc + $(OBJSDLL) + +libpng.so.3.$(PNGMIN): $(OBJSDLL) + $(CC) -shared -Wl,-soname,libpng.so.3 \ + -o libpng.so.3.$(PNGMIN) \ + $(OBJSDLL) pngtest: pngtest.o $(LIBNAME).so $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -161,18 +166,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 @@ -204,18 +212,30 @@ 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) -W1, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \ + -o pngtestd `$(BINPATH)/libpng12-config --ldflags` + ./pngtestd pngtest.png test-installed: $(CC) -I$(ZLIBINC) \ - `$(BINPATH)/libpng12-config --cppflags --cflags` pngtest.c \ + `$(BINPATH)/libpng12-config --cflags` pngtest.c \ -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \ - -o pngtesti `$(BINPATH)/libpng12-config --ldflags --libs` + -o pngtesti `$(BINPATH)/libpng12-config --ldflags` ./pngtesti pngtest.png clean: - /bin/rm -f *.o libpng.a pngtest pngout.png libpng.pc libpng-config \ - $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti + /bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \ + $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \ + libpng.so.3.$(PNGMIN) \ + libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: