makefile.freebsd 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # makefile for libpng under FreeBSD
  2. # Copyright (C) 2002, 2007, 2009 Glenn Randers-Pehrson and Andrey A. Chernov
  3. #
  4. # This code is released under the libpng license.
  5. # For conditions of distribution and use, see the disclaimer
  6. # and license in png.h
  7. PREFIX?= /usr/local
  8. SHLIB_VER?= 15
  9. LIB= png
  10. SHLIB_MAJOR= ${SHLIB_VER}
  11. SHLIB_MINOR= 0
  12. NOPROFILE= YES
  13. NOOBJ= YES
  14. # where make install puts libpng.a and png.h
  15. DESTDIR= ${PREFIX}
  16. LIBDIR= /lib
  17. INCS= png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  18. INCSDIR= /include/libpng
  19. INCDIR= ${INCSDIR} # for 4.x bsd.lib.mk
  20. MAN= libpng.3 libpngpf.3 png.5
  21. MANDIR= /man/man
  22. SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \
  23. libpng/pngconf.h ${INCSDIR}/../pngconf.h \
  24. libpng/pnglibconf.h ${INCSDIR}/../pnglibconf.h
  25. LDADD+= -lm -lz
  26. DPADD+= ${LIBM} ${LIBZ}
  27. CFLAGS+= -I.
  28. SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
  29. pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
  30. pngwtran.c pngmem.c pngerror.c pngpread.c
  31. pngtest: pngtest.o libpng.a
  32. ${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -lpng -lz -lm
  33. CLEANFILES= pngtest pngtest.o pngout.png
  34. test: pngtest
  35. ./pngtest
  36. # see scripts/pnglibconf.mak for more options
  37. pnglibconf.h: scripts/pnglibconf.h.prebuilt
  38. cp scripts/pnglibconf.h.prebuilt $@
  39. DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
  40. writelock:
  41. chmod a-w *.[ch35] $(DOCS) scripts/*
  42. .include <bsd.lib.mk>