Imported Upstream version 1.6.13
[platform/upstream/libpng.git] / contrib / gregbook / Makefile.unx
index 7ff65bf..1a73e03 100644 (file)
 # macros --------------------------------------------------------------------
 
 #PNGDIR = /usr/local/lib
-#PNGINC = -I/usr/local/include/libpng12
-#PNGLIBd = -L$(PNGDIR) -lpng12 # dynamically linked, installed libpng
-#PNGLIBs = $(PNGDIR)/libpng12.a # statically linked, installed libpng
+#PNGINC = -I/usr/local/include/libpng16
+#PNGLIBd = -L$(PNGDIR) -lpng16 # dynamically linked, installed libpng
+#PNGLIBs = $(PNGDIR)/libpng16.a # statically linked, installed libpng
 # or:
 PNGDIR = ../..#        this one is for libpng-x.y.z/contrib/gregbook builds
 #PNGDIR = ../libpng
 PNGINC = -I$(PNGDIR)
-PNGLIBd = -Wl,-rpath,$(PNGDIR) -L$(PNGDIR) -lpng12     # dynamically linked
+PNGLIBd = -Wl,-rpath,$(PNGDIR) -L$(PNGDIR) -lpng16     # dynamically linked
 PNGLIBs = $(PNGDIR)/libpng.a           # statically linked, local libpng
 
 ZDIR = /usr/local/lib
@@ -59,14 +59,16 @@ INCS = $(PNGINC) $(ZINC) $(XINC)
 RLIBSd = $(PNGLIBd) $(ZLIBd) $(XLIB) -lm
 RLIBSs = $(PNGLIBs) $(ZLIBs) $(XLIB) -lm
 WLIBSd = $(PNGLIBd) $(ZLIBd) -lm
-WLIBSs = $(PNGLIBs) $(ZLIBs)
+WLIBSs = $(PNGLIBs) $(ZLIBs) -lm
 
 CC = gcc
 LD = gcc
 RM = rm -f
-CFLAGS = -O -Wall $(INCS) -DFEATURE_LOOP
+CPPFLAGS = $(INCS) -DFEATURE_LOOP
+CFLAGS = -O -Wall
+#CFLAGS = -O -W -Wall -Wextra -pedantic -ansi
 # [note that -Wall is a gcc-specific compilation flag ("most warnings on")]
-# [-ansi, -pedantic and -W can also be used]
+# [-ansi, -pedantic, -Wextra, and -W can also be used]
 LDFLAGS =
 O = .o
 E =
@@ -92,7 +94,7 @@ EXES = $(STATIC_EXES) $(DYNAMIC_EXES)
 # implicit make rules -------------------------------------------------------
 
 .c$(O):
-       $(CC) -c $(CFLAGS) $<
+       $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
 
 
 # dependencies --------------------------------------------------------------