Glenn Randers-Pehrson | 0cc2f95 | 2002-10-03 06:32:37 -0500 | [diff] [blame] | 1 | # makefile for libpng on HP-UX using GCC with the HP ANSI/C linker. |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 2 | # Copyright (C) 2002, 2006-2008 Glenn Randers-Pehrson |
Glenn Randers-Pehrson | 1909560 | 2001-03-14 07:08:39 -0600 | [diff] [blame] | 3 | # Copyright (C) 2001, Laurent faillie |
| 4 | # Copyright (C) 1998, 1999 Greg Roelofs |
| 5 | # Copyright (C) 1996, 1997 Andreas Dilger |
Glenn Randers-Pehrson | 3e61d79 | 2009-06-24 09:31:28 -0500 | [diff] [blame] | 6 | # |
Glenn Randers-Pehrson | bfbf865 | 2009-06-26 21:46:52 -0500 | [diff] [blame] | 7 | # This code is released under the libpng license. |
Glenn Randers-Pehrson | c332bbc | 2009-06-25 13:43:50 -0500 | [diff] [blame] | 8 | # For conditions of distribution and use, see the disclaimer |
Glenn Randers-Pehrson | 037023b | 2009-06-24 10:27:36 -0500 | [diff] [blame] | 9 | # and license in png.h |
Glenn Randers-Pehrson | 1909560 | 2001-03-14 07:08:39 -0600 | [diff] [blame] | 10 | |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 11 | # Library name: |
Glenn Randers-Pehrson | 1721829 | 2006-04-20 07:20:46 -0500 | [diff] [blame] | 12 | LIBNAME = libpng14 |
Glenn Randers-Pehrson | 56f6396 | 2008-10-06 10:16:17 -0500 | [diff] [blame] | 13 | PNGMAJ = 14 |
Glenn Randers-Pehrson | 311c847 | 2009-11-20 09:45:08 -0600 | [diff] [blame^] | 14 | PNGMIN = 1.4.0beta103 |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 15 | PNGVER = $(PNGMAJ).$(PNGMIN) |
| 16 | |
| 17 | # Shared library names: |
| 18 | LIBSO=$(LIBNAME).sl |
| 19 | LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ) |
| 20 | LIBSOVER=$(LIBNAME).sl.$(PNGVER) |
| 21 | OLDSO=libpng.sl |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 22 | OLDSOMAJ=libpng.sl.14 |
| 23 | OLDSOVER=libpng.sl.14.$(PNGMIN) |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 24 | |
| 25 | # Utilities: |
Glenn Randers-Pehrson | 1909560 | 2001-03-14 07:08:39 -0600 | [diff] [blame] | 26 | CC=gcc |
Glenn Randers-Pehrson | 0cc2f95 | 2002-10-03 06:32:37 -0500 | [diff] [blame] | 27 | LD=ld |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 28 | AR_RC=ar rc |
Glenn Randers-Pehrson | 170b70c | 2006-03-10 10:19:04 -0600 | [diff] [blame] | 29 | MKDIR_P=mkdir -p |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 30 | LN_SF=ln -sf |
| 31 | RANLIB=ranlib |
| 32 | RM_F=/bin/rm -f |
Glenn Randers-Pehrson | 1909560 | 2001-03-14 07:08:39 -0600 | [diff] [blame] | 33 | |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 34 | # where "make install" puts libpng.a, $(OLDSO)*, png.h and pngconf.h |
Glenn Randers-Pehrson | 1909560 | 2001-03-14 07:08:39 -0600 | [diff] [blame] | 35 | prefix=/usr/local |
Glenn Randers-Pehrson | ad31054 | 2006-04-18 05:31:20 -0500 | [diff] [blame] | 36 | exec_prefix=$(prefix) |
Glenn Randers-Pehrson | 1909560 | 2001-03-14 07:08:39 -0600 | [diff] [blame] | 37 | |
| 38 | # Where the zlib library and include files are located |
| 39 | ZLIBLIB=/opt/zlib/lib |
| 40 | ZLIBINC=/opt/zlib/include |
| 41 | |
Glenn Randers-Pehrson | 0cc2f95 | 2002-10-03 06:32:37 -0500 | [diff] [blame] | 42 | # Note that if you plan to build a libpng shared library, zlib must also |
| 43 | # be a shared library, which zlib's configure does not do. After running |
| 44 | # zlib's configure, edit the appropriate lines of makefile to read: |
| 45 | # CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \ |
| 46 | # LDSHARED=ld -b |
| 47 | # SHAREDLIB=libz.sl |
| 48 | |
Glenn Randers-Pehrson | 1909560 | 2001-03-14 07:08:39 -0600 | [diff] [blame] | 49 | ALIGN= |
| 50 | # for i386: |
| 51 | #ALIGN=-malign-loops=2 -malign-functions=2 |
| 52 | |
| 53 | WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ |
| 54 | -Wmissing-declarations -Wtraditional -Wcast-align \ |
| 55 | -Wstrict-prototypes -Wmissing-prototypes #-Wconversion |
| 56 | |
| 57 | # for pgcc version 2.95.1, -O3 is buggy; don't use it. |
| 58 | |
Glenn Randers-Pehrson | 58c4f6b | 2009-11-07 10:50:29 -0600 | [diff] [blame] | 59 | CFLAGS=-DPNG_CONFIGURE_LIBPNG -I$(ZLIBINC) -W -Wall -O3 -funroll-loops -DPNG_NO_MMX_CODE \ |
Glenn Randers-Pehrson | 1909560 | 2001-03-14 07:08:39 -0600 | [diff] [blame] | 60 | $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5 |
Glenn Randers-Pehrson | 1721829 | 2006-04-20 07:20:46 -0500 | [diff] [blame] | 61 | #LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng14 -lz -lm |
| 62 | LDFLAGS=-L. -L$(ZLIBLIB) -lpng14 -lz -lm |
Glenn Randers-Pehrson | 5b5dcf8 | 2004-07-17 22:45:44 -0500 | [diff] [blame] | 63 | |
Glenn Randers-Pehrson | 1909560 | 2001-03-14 07:08:39 -0600 | [diff] [blame] | 64 | INCPATH=$(prefix)/include |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 65 | LIBPATH=$(exec_prefix)/lib |
Glenn Randers-Pehrson | 03008a0 | 2002-04-27 10:11:25 -0500 | [diff] [blame] | 66 | MANPATH=$(prefix)/man |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 67 | BINPATH=$(exec_prefix)/bin |
Glenn Randers-Pehrson | 03008a0 | 2002-04-27 10:11:25 -0500 | [diff] [blame] | 68 | |
| 69 | # override DESTDIR= on the make install command line to easily support |
| 70 | # installing into a temporary location. Example: |
| 71 | # |
| 72 | # make install DESTDIR=/tmp/build/libpng |
| 73 | # |
| 74 | # If you're going to install into a temporary location |
Glenn Randers-Pehrson | 07748d1 | 2002-05-25 11:12:10 -0500 | [diff] [blame] | 75 | # via DESTDIR, $(DESTDIR)$(prefix) must already exist before |
Glenn Randers-Pehrson | 03008a0 | 2002-04-27 10:11:25 -0500 | [diff] [blame] | 76 | # you execute make install. |
| 77 | DESTDIR= |
Glenn Randers-Pehrson | 1909560 | 2001-03-14 07:08:39 -0600 | [diff] [blame] | 78 | |
Glenn Randers-Pehrson | 07748d1 | 2002-05-25 11:12:10 -0500 | [diff] [blame] | 79 | DB=$(DESTDIR)$(BINPATH) |
| 80 | DI=$(DESTDIR)$(INCPATH) |
| 81 | DL=$(DESTDIR)$(LIBPATH) |
| 82 | DM=$(DESTDIR)$(MANPATH) |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 83 | |
Glenn Randers-Pehrson | 1909560 | 2001-03-14 07:08:39 -0600 | [diff] [blame] | 84 | OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ |
| 85 | pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ |
| 86 | pngwtran.o pngmem.o pngerror.o pngpread.o |
| 87 | |
| 88 | OBJSDLL = $(OBJS:.o=.pic.o) |
| 89 | |
| 90 | .SUFFIXES: .c .o .pic.o |
| 91 | |
| 92 | .c.pic.o: |
| 93 | $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c |
| 94 | |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 95 | all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config |
Glenn Randers-Pehrson | 1909560 | 2001-03-14 07:08:39 -0600 | [diff] [blame] | 96 | |
| 97 | libpng.a: $(OBJS) |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 98 | $(AR_RC) $@ $(OBJS) |
Glenn Randers-Pehrson | 1909560 | 2001-03-14 07:08:39 -0600 | [diff] [blame] | 99 | $(RANLIB) $@ |
| 100 | |
Glenn Randers-Pehrson | 03008a0 | 2002-04-27 10:11:25 -0500 | [diff] [blame] | 101 | libpng.pc: |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 102 | cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ |
| 103 | -e s!@exec_prefix@!$(exec_prefix)! \ |
| 104 | -e s!@libdir@!$(LIBPATH)! \ |
| 105 | -e s!@includedir@!$(INCPATH)! \ |
| 106 | -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc |
Glenn Randers-Pehrson | 03008a0 | 2002-04-27 10:11:25 -0500 | [diff] [blame] | 107 | |
Glenn Randers-Pehrson | 837a3d1 | 2002-05-10 20:19:58 -0500 | [diff] [blame] | 108 | libpng-config: |
| 109 | ( cat scripts/libpng-config-head.in; \ |
| 110 | echo prefix=\"$(prefix)\"; \ |
Glenn Randers-Pehrson | 5ff38d3 | 2002-09-17 23:38:46 -0500 | [diff] [blame] | 111 | echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ |
Glenn Randers-Pehrson | 1721829 | 2006-04-20 07:20:46 -0500 | [diff] [blame] | 112 | echo libs=\"-lpng14 -lz -lm\"; \ |
Glenn Randers-Pehrson | 837a3d1 | 2002-05-10 20:19:58 -0500 | [diff] [blame] | 113 | cat scripts/libpng-config-body.in ) > libpng-config |
| 114 | chmod +x libpng-config |
| 115 | |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 116 | $(LIBSO): $(LIBSOMAJ) |
| 117 | $(LN_SF) $(LIBSOMAJ) $(LIBSO) |
Glenn Randers-Pehrson | 1909560 | 2001-03-14 07:08:39 -0600 | [diff] [blame] | 118 | |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 119 | $(LIBSOMAJ): $(LIBSOVER) |
| 120 | $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) |
Glenn Randers-Pehrson | 1909560 | 2001-03-14 07:08:39 -0600 | [diff] [blame] | 121 | |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 122 | $(LIBSOVER): $(OBJSDLL) |
Glenn Randers-Pehrson | 0cc2f95 | 2002-10-03 06:32:37 -0500 | [diff] [blame] | 123 | $(LD) -b +s \ |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 124 | +h $(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL) |
Glenn Randers-Pehrson | 1909560 | 2001-03-14 07:08:39 -0600 | [diff] [blame] | 125 | |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 126 | $(OLDSOVER): $(OBJSDLL) |
| 127 | $(LD) -b +s \ |
| 128 | +h $(OLDSOMAJ) -o $(OLDSOVER) $(OBJSDLL) |
| 129 | |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 130 | pngtest: pngtest.o $(LIBSO) |
Glenn Randers-Pehrson | 1909560 | 2001-03-14 07:08:39 -0600 | [diff] [blame] | 131 | $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) |
| 132 | |
| 133 | test: pngtest |
| 134 | ./pngtest |
| 135 | |
Glenn Randers-Pehrson | c6de22d | 2002-02-23 18:55:25 -0600 | [diff] [blame] | 136 | |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 137 | install-headers: png.h pngconf.h |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 138 | -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi |
| 139 | -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 140 | cp png.h pngconf.h $(DI)/$(LIBNAME) |
Glenn Randers-Pehrson | 07748d1 | 2002-05-25 11:12:10 -0500 | [diff] [blame] | 141 | chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 142 | -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 143 | -@$(RM_F) $(DI)/libpng |
| 144 | (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) |
Glenn Randers-Pehrson | c1bfe68 | 2002-03-06 22:08:00 -0600 | [diff] [blame] | 145 | |
| 146 | install-static: install-headers libpng.a |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 147 | -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 148 | cp libpng.a $(DL)/$(LIBNAME).a |
| 149 | chmod 644 $(DL)/$(LIBNAME).a |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 150 | -@$(RM_F) $(DL)/libpng.a |
| 151 | (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) |
Glenn Randers-Pehrson | c1bfe68 | 2002-03-06 22:08:00 -0600 | [diff] [blame] | 152 | |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 153 | install-shared: install-headers $(LIBSOVER) libpng.pc \ |
| 154 | $(OLDSOVER) |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 155 | -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 156 | -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) |
| 157 | -@$(RM_F) $(DL)/$(LIBSOMAJ) |
| 158 | -@$(RM_F) $(DL)/$(OLDSO) |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 159 | -@$(RM_F) $(DL)/$(OLDSOMAJ) |
| 160 | -@$(RM_F) $(DL)/$(OLDSOVER)* |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 161 | cp $(LIBSOVER) $(DL) |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 162 | cp $(OLDSOVER) $(DL) |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 163 | chmod 755 $(DL)/$(LIBSOVER) |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 164 | chmod 755 $(DL)/$(OLDSOVER) |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 165 | (cd $(DL); \ |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 166 | $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ |
| 167 | $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 168 | $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 169 | $(LN_SF) $(LIBSOMAJ) $(LIBSO)) |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 170 | -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi |
| 171 | -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc |
| 172 | -@$(RM_F) $(DL)/pkgconfig/libpng.pc |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 173 | cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc |
| 174 | chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 175 | (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) |
Glenn Randers-Pehrson | c1bfe68 | 2002-03-06 22:08:00 -0600 | [diff] [blame] | 176 | |
Glenn Randers-Pehrson | 03008a0 | 2002-04-27 10:11:25 -0500 | [diff] [blame] | 177 | install-man: libpng.3 libpngpf.3 png.5 |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 178 | -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi |
| 179 | -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi |
| 180 | -@$(RM_F) $(DM)/man3/libpng.3 |
| 181 | -@$(RM_F) $(DM)/man3/libpngpf.3 |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 182 | cp libpng.3 $(DM)/man3 |
| 183 | cp libpngpf.3 $(DM)/man3 |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 184 | -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi |
| 185 | -@$(RM_F) $(DM)/man5/png.5 |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 186 | cp png.5 $(DM)/man5 |
Glenn Randers-Pehrson | 03008a0 | 2002-04-27 10:11:25 -0500 | [diff] [blame] | 187 | |
Glenn Randers-Pehrson | 837a3d1 | 2002-05-10 20:19:58 -0500 | [diff] [blame] | 188 | install-config: libpng-config |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 189 | -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi |
| 190 | -@$(RM_F) $(DB)/libpng-config |
| 191 | -@$(RM_F) $(DB)/$(LIBNAME)-config |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 192 | cp libpng-config $(DB)/$(LIBNAME)-config |
| 193 | chmod 755 $(DB)/$(LIBNAME)-config |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 194 | (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) |
Glenn Randers-Pehrson | 704228f | 2002-05-02 20:49:40 -0500 | [diff] [blame] | 195 | |
| 196 | install: install-static install-shared install-man install-config |
Glenn Randers-Pehrson | 1909560 | 2001-03-14 07:08:39 -0600 | [diff] [blame] | 197 | |
Glenn Randers-Pehrson | d020e9d | 2002-06-28 09:34:00 -0500 | [diff] [blame] | 198 | # If you installed in $(DESTDIR), test-installed won't work until you |
Glenn Randers-Pehrson | a4981d4 | 2004-08-25 22:00:45 -0500 | [diff] [blame] | 199 | # move the library to its final location. Use test-dd to test it |
| 200 | # before then. |
| 201 | |
| 202 | test-dd: |
| 203 | echo |
| 204 | echo Testing installed dynamic shared library in $(DL). |
| 205 | $(CC) -I$(DI) -I$(ZLIBINC) \ |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 206 | `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ |
Glenn Randers-Pehrson | 6bc53be | 2006-06-16 07:52:03 -0500 | [diff] [blame] | 207 | -L$(DL) -L$(ZLIBLIB) -Wl,-rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \ |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 208 | -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` |
Glenn Randers-Pehrson | a4981d4 | 2004-08-25 22:00:45 -0500 | [diff] [blame] | 209 | ./pngtestd pngtest.png |
Glenn Randers-Pehrson | d020e9d | 2002-06-28 09:34:00 -0500 | [diff] [blame] | 210 | |
| 211 | test-installed: |
| 212 | echo |
| 213 | echo Testing installed dynamic shared library. |
| 214 | $(CC) -I$(ZLIBINC) \ |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 215 | `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ |
Glenn Randers-Pehrson | d020e9d | 2002-06-28 09:34:00 -0500 | [diff] [blame] | 216 | -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \ |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 217 | -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` |
Glenn Randers-Pehrson | 2ae022d | 2002-07-01 22:23:46 -0500 | [diff] [blame] | 218 | ./pngtesti pngtest.png |
Glenn Randers-Pehrson | d020e9d | 2002-06-28 09:34:00 -0500 | [diff] [blame] | 219 | |
| 220 | clean: |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 221 | $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 222 | libpng-config $(LIBSO) $(LIBSOMAJ)* \ |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 223 | $(OLDSOVER) \ |
| 224 | libpng.pc |
Glenn Randers-Pehrson | 1909560 | 2001-03-14 07:08:39 -0600 | [diff] [blame] | 225 | |
| 226 | DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO |
| 227 | writelock: |
| 228 | chmod a-w *.[ch35] $(DOCS) scripts/* |
| 229 | |
| 230 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
| 231 | |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 232 | png.o png.pic.o: png.h pngconf.h pngpriv.h |
| 233 | pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h |
| 234 | pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h |
| 235 | pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h |
| 236 | pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h |
| 237 | pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h |
| 238 | pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h |
| 239 | pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h |
| 240 | pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h |
| 241 | pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h |
| 242 | pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h |
| 243 | pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h |
| 244 | pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h |
| 245 | pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h |
| 246 | pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h |
Glenn Randers-Pehrson | 1909560 | 2001-03-14 07:08:39 -0600 | [diff] [blame] | 247 | |
Glenn Randers-Pehrson | 013d1d6 | 2009-11-08 13:28:18 -0600 | [diff] [blame] | 248 | pngtest.o: png.h pngconf.h |