makefile.ne12bsd 1.6 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) 2006 Glenn Randers-Pehrson
5 6 7 8 9 10 11 12
# Copyright (C) 2002 Patrick R.L. Welche
# For conditions of distribution and use, see copyright notice in png.h

# You should also run makefile.netbsd

LOCALBASE?=/usr/local
LIBDIR=	${LOCALBASE}/lib
MANDIR= ${LOCALBASE}/man
13
INCSDIR=${LOCALBASE}/include/libpng14
14

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

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

26 27
CLEANFILES+=pngtest.o pngtest

28
all: pngconf.h pngdefs.h
29

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

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

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

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

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

.include <bsd.lib.mk>