makefile.netbsd 1.5 KB
Newer Older
1 2 3
# makefile for libpng for NetBSD for the standard
# make obj && make depend && make && make test
# make includes && make install
4
# Copyright (C) 2002 Patrick R.L. Welche
5 6
# For conditions of distribution and use, see copyright notice in png.h

7 8
# You should also run makefile.ne0bsd

9 10 11
LOCALBASE?=/usr/local
LIBDIR=	${LOCALBASE}/lib
MANDIR= ${LOCALBASE}/man
12
INCSDIR=${LOCALBASE}/include/libpng
13

14 15
LIB=	png
SHLIB_MAJOR=	3
16
SHLIB_MINOR=	1.4.0beta57
17
SRCS=	pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
18 19
		pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
		pngwtran.c pngmem.c pngerror.c pngpread.c
20
INCS=	png.h pngconf.h pngpriv.h
21
MAN=	libpng.3 libpngpf.3 png.5
22

23
CPPFLAGS+=-I${.CURDIR}
24

25 26
CLEANFILES+=pngtest.o pngtest

27
all: pngconf.h pngdefs.h
28

29 30
pngdefs.h:
	echo "/* pngdefs.h was built by makefile.netbsd */" > pngdefs.h
31
	/* if you don't want to use the intel MMX code, uncomment this */
32
	# echo "#define PNG_NO_MMX_CODE" >> pngdefs.h
33
	/* if you don't need thread safety you can uncomment this */
34
	# echo "#define PNG_THREAD_UNSAFE_OK" >> pngdefs.h
35 36 37

# We should be able to do something like this instead of the manual
# uncommenting, but it core dumps for me at the moment:
38
# .if ${MACHINE_ARCH} == "i386"
39
#   echo "#define PNG_THREAD_UNSAFE_OK" >> pngdefs.h
40 41
#   MKLINT= no
# .else
42
#   echo "#define PNG_NO_MMX_CODE" >> pngdefs.h
43
# .endif
44

45 46
pngtest.o:	pngtest.c
	${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
47

48 49
pngtest:	pngtest.o libpng.a
	${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm
50

51 52
test:	pngtest
	cd ${.CURDIR} && ${.OBJDIR}/pngtest
53

54
.include <bsd.lib.mk>