makefile.ne12bsd 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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.20
  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. # Pre-built configuration
  25. # See scripts/pnglibconf.mak for more options
  26. PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
  27. # We should be able to do something like this instead of the manual
  28. # uncommenting, but it core dumps for me at the moment:
  29. # .if ${MACHINE_ARCH} == "i386"
  30. # MKLINT= no
  31. # .endif
  32. CLEANFILES+=pngtest.o pngtest pnglibconf.h
  33. .c.o:
  34. $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
  35. pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
  36. cp $(PNGLIBCONF_H_PREBUILT) $@
  37. pngtest.o: pngtest.c
  38. ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
  39. pngtest: pngtest.o libpng.a
  40. ${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm
  41. test: pngtest
  42. cd ${.CURDIR} && ${.OBJDIR}/pngtest
  43. .include <bsd.lib.mk>