]>
Commit | Line | Data |
---|---|---|
0272a10d | 1 | # makefile for libpng under FreeBSD |
b61cc19c PC |
2 | # Copyright (C) 2002, 2007, 2009 Glenn Randers-Pehrson and Andrey A. Chernov |
3 | # | |
4 | # This code is released under the libpng license. | |
5 | # For conditions of distribution and use, see the disclaimer | |
6 | # and license in png.h | |
0272a10d VZ |
7 | |
8 | PREFIX?= /usr/local | |
fff5f7d5 | 9 | SHLIB_VER?= 16 |
0272a10d VZ |
10 | |
11 | LIB= png | |
12 | SHLIB_MAJOR= ${SHLIB_VER} | |
13 | SHLIB_MINOR= 0 | |
fff5f7d5 VZ |
14 | NO_PROFILE= YES |
15 | NO_OBJ= YES | |
0272a10d VZ |
16 | |
17 | # where make install puts libpng.a and png.h | |
18 | DESTDIR= ${PREFIX} | |
19 | LIBDIR= /lib | |
fff5f7d5 | 20 | INCS= png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
21 | INCSDIR= /include/libpng |
22 | INCDIR= ${INCSDIR} # for 4.x bsd.lib.mk | |
23 | MAN= libpng.3 libpngpf.3 png.5 | |
24 | MANDIR= /man/man | |
25 | SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \ | |
9c0d9ce3 DS |
26 | libpng/pngconf.h ${INCSDIR}/../pngconf.h \ |
27 | libpng/pnglibconf.h ${INCSDIR}/../pnglibconf.h | |
fff5f7d5 VZ |
28 | |
29 | # where make install finds libz.a and zlib.h | |
30 | ZLIBLIB= /usr/lib | |
31 | ZLIBINC= /usr/include | |
32 | ||
33 | LDADD+= -lm -lz | |
34 | #LDADD+= -lm -lz -lssp_nonshared # for OSVERSION < 800000 ? | |
35 | ||
0272a10d VZ |
36 | DPADD+= ${LIBM} ${LIBZ} |
37 | ||
fff5f7d5 | 38 | CFLAGS+= -I. -I${ZLIBINC} |
0272a10d VZ |
39 | |
40 | SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ | |
41 | pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ | |
42 | pngwtran.c pngmem.c pngerror.c pngpread.c | |
43 | ||
44 | pngtest: pngtest.o libpng.a | |
fff5f7d5 VZ |
45 | ${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -L${ZLIBLIB} \ |
46 | -lpng ${LDADD} | |
0272a10d VZ |
47 | |
48 | CLEANFILES= pngtest pngtest.o pngout.png | |
49 | ||
50 | test: pngtest | |
51 | ./pngtest | |
52 | ||
9c0d9ce3 DS |
53 | # see scripts/pnglibconf.mak for more options |
54 | pnglibconf.h: scripts/pnglibconf.h.prebuilt | |
55 | cp scripts/pnglibconf.h.prebuilt $@ | |
56 | ||
0272a10d VZ |
57 | DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO |
58 | writelock: | |
59 | chmod a-w *.[ch35] $(DOCS) scripts/* | |
60 | ||
61 | .include <bsd.lib.mk> |