makefile.netbsd 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # makefile for libpng for NetBSD for the standard
  2. # make obj && make depend && make && make test
  3. # make includes && make install
  4. # Copyright (C) 2002 Patrick R.L. Welche
  5. # Copyright (C) 2007-2009, 2014 Glenn Randers-Pehrson
  6. #
  7. # This code is released under the libpng license.
  8. # For conditions of distribution and use, see the disclaimer
  9. # and license in png.h
  10. LOCALBASE?=/usr/local
  11. LIBDIR= ${LOCALBASE}/lib
  12. MANDIR= ${LOCALBASE}/man
  13. INCSDIR=${LOCALBASE}/include
  14. SHLIB_MAJOR= 16
  15. SHLIB_MINOR= 1.6.37
  16. LIB= png
  17. SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
  18. pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c pngtrans.c \
  19. pngwio.c pngwrite.c pngwtran.c pngwutil.c
  20. INCS= png.h pngconf.h pnglibconf.h
  21. MAN= libpng.3 libpngpf.3 png.5
  22. CPPFLAGS+=-I${.CURDIR}
  23. # Pre-built configuration
  24. # See scripts/pnglibconf.mak for more options
  25. PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
  26. # We should be able to do something like this instead of the manual
  27. # uncommenting, but it core dumps for me at the moment:
  28. # .if ${MACHINE_ARCH} == "i386"
  29. # MKLINT= no
  30. # .endif
  31. CLEANFILES+=pngtest.o pngtest pnglibconf.h
  32. .c.o:
  33. ${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $<
  34. pnglibconf.h: ${PNGLIBCONF_H_PREBUILT}
  35. cp ${PNGLIBCONF_H_PREBUILT} $@
  36. pngtest.o: pngtest.c
  37. ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
  38. pngtest: pngtest.o libpng.a
  39. ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -lz -lm
  40. test: pngtest
  41. cd ${.CURDIR} && ${.OBJDIR}/pngtest
  42. .include <bsd.lib.mk>