Imported Upstream version 1.6.13
[platform/upstream/libpng.git] / scripts / makefile.ne12bsd
index 7bd2300..b5a369a 100644 (file)
@@ -2,7 +2,7 @@
 # make obj && make depend && make && make test
 # make includes && make install
 # Copyright (C) 2002 Patrick R.L. Welche
-# Copyright (C) 2007, 2009 Glenn Randers-Pehrson
+# Copyright (C) 2007, 2009, 2014 Glenn Randers-Pehrson
 #
 # This code is released under the libpng license.
 # For conditions of distribution and use, see the disclaimer
 LOCALBASE?=/usr/local
 LIBDIR=        ${LOCALBASE}/lib
 MANDIR= ${LOCALBASE}/man
-INCSDIR=${LOCALBASE}/include/libpng12
+INCSDIR=${LOCALBASE}/include/libpng16
 
-LIB=   png12
+LIB=   png16
 SHLIB_MAJOR=   0
-SHLIB_MINOR=   1.2.50
+SHLIB_MINOR=   1.6.13
 SRCS=  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
-INCS=  png.h pngconf.h
+INCS=  png.h pngconf.h pnglibconf.h
 MAN=   libpng.3 libpngpf.3 png.5
 
 CPPFLAGS+=-I${.CURDIR}
 
+# Pre-built configuration
+# See scripts/pnglibconf.mak for more options
+PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
+
 # We should be able to do something like this instead of the manual
 # uncommenting, but it core dumps for me at the moment:
 # .if ${MACHINE_ARCH} == "i386"
-#   CPPFLAGS+=-DPNG_THREAD_UNSAFE_OK
 #   MKLINT= no
-# .else
-    CPPFLAGS+=-DPNG_NO_MMX_CODE
 # .endif
 
-CLEANFILES+=pngtest.o pngtest
+CLEANFILES+=pngtest.o pngtest pnglibconf.h
+
+.c.o:
+       $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
+
+pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
+       cp $(PNGLIBCONF_H_PREBUILT) $@
 
 pngtest.o:     pngtest.c
        ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}