summaryrefslogtreecommitdiff
path: root/graphics/png/patches/patch-aa
blob: 47e4bae1caba1e5943f60bd51c52a34df4617cbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
$NetBSD: patch-aa,v 1.16 2001/05/28 02:41:55 jlam Exp $

--- scripts/makefile.std.orig	Fri Jan  5 19:25:50 2001
+++ scripts/makefile.std	Sun May 27 22:36:02 2001
@@ -3,7 +3,7 @@
 # For conditions of distribution and use, see copyright notice in png.h
 
 # where make install puts libpng.a and png.h
-prefix=/usr/local
+prefix=${PREFIX}
 
 # Where the zlib library and include files are located
 #ZLIBLIB=/usr/local/lib
@@ -11,9 +11,9 @@
 ZLIBLIB=../zlib
 ZLIBINC=../zlib
 
-CC=cc
-CFLAGS=-I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
+CC=${LIBTOOL} --mode=compile $(REALCC)
+#CFLAGS+=-O # -g -DPNG_DEBUG=5
+#LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
 
 #RANLIB=echo
 RANLIB=ranlib
@@ -22,27 +22,20 @@
 	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
 	pngwtran.o pngmem.o pngerror.o pngpread.o
 
-all: libpng.a pngtest
+all: libpng.la pngtest
 
-libpng.a: $(OBJS)
-	ar rc $@  $(OBJS)
-	$(RANLIB) $@
+libpng.la: $(OBJS)
+	${LIBTOOL} --mode=link $(REALCC) -o $@ ${OBJS:.o=.lo} -rpath ${PREFIX}/lib ${LDFLAGS} -lz -lm -version-info 2:0
 
-pngtest: pngtest.o libpng.a
-	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+pngtest: pngtest.o libpng.la
+	${LIBTOOL} --mode=link $(REALCC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) libpng.la -lz -lm
 
 test: pngtest
 	./pngtest
 
-install: libpng.a
-	-@mkdir $(prefix)/include
-	-@mkdir $(prefix)/lib
-	cp png.h $(prefix)/include
-	cp pngconf.h $(prefix)/include
-	chmod 644 $(prefix)/include/png.h
-	chmod 644 $(prefix)/include/pngconf.h
-	cp libpng.a $(prefix)/lib
-	chmod 644 $(prefix)/lib/libpng.a
+install: libpng.la
+	${BSD_INSTALL_DATA} png.h pngconf.h $(prefix)/include
+	${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} libpng.la $(prefix)/lib
 
 clean:
 	rm -f *.o libpng.a pngtest pngout.png