makefile.ne12bsd 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. # You should also run makefile.netbsd
  11. LOCALBASE?=/usr/local
  12. LIBDIR= ${LOCALBASE}/lib
  13. MANDIR= ${LOCALBASE}/man
  14. INCSDIR=${LOCALBASE}/include/libpng16
  15. LIB= png16
  16. SHLIB_MAJOR= 0
  17. SHLIB_MINOR= 1.6.10
  18. SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
  19. pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
  20. pngwtran.c pngmem.c pngerror.c pngpread.c
  21. INCS= png.h pngconf.h pnglibconf.h
  22. MAN= libpng.3 libpngpf.3 png.5
  23. CPPFLAGS+=-I${.CURDIR}
  24. # We should be able to do something like this instead of the manual
  25. # uncommenting, but it core dumps for me at the moment:
  26. # .if ${MACHINE_ARCH} == "i386"
  27. # MKLINT= no
  28. # .endif
  29. CLEANFILES+=pngtest.o pngtest pnglibconf.h
  30. .c.o:
  31. $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
  32. # see scripts/pnglibconf.mak for more options
  33. pnglibconf.h: scripts/pnglibconf.h.prebuilt
  34. cp scripts/pnglibconf.h.prebuilt $@
  35. pngtest.o: pngtest.c
  36. ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
  37. pngtest: pngtest.o libpng.a
  38. ${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm
  39. test: pngtest
  40. cd ${.CURDIR} && ${.OBJDIR}/pngtest
  41. .include <bsd.lib.mk>