Glenn Randers-Pehrson | d12aa50 | 1998-03-13 07:39:39 -0600 | [diff] [blame] | 1 | # makefile for libpng on Solaris 2.x with gcc |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 2 | # Copyright (C) 2004, 2006 Glenn Randers-Pehrson |
Glenn Randers-Pehrson | bcfd15d | 1999-10-01 14:22:25 -0500 | [diff] [blame] | 3 | # Contributed by William L. Sebok, based on makefile.linux |
Glenn Randers-Pehrson | 98c9d73 | 2000-05-03 21:06:11 -0500 | [diff] [blame] | 4 | # Copyright (C) 1998 Greg Roelofs |
Glenn Randers-Pehrson | d436672 | 2000-06-04 14:29:29 -0500 | [diff] [blame] | 5 | # Copyright (C) 1996, 1997 Andreas Dilger |
Guy Schalnat | 4ee97b0 | 1996-01-16 01:51:56 -0600 | [diff] [blame] | 6 | # For conditions of distribution and use, see copyright notice in png.h |
| 7 | |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 8 | AR_RC=ar rc |
Guy Schalnat | 4ee97b0 | 1996-01-16 01:51:56 -0600 | [diff] [blame] | 9 | CC=gcc |
Glenn Randers-Pehrson | 1ce0836 | 2006-03-08 23:35:59 -0600 | [diff] [blame^] | 10 | MKDIR_P=mkdir -p |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 11 | LN_SF=ln -f -s |
| 12 | RANLIB=echo |
| 13 | RM_F=/bin/rm -f |
Andreas Dilger | 47a0c42 | 1997-05-16 02:46:07 -0500 | [diff] [blame] | 14 | |
Glenn Randers-Pehrson | 9c0f094 | 2002-02-21 23:14:23 -0600 | [diff] [blame] | 15 | # Where make install puts libpng.a, libpng12.so*, and png.h |
Glenn Randers-Pehrson | 5c6aeb2 | 1998-12-29 11:47:59 -0600 | [diff] [blame] | 16 | prefix=/usr/local |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 17 | exec_prefix=$prefix |
Glenn Randers-Pehrson | 5c6aeb2 | 1998-12-29 11:47:59 -0600 | [diff] [blame] | 18 | |
Andreas Dilger | 47a0c42 | 1997-05-16 02:46:07 -0500 | [diff] [blame] | 19 | # Where the zlib library and include files are located |
Glenn Randers-Pehrson | f9f2fe0 | 1998-03-15 18:20:23 -0600 | [diff] [blame] | 20 | # Changing these to ../zlib poses a security risk. If you want |
| 21 | # to have zlib in an adjacent directory, specify the full path instead of "..". |
| 22 | #ZLIBLIB=../zlib |
| 23 | #ZLIBINC=../zlib |
| 24 | |
| 25 | ZLIBLIB=/usr/local/lib |
| 26 | ZLIBINC=/usr/local/include |
Glenn Randers-Pehrson | d12aa50 | 1998-03-13 07:39:39 -0600 | [diff] [blame] | 27 | |
Andreas Dilger | 47a0c42 | 1997-05-16 02:46:07 -0500 | [diff] [blame] | 28 | WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ |
Glenn Randers-Pehrson | 4393a9a | 1999-09-17 12:27:26 -0500 | [diff] [blame] | 29 | -Wmissing-declarations -Wtraditional -Wcast-align \ |
| 30 | -Wstrict-prototypes -Wmissing-prototypes #-Wconversion |
Glenn Randers-Pehrson | dff799e | 2004-08-07 21:42:49 -0500 | [diff] [blame] | 31 | CFLAGS=-I$(ZLIBINC) -Wall -O \ |
Glenn Randers-Pehrson | 4393a9a | 1999-09-17 12:27:26 -0500 | [diff] [blame] | 32 | # $(WARNMORE) -g -DPNG_DEBUG=5 |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 33 | LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm |
Guy Schalnat | 4ee97b0 | 1996-01-16 01:51:56 -0600 | [diff] [blame] | 34 | |
Glenn Randers-Pehrson | 9c0f094 | 2002-02-21 23:14:23 -0600 | [diff] [blame] | 35 | PNGMAJ = 0 |
Glenn Randers-Pehrson | 1ce0836 | 2006-03-08 23:35:59 -0600 | [diff] [blame^] | 36 | PNGMIN = 1.2.9beta8 |
Andreas Dilger | 02ad0ef | 1997-01-17 01:34:35 -0600 | [diff] [blame] | 37 | PNGVER = $(PNGMAJ).$(PNGMIN) |
Glenn Randers-Pehrson | c6de22d | 2002-02-23 18:55:25 -0600 | [diff] [blame] | 38 | LIBNAME = libpng12 |
Guy Schalnat | 4ee97b0 | 1996-01-16 01:51:56 -0600 | [diff] [blame] | 39 | |
Andreas Dilger | 47a0c42 | 1997-05-16 02:46:07 -0500 | [diff] [blame] | 40 | INCPATH=$(prefix)/include |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 41 | LIBPATH=$(exec_prefix)/lib |
Glenn Randers-Pehrson | 03008a0 | 2002-04-27 10:11:25 -0500 | [diff] [blame] | 42 | MANPATH=$(prefix)/man |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 43 | BINPATH=$(exec_prefix)/bin |
Glenn Randers-Pehrson | 03008a0 | 2002-04-27 10:11:25 -0500 | [diff] [blame] | 44 | |
| 45 | # override DESTDIR= on the make install command line to easily support |
| 46 | # installing into a temporary location. Example: |
| 47 | # |
| 48 | # make install DESTDIR=/tmp/build/libpng |
| 49 | # |
| 50 | # If you're going to install into a temporary location |
Glenn Randers-Pehrson | 07748d1 | 2002-05-25 11:12:10 -0500 | [diff] [blame] | 51 | # via DESTDIR, $(DESTDIR)$(prefix) must already exist before |
Glenn Randers-Pehrson | 03008a0 | 2002-04-27 10:11:25 -0500 | [diff] [blame] | 52 | # you execute make install. |
| 53 | DESTDIR= |
Guy Schalnat | 4ee97b0 | 1996-01-16 01:51:56 -0600 | [diff] [blame] | 54 | |
Glenn Randers-Pehrson | 07748d1 | 2002-05-25 11:12:10 -0500 | [diff] [blame] | 55 | DB=$(DESTDIR)$(BINPATH) |
| 56 | DI=$(DESTDIR)$(INCPATH) |
| 57 | DL=$(DESTDIR)$(LIBPATH) |
| 58 | DM=$(DESTDIR)$(MANPATH) |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 59 | |
Andreas Dilger | 47a0c42 | 1997-05-16 02:46:07 -0500 | [diff] [blame] | 60 | 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] | 61 | pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ |
| 62 | pngwtran.o pngmem.o pngerror.o pngpread.o |
Guy Schalnat | 4ee97b0 | 1996-01-16 01:51:56 -0600 | [diff] [blame] | 63 | |
Glenn Randers-Pehrson | 2687fcc | 1998-01-07 20:54:20 -0600 | [diff] [blame] | 64 | OBJSDLL = $(OBJS:.o=.pic.o) |
| 65 | |
| 66 | .SUFFIXES: .c .o .pic.o |
| 67 | |
| 68 | .c.pic.o: |
| 69 | $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c |
| 70 | |
Glenn Randers-Pehrson | 07748d1 | 2002-05-25 11:12:10 -0500 | [diff] [blame] | 71 | all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config |
Guy Schalnat | 4ee97b0 | 1996-01-16 01:51:56 -0600 | [diff] [blame] | 72 | |
| 73 | libpng.a: $(OBJS) |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 74 | $(AR_RC) $@ $(OBJS) |
Guy Schalnat | 4ee97b0 | 1996-01-16 01:51:56 -0600 | [diff] [blame] | 75 | $(RANLIB) $@ |
| 76 | |
Glenn Randers-Pehrson | 03008a0 | 2002-04-27 10:11:25 -0500 | [diff] [blame] | 77 | libpng.pc: |
| 78 | cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc |
| 79 | |
Glenn Randers-Pehrson | 837a3d1 | 2002-05-10 20:19:58 -0500 | [diff] [blame] | 80 | libpng-config: |
| 81 | ( cat scripts/libpng-config-head.in; \ |
| 82 | echo prefix=\"$(prefix)\"; \ |
Glenn Randers-Pehrson | 5ff38d3 | 2002-09-17 23:38:46 -0500 | [diff] [blame] | 83 | echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ |
| 84 | echo cppflags=\"-DPNG_USE_PNGGCCRD -DPNG_NO_ASSEMBLER_CODE\"; \ |
| 85 | echo L_opts=\"-L$(LIBPATH)\"; \ |
| 86 | echo R_opts=\"-R$(LIBPATH)\"; \ |
Glenn Randers-Pehrson | 837a3d1 | 2002-05-10 20:19:58 -0500 | [diff] [blame] | 87 | echo libs=\"-lpng12 -lz -lm\"; \ |
| 88 | cat scripts/libpng-config-body.in ) > libpng-config |
| 89 | chmod +x libpng-config |
| 90 | |
Glenn Randers-Pehrson | c6de22d | 2002-02-23 18:55:25 -0600 | [diff] [blame] | 91 | $(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ) |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 92 | $(LN_FS) $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so |
Guy Schalnat | 4ee97b0 | 1996-01-16 01:51:56 -0600 | [diff] [blame] | 93 | |
Glenn Randers-Pehrson | c6de22d | 2002-02-23 18:55:25 -0600 | [diff] [blame] | 94 | $(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 95 | $(LN_FS) $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ) |
Guy Schalnat | 4ee97b0 | 1996-01-16 01:51:56 -0600 | [diff] [blame] | 96 | |
Glenn Randers-Pehrson | c6de22d | 2002-02-23 18:55:25 -0600 | [diff] [blame] | 97 | $(LIBNAME).so.$(PNGVER): $(OBJSDLL) |
Glenn Randers-Pehrson | 61c32d9 | 2000-02-04 23:40:16 -0600 | [diff] [blame] | 98 | @case "`type ld`" in *ucb*) \ |
| 99 | echo; \ |
| 100 | echo '## WARNING:'; \ |
| 101 | echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ |
| 102 | echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \ |
| 103 | echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \ |
| 104 | echo '## The environment variable LD_LIBRARY_PATH should not be set'; \ |
| 105 | echo '## at all. If it is, things are likely to break because of'; \ |
| 106 | echo '## the libucb dependency that is created.'; \ |
| 107 | echo; \ |
| 108 | ;; \ |
| 109 | esac |
Glenn Randers-Pehrson | 865f4f0 | 2002-09-15 20:30:38 -0500 | [diff] [blame] | 110 | $(LD) -G -h $(LIBNAME).so.$(PNGMAJ) \ |
| 111 | -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL) |
Guy Schalnat | 4ee97b0 | 1996-01-16 01:51:56 -0600 | [diff] [blame] | 112 | |
Glenn Randers-Pehrson | 9c3ab68 | 2006-02-20 22:09:05 -0600 | [diff] [blame] | 113 | libpng.so.0.$(PNGMIN): $(OBJS) |
| 114 | $(LD) -G -h libpng.so.0 \ |
| 115 | -o libpng.so.0.$(PNGMIN) $(OBJSDLL) |
Glenn Randers-Pehrson | 8a7df00 | 2002-08-15 22:02:57 -0500 | [diff] [blame] | 116 | |
Glenn Randers-Pehrson | c6de22d | 2002-02-23 18:55:25 -0600 | [diff] [blame] | 117 | pngtest: pngtest.o $(LIBNAME).so |
Glenn Randers-Pehrson | 2687fcc | 1998-01-07 20:54:20 -0600 | [diff] [blame] | 118 | $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) |
Guy Schalnat | 4ee97b0 | 1996-01-16 01:51:56 -0600 | [diff] [blame] | 119 | |
| 120 | test: pngtest |
| 121 | ./pngtest |
| 122 | |
Glenn Randers-Pehrson | c1bfe68 | 2002-03-06 22:08:00 -0600 | [diff] [blame] | 123 | install-headers: png.h pngconf.h |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 124 | -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi |
| 125 | -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 126 | cp png.h pngconf.h $(DI)/$(LIBNAME) |
Glenn Randers-Pehrson | 07748d1 | 2002-05-25 11:12:10 -0500 | [diff] [blame] | 127 | chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 128 | -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h |
| 129 | -@$(RM_F) $(DI)/libpng |
| 130 | (cd $(DI); $(LN_FS) $(LIBNAME) libpng; $(LN_FS) $(LIBNAME)/* .) |
Glenn Randers-Pehrson | c1bfe68 | 2002-03-06 22:08:00 -0600 | [diff] [blame] | 131 | |
| 132 | install-static: install-headers libpng.a |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 133 | -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 134 | cp libpng.a $(DL)/$(LIBNAME).a |
| 135 | chmod 644 $(DL)/$(LIBNAME).a |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 136 | -@$(RM_F) $(DL)/libpng.a |
| 137 | (cd $(DL); $(LN_FS) $(LIBNAME).a libpng.a) |
Glenn Randers-Pehrson | c1bfe68 | 2002-03-06 22:08:00 -0600 | [diff] [blame] | 138 | |
Glenn Randers-Pehrson | 8a7df00 | 2002-08-15 22:02:57 -0500 | [diff] [blame] | 139 | install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ |
Glenn Randers-Pehrson | 9c3ab68 | 2006-02-20 22:09:05 -0600 | [diff] [blame] | 140 | libpng.so.0.$(PNGMIN) |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 141 | -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi |
| 142 | -@$(RM_F) $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so |
| 143 | -@$(RM_F) $(DL)/$(LIBNAME).so.$(PNGMAJ) |
| 144 | -@$(RM_F) $(DL)/libpng.so |
| 145 | -@$(RM_F) $(DL)/libpng.so.0 |
| 146 | -@$(RM_F) $(DL)/libpng.so.0.$(PNGMIN)* |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 147 | cp $(LIBNAME).so.$(PNGVER) $(DL) |
Glenn Randers-Pehrson | 9c3ab68 | 2006-02-20 22:09:05 -0600 | [diff] [blame] | 148 | cp libpng.so.0.$(PNGMIN) $(DL) |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 149 | chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) |
Glenn Randers-Pehrson | 9c3ab68 | 2006-02-20 22:09:05 -0600 | [diff] [blame] | 150 | chmod 755 $(DL)/libpng.so.0.$(PNGMIN) |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 151 | (cd $(DL); \ |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 152 | $(LN_FS) libpng.so.0.$(PNGMIN) libpng.so.0; \ |
| 153 | $(LN_FS) libpng.so.0 libpng.so; \ |
| 154 | $(LN_FS) $(LIBNAME).so.$(PNGVER) $(LIBNAME).so; \ |
| 155 | $(LN_FS) $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)) |
| 156 | -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi |
| 157 | -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc |
| 158 | -@$(RM_F) $(DL)/pkgconfig/libpng.pc |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 159 | cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc |
| 160 | chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 161 | (cd $(DL)/pkgconfig; $(LN_FS) $(LIBNAME).pc libpng.pc) |
Glenn Randers-Pehrson | c1bfe68 | 2002-03-06 22:08:00 -0600 | [diff] [blame] | 162 | |
Glenn Randers-Pehrson | 03008a0 | 2002-04-27 10:11:25 -0500 | [diff] [blame] | 163 | install-man: libpng.3 libpngpf.3 png.5 |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 164 | -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi |
| 165 | -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi |
| 166 | -@$(RM_F) $(DM)/man3/libpng.3 |
| 167 | -@$(RM_F) $(DM)/man3/libpngpf.3 |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 168 | cp libpng.3 $(DM)/man3 |
| 169 | cp libpngpf.3 $(DM)/man3 |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 170 | -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi |
| 171 | -@$(RM_F) $(DM)/man5/png.5 |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 172 | cp png.5 $(DM)/man5 |
Glenn Randers-Pehrson | 03008a0 | 2002-04-27 10:11:25 -0500 | [diff] [blame] | 173 | |
Glenn Randers-Pehrson | 837a3d1 | 2002-05-10 20:19:58 -0500 | [diff] [blame] | 174 | install-config: libpng-config |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 175 | -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi |
| 176 | -@$(RM_F) $(DB)/libpng-config |
| 177 | -@$(RM_F) $(DB)/$(LIBNAME)-config |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 178 | cp libpng-config $(DB)/$(LIBNAME)-config |
| 179 | chmod 755 $(DB)/$(LIBNAME)-config |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 180 | (cd $(DB); $(LN_FS) $(LIBNAME)-config libpng-config) |
Glenn Randers-Pehrson | 704228f | 2002-05-02 20:49:40 -0500 | [diff] [blame] | 181 | |
| 182 | install: install-static install-shared install-man install-config |
Guy Schalnat | 4ee97b0 | 1996-01-16 01:51:56 -0600 | [diff] [blame] | 183 | |
Glenn Randers-Pehrson | d020e9d | 2002-06-28 09:34:00 -0500 | [diff] [blame] | 184 | # 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] | 185 | # move the library to its final location. Use test-dd to test it |
| 186 | # before then. |
| 187 | |
| 188 | test-dd: |
| 189 | echo |
| 190 | echo Testing installed dynamic shared library in $(DL). |
| 191 | $(CC) -I$(DI) -I$(ZLIBINC) \ |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 192 | `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ |
| 193 | -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \ |
Glenn Randers-Pehrson | a4981d4 | 2004-08-25 22:00:45 -0500 | [diff] [blame] | 194 | -L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL) |
| 195 | ./pngtestd pngtest.png |
Glenn Randers-Pehrson | d020e9d | 2002-06-28 09:34:00 -0500 | [diff] [blame] | 196 | |
| 197 | test-installed: |
| 198 | echo |
| 199 | echo Testing installed dynamic shared library. |
| 200 | $(CC) -I$(ZLIBINC) \ |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 201 | `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ |
| 202 | -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \ |
Glenn Randers-Pehrson | d020e9d | 2002-06-28 09:34:00 -0500 | [diff] [blame] | 203 | -L$(ZLIBLIB) -R$(ZLIBLIB) |
Glenn Randers-Pehrson | 2ae022d | 2002-07-01 22:23:46 -0500 | [diff] [blame] | 204 | ./pngtesti pngtest.png |
Glenn Randers-Pehrson | d020e9d | 2002-06-28 09:34:00 -0500 | [diff] [blame] | 205 | |
Guy Schalnat | 4ee97b0 | 1996-01-16 01:51:56 -0600 | [diff] [blame] | 206 | clean: |
Glenn Randers-Pehrson | 5c60b23 | 2006-03-07 07:09:22 -0600 | [diff] [blame] | 207 | $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ |
Glenn Randers-Pehrson | 8a7df00 | 2002-08-15 22:02:57 -0500 | [diff] [blame] | 208 | libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ |
Glenn Randers-Pehrson | 9c3ab68 | 2006-02-20 22:09:05 -0600 | [diff] [blame] | 209 | libpng.so.0.$(PNGMIN) \ |
Glenn Randers-Pehrson | 51d9250 | 2002-08-23 23:07:42 -0500 | [diff] [blame] | 210 | libpng.pc |
Guy Schalnat | 4ee97b0 | 1996-01-16 01:51:56 -0600 | [diff] [blame] | 211 | |
Glenn Randers-Pehrson | 166c5a3 | 1999-12-10 09:43:02 -0600 | [diff] [blame] | 212 | DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO |
| 213 | writelock: |
| 214 | chmod a-w *.[ch35] $(DOCS) scripts/* |
| 215 | |
Guy Schalnat | 4ee97b0 | 1996-01-16 01:51:56 -0600 | [diff] [blame] | 216 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
| 217 | |
Glenn Randers-Pehrson | 2687fcc | 1998-01-07 20:54:20 -0600 | [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 |
| 233 | |
Guy Schalnat | 4ee97b0 | 1996-01-16 01:51:56 -0600 | [diff] [blame] | 234 | pngtest.o: png.h pngconf.h |