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