Glenn Randers-Pehrson | 5a0be34 | 2001-10-18 20:55:13 -0500 | [diff] [blame] | 1 | # makefile for libpng on Darwin / Mac OS X |
Glenn Randers-Pehrson | 56f6396 | 2008-10-06 10:16:17 -0500 | [diff] [blame] | 2 | # Copyright (C) 2002, 2004, 2006, 2008 Glenn Randers-Pehrson |
Glenn Randers-Pehrson | 5a0be34 | 2001-10-18 20:55:13 -0500 | [diff] [blame] | 3 | # Copyright (C) 2001 Christoph Pfisterer |
| 4 | # derived from makefile.linux: |
| 5 | # Copyright (C) 1998, 1999 Greg Roelofs |
| 6 | # Copyright (C) 1996, 1997 Andreas Dilger |
| 7 | # For conditions of distribution and use, see copyright notice in png.h |
| 8 | |
Glenn Randers-Pehrson | 1721829 | 2006-04-20 07:20:46 -0500 | [diff] [blame] | 9 | # where "make install" puts libpng.a, libpng14.dylib, png.h and pngconf.h |
Glenn Randers-Pehrson | 5a0be34 | 2001-10-18 20:55:13 -0500 | [diff] [blame] | 10 | prefix=/usr/local |
Glenn Randers-Pehrson | ad31054 | 2006-04-18 05:31:20 -0500 | [diff] [blame] | 11 | exec_prefix=$(prefix) |
Glenn Randers-Pehrson | 5a0be34 | 2001-10-18 20:55:13 -0500 | [diff] [blame] | 12 | |
| 13 | # Where the zlib library and include files are located |
| 14 | #ZLIBLIB=/usr/local/lib |
| 15 | #ZLIBINC=/usr/local/include |
| 16 | ZLIBLIB=../zlib |
| 17 | ZLIBINC=../zlib |
| 18 | |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 19 | # Library name: |
Glenn Randers-Pehrson | 1721829 | 2006-04-20 07:20:46 -0500 | [diff] [blame] | 20 | LIBNAME = libpng14 |
Glenn Randers-Pehrson | eb58091 | 2008-07-30 14:47:09 -0500 | [diff] [blame] | 21 | PNGMAJ = 12 |
Glenn Randers-Pehrson | d6d8075 | 2008-12-02 09:49:43 -0600 | [diff] [blame^] | 22 | PNGMIN = 1.4.0beta43 |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 23 | PNGVER = $(PNGMAJ).$(PNGMIN) |
| 24 | |
| 25 | # Shared library names: |
| 26 | LIBSO=$(LIBNAME).dylib |
| 27 | LIBSOMAJ=$(LIBNAME).$(PNGMAJ).dylib |
| 28 | LIBSOVER=$(LIBNAME).$(PNGVER).dylib |
| 29 | OLDSO=libpng.dylib |
Glenn Randers-Pehrson | eb58091 | 2008-07-30 14:47:09 -0500 | [diff] [blame] | 30 | OLDSOMAJ=libpng.14.dylib |
| 31 | OLDSOVER=libpng.14.$(PNGMIN).dylib |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 32 | |
| 33 | # Utilities: |
Glenn Randers-Pehrson | 5a0be34 | 2001-10-18 20:55:13 -0500 | [diff] [blame] | 34 | CC=cc |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 35 | AR_RC=ar rc |
Glenn Randers-Pehrson | 170b70c | 2006-03-10 10:19:04 -0600 | [diff] [blame] | 36 | MKDIR_P=mkdir -p |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 37 | LN_SF=ln -sf |
| 38 | RANLIB=ranlib |
| 39 | RM_F=/bin/rm -f |
| 40 | |
Glenn Randers-Pehrson | 7908421 | 2008-08-04 13:31:41 -0500 | [diff] [blame] | 41 | # CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops -DPNG_NO_MMX_CODE |
| 42 | CFLAGS=-I$(ZLIBINC) -W -Wall -O -funroll-loops |
Glenn Randers-Pehrson | 1721829 | 2006-04-20 07:20:46 -0500 | [diff] [blame] | 43 | LDFLAGS=-L. -L$(ZLIBLIB) -lpng14 -lz |
Glenn Randers-Pehrson | 761bf9f | 2002-10-31 19:53:20 -0600 | [diff] [blame] | 44 | |
Glenn Randers-Pehrson | 5a0be34 | 2001-10-18 20:55:13 -0500 | [diff] [blame] | 45 | INCPATH=$(prefix)/include |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 46 | LIBPATH=$(exec_prefix)/lib |
Glenn Randers-Pehrson | 03008a0 | 2002-04-27 10:11:25 -0500 | [diff] [blame] | 47 | MANPATH=$(prefix)/man |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 48 | BINPATH=$(exec_prefix)/bin |
Glenn Randers-Pehrson | 03008a0 | 2002-04-27 10:11:25 -0500 | [diff] [blame] | 49 | |
| 50 | # override DESTDIR= on the make install command line to easily support |
| 51 | # installing into a temporary location. Example: |
| 52 | # |
| 53 | # make install DESTDIR=/tmp/build/libpng |
| 54 | # |
| 55 | # If you're going to install into a temporary location |
Glenn Randers-Pehrson | 07748d1 | 2002-05-25 11:12:10 -0500 | [diff] [blame] | 56 | # via DESTDIR, $(DESTDIR)$(prefix) must already exist before |
Glenn Randers-Pehrson | 03008a0 | 2002-04-27 10:11:25 -0500 | [diff] [blame] | 57 | # you execute make install. |
| 58 | DESTDIR= |
Glenn Randers-Pehrson | 5a0be34 | 2001-10-18 20:55:13 -0500 | [diff] [blame] | 59 | |
Glenn Randers-Pehrson | 07748d1 | 2002-05-25 11:12:10 -0500 | [diff] [blame] | 60 | DB=$(DESTDIR)$(BINPATH) |
| 61 | DI=$(DESTDIR)$(INCPATH) |
| 62 | DL=$(DESTDIR)$(LIBPATH) |
| 63 | DM=$(DESTDIR)$(MANPATH) |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 64 | |
Glenn Randers-Pehrson | 5a0be34 | 2001-10-18 20:55:13 -0500 | [diff] [blame] | 65 | OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ |
| 66 | pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ |
| 67 | pngwtran.o pngmem.o pngerror.o pngpread.o |
| 68 | |
| 69 | OBJSDLL = $(OBJS:.o=.pic.o) |
| 70 | |
| 71 | .SUFFIXES: .c .o .pic.o |
| 72 | |
| 73 | .c.pic.o: |
| 74 | $(CC) -c $(CFLAGS) -fno-common -o $@ $*.c |
| 75 | |
Glenn Randers-Pehrson | eb58091 | 2008-07-30 14:47:09 -0500 | [diff] [blame] | 76 | all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config |
Glenn Randers-Pehrson | 5a0be34 | 2001-10-18 20:55:13 -0500 | [diff] [blame] | 77 | |
| 78 | libpng.a: $(OBJS) |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 79 | $(AR_RC) $@ $(OBJS) |
Glenn Randers-Pehrson | 5a0be34 | 2001-10-18 20:55:13 -0500 | [diff] [blame] | 80 | $(RANLIB) $@ |
| 81 | |
Glenn Randers-Pehrson | 03008a0 | 2002-04-27 10:11:25 -0500 | [diff] [blame] | 82 | libpng.pc: |
Glenn Randers-Pehrson | eb58091 | 2008-07-30 14:47:09 -0500 | [diff] [blame] | 83 | cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ |
| 84 | -e s!@exec_prefix@!$(exec_prefix)! \ |
| 85 | -e s!@libdir@!$(LIBPATH)! \ |
| 86 | -e s!@includedir@!$(INCPATH)! \ |
| 87 | -e s!-lpng14!-lpng14\ -lz! > libpng.pc |
Glenn Randers-Pehrson | 837a3d1 | 2002-05-10 20:19:58 -0500 | [diff] [blame] | 88 | |
| 89 | libpng-config: |
| 90 | ( cat scripts/libpng-config-head.in; \ |
| 91 | echo prefix=\"$(prefix)\"; \ |
Glenn Randers-Pehrson | 5ff38d3 | 2002-09-17 23:38:46 -0500 | [diff] [blame] | 92 | echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ |
| 93 | echo L_opts=\"-L$(LIBPATH)\"; \ |
Glenn Randers-Pehrson | 1721829 | 2006-04-20 07:20:46 -0500 | [diff] [blame] | 94 | echo libs=\"-lpng14 -lz\"; \ |
Glenn Randers-Pehrson | 837a3d1 | 2002-05-10 20:19:58 -0500 | [diff] [blame] | 95 | cat scripts/libpng-config-body.in ) > libpng-config |
| 96 | chmod +x libpng-config |
Glenn Randers-Pehrson | 03008a0 | 2002-04-27 10:11:25 -0500 | [diff] [blame] | 97 | |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 98 | $(LIBSO): $(LIBSOMAJ) |
| 99 | $(LN_SF) $(LIBSOMAJ) $(LIBSO) |
Glenn Randers-Pehrson | 5a0be34 | 2001-10-18 20:55:13 -0500 | [diff] [blame] | 100 | |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 101 | $(LIBSOMAJ): $(LIBSOVER) |
| 102 | $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) |
Glenn Randers-Pehrson | 5a0be34 | 2001-10-18 20:55:13 -0500 | [diff] [blame] | 103 | |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 104 | $(LIBSOVER): $(OBJSDLL) |
Glenn Randers-Pehrson | 9c0f094 | 2002-02-21 23:14:23 -0600 | [diff] [blame] | 105 | $(CC) -dynamiclib \ |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 106 | -install_name $(LIBPATH)/$(LIBSOMAJ) \ |
Glenn Randers-Pehrson | 56f6396 | 2008-10-06 10:16:17 -0500 | [diff] [blame] | 107 | -current_version 14 -compatibility_version 14 \ |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 108 | -o $(LIBSOVER) \ |
Glenn Randers-Pehrson | 272489d | 2004-08-04 06:34:52 -0500 | [diff] [blame] | 109 | $(OBJSDLL) -L$(ZLIBLIB) -lz |
Glenn Randers-Pehrson | 5a0be34 | 2001-10-18 20:55:13 -0500 | [diff] [blame] | 110 | |
Glenn Randers-Pehrson | eb58091 | 2008-07-30 14:47:09 -0500 | [diff] [blame] | 111 | $(OLDSOVER): $(OBJSDLL) |
| 112 | $(CC) -dynamiclib \ |
| 113 | -install_name $(LIBPATH)/$(OLDSOMAJ) \ |
Glenn Randers-Pehrson | 56f6396 | 2008-10-06 10:16:17 -0500 | [diff] [blame] | 114 | -current_version 14 -compatibility_version 14 \ |
Glenn Randers-Pehrson | eb58091 | 2008-07-30 14:47:09 -0500 | [diff] [blame] | 115 | -o $(OLDSOVER) \ |
| 116 | $(OBJSDLL) -L$(ZLIBLIB) -lz |
| 117 | |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 118 | pngtest: pngtest.o $(LIBSO) |
Glenn Randers-Pehrson | 5a0be34 | 2001-10-18 20:55:13 -0500 | [diff] [blame] | 119 | $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) |
| 120 | |
| 121 | test: pngtest |
| 122 | ./pngtest |
| 123 | |
Glenn Randers-Pehrson | eb58091 | 2008-07-30 14:47:09 -0500 | [diff] [blame] | 124 | install-headers: png.h pngconf.h |
Glenn Randers-Pehrson | 1ce0836 | 2006-03-08 23:35:59 -0600 | [diff] [blame] | 125 | -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi |
| 126 | -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi |
Glenn Randers-Pehrson | eb58091 | 2008-07-30 14:47:09 -0500 | [diff] [blame] | 127 | cp png.h pngconf.h $(DI)/$(LIBNAME) |
Glenn Randers-Pehrson | 07748d1 | 2002-05-25 11:12:10 -0500 | [diff] [blame] | 128 | chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h |
Glenn Randers-Pehrson | eb58091 | 2008-07-30 14:47:09 -0500 | [diff] [blame] | 129 | -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 130 | -@$(RM_F) $(DI)/libpng |
| 131 | (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) |
Glenn Randers-Pehrson | c1bfe68 | 2002-03-06 22:08:00 -0600 | [diff] [blame] | 132 | |
| 133 | install-static: install-headers libpng.a |
Glenn Randers-Pehrson | 1ce0836 | 2006-03-08 23:35:59 -0600 | [diff] [blame] | 134 | -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 135 | cp libpng.a $(DL)/$(LIBNAME).a |
| 136 | chmod 644 $(DL)/$(LIBNAME).a |
Glenn Randers-Pehrson | 272489d | 2004-08-04 06:34:52 -0500 | [diff] [blame] | 137 | $(RANLIB) $(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 | eb58091 | 2008-07-30 14:47:09 -0500 | [diff] [blame] | 141 | install-shared: install-headers $(LIBSO) libpng.pc \ |
| 142 | $(OLDSOVER) |
Glenn Randers-Pehrson | 1ce0836 | 2006-03-08 23:35:59 -0600 | [diff] [blame] | 143 | -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 144 | -@$(RM_F) $(DL)/$(LIBNAME).$(PNGVER)*.dylib |
| 145 | -@$(RM_F) $(DL)/$(LIBNAME).$(PNGMAJ)*.dylib |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 146 | -@$(RM_F) $(DL)/$(LIBSO) |
| 147 | -@$(RM_F) $(DL)/$(OLDSO) |
Glenn Randers-Pehrson | eb58091 | 2008-07-30 14:47:09 -0500 | [diff] [blame] | 148 | -@$(RM_F) $(DL)/$(OLDSOMAJ) |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 149 | -@$(RM_F) $(DL)/libpng.3.$(PNGMIN)*.dylib |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 150 | cp $(LIBSOVER) $(DL) |
Glenn Randers-Pehrson | eb58091 | 2008-07-30 14:47:09 -0500 | [diff] [blame] | 151 | cp $(OLDSOVER) $(DL) |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 152 | chmod 755 $(DL)/$(LIBSOVER) |
Glenn Randers-Pehrson | eb58091 | 2008-07-30 14:47:09 -0500 | [diff] [blame] | 153 | chmod 755 $(DL)/$(OLDSOVER) |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 154 | (cd $(DL); \ |
Glenn Randers-Pehrson | eb58091 | 2008-07-30 14:47:09 -0500 | [diff] [blame] | 155 | $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ |
| 156 | $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ |
Glenn Randers-Pehrson | 4deeb79 | 2006-03-22 16:21:59 -0600 | [diff] [blame] | 157 | $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ |
Glenn Randers-Pehrson | eb58091 | 2008-07-30 14:47:09 -0500 | [diff] [blame] | 158 | $(LN_SF) $(LIBSOMAJ) $(LIBSO)) |
Glenn Randers-Pehrson | 1ce0836 | 2006-03-08 23:35:59 -0600 | [diff] [blame] | 159 | -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 160 | -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc |
| 161 | -@$(RM_F) $(DL)/pkgconfig/libpng.pc |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 162 | cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc |
| 163 | chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 164 | (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) |
Glenn Randers-Pehrson | c1bfe68 | 2002-03-06 22:08:00 -0600 | [diff] [blame] | 165 | |
Glenn Randers-Pehrson | 03008a0 | 2002-04-27 10:11:25 -0500 | [diff] [blame] | 166 | install-man: libpng.3 libpngpf.3 png.5 |
Glenn Randers-Pehrson | 1ce0836 | 2006-03-08 23:35:59 -0600 | [diff] [blame] | 167 | -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi |
| 168 | -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 169 | -@$(RM_F) $(DM)/man3/libpng.3 |
| 170 | -@$(RM_F) $(DM)/man3/libpngpf.3 |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 171 | cp libpng.3 $(DM)/man3 |
| 172 | cp libpngpf.3 $(DM)/man3 |
Glenn Randers-Pehrson | 1ce0836 | 2006-03-08 23:35:59 -0600 | [diff] [blame] | 173 | -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 174 | -@$(RM_F) $(DM)/man5/png.5 |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 175 | cp png.5 $(DM)/man5 |
Glenn Randers-Pehrson | 03008a0 | 2002-04-27 10:11:25 -0500 | [diff] [blame] | 176 | |
Glenn Randers-Pehrson | 837a3d1 | 2002-05-10 20:19:58 -0500 | [diff] [blame] | 177 | install-config: libpng-config |
Glenn Randers-Pehrson | 1ce0836 | 2006-03-08 23:35:59 -0600 | [diff] [blame] | 178 | -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 179 | -@$(RM_F) $(DB)/libpng-config |
| 180 | -@$(RM_F) $(DB)/$(LIBNAME)-config |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 181 | cp libpng-config $(DB)/$(LIBNAME)-config |
| 182 | chmod 755 $(DB)/$(LIBNAME)-config |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 183 | (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) |
Glenn Randers-Pehrson | 704228f | 2002-05-02 20:49:40 -0500 | [diff] [blame] | 184 | |
| 185 | install: install-static install-shared install-man install-config |
Glenn Randers-Pehrson | 5a0be34 | 2001-10-18 20:55:13 -0500 | [diff] [blame] | 186 | |
Glenn Randers-Pehrson | d020e9d | 2002-06-28 09:34:00 -0500 | [diff] [blame] | 187 | # 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] | 188 | # move the library to its final location. Use test-dd to test it |
| 189 | # before then. |
| 190 | |
| 191 | test-dd: |
| 192 | echo |
| 193 | echo Testing installed dynamic shared library in $(DL). |
| 194 | $(CC) -I$(DI) -I$(ZLIBINC) \ |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 195 | `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ |
Glenn Randers-Pehrson | a4981d4 | 2004-08-25 22:00:45 -0500 | [diff] [blame] | 196 | -L$(DL) -L$(ZLIBLIB) \ |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 197 | -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` |
Glenn Randers-Pehrson | a4981d4 | 2004-08-25 22:00:45 -0500 | [diff] [blame] | 198 | ./pngtestd pngtest.png |
Glenn Randers-Pehrson | d020e9d | 2002-06-28 09:34:00 -0500 | [diff] [blame] | 199 | |
| 200 | test-installed: |
| 201 | $(CC) $(CFLAGS) \ |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 202 | `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ |
Glenn Randers-Pehrson | d020e9d | 2002-06-28 09:34:00 -0500 | [diff] [blame] | 203 | -L$(ZLIBLIB) \ |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 204 | -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` |
Glenn Randers-Pehrson | 2ae022d | 2002-07-01 22:23:46 -0500 | [diff] [blame] | 205 | ./pngtesti pngtest.png |
Glenn Randers-Pehrson | d020e9d | 2002-06-28 09:34:00 -0500 | [diff] [blame] | 206 | |
Glenn Randers-Pehrson | 5a0be34 | 2001-10-18 20:55:13 -0500 | [diff] [blame] | 207 | clean: |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 208 | $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \ |
Glenn Randers-Pehrson | eb58091 | 2008-07-30 14:47:09 -0500 | [diff] [blame] | 209 | $(OLDSOVER) \ |
| 210 | libpng.pc $(LIBNAME).*dylib pngtesti |
Glenn Randers-Pehrson | 5a0be34 | 2001-10-18 20:55:13 -0500 | [diff] [blame] | 211 | |
| 212 | DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO |
| 213 | writelock: |
| 214 | chmod a-w *.[ch35] $(DOCS) scripts/* |
| 215 | |
| 216 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
| 217 | |
Glenn Randers-Pehrson | eb58091 | 2008-07-30 14:47:09 -0500 | [diff] [blame] | 218 | png.o png.pic.o: png.h pngconf.h |
| 219 | pngerror.o pngerror.pic.o: png.h pngconf.h |
| 220 | pngrio.o pngrio.pic.o: png.h pngconf.h |
| 221 | pngwio.o pngwio.pic.o: png.h pngconf.h |
| 222 | pngmem.o pngmem.pic.o: png.h pngconf.h |
| 223 | pngset.o pngset.pic.o: png.h pngconf.h |
| 224 | pngget.o pngget.pic.o: png.h pngconf.h |
| 225 | pngread.o pngread.pic.o: png.h pngconf.h |
| 226 | pngrtran.o pngrtran.pic.o: png.h pngconf.h |
| 227 | pngrutil.o pngrutil.pic.o: png.h pngconf.h |
| 228 | pngtrans.o pngtrans.pic.o: png.h pngconf.h |
| 229 | pngwrite.o pngwrite.pic.o: png.h pngconf.h |
| 230 | pngwtran.o pngwtran.pic.o: png.h pngconf.h |
| 231 | pngwutil.o pngwutil.pic.o: png.h pngconf.h |
| 232 | pngpread.o pngpread.pic.o: png.h pngconf.h |
Glenn Randers-Pehrson | 5a0be34 | 2001-10-18 20:55:13 -0500 | [diff] [blame] | 233 | |
Glenn Randers-Pehrson | eb58091 | 2008-07-30 14:47:09 -0500 | [diff] [blame] | 234 | pngtest.o: png.h pngconf.h |