[cairo-commit] cairo-demo/PS Makefile,1.3,1.4

Carl Worth commit at pdx.freedesktop.org
Mon Feb 21 12:32:19 PST 2005

Committed by: cworth

Update of /cvs/cairo/cairo-demo/PS
In directory gabe:/tmp/cvs-serv25375/PS

Modified Files:
Log Message:

        * PS/Makefile:
        * X11/Makefile:
        * gtkcairo_slide/Makefile:
        * png/Makefile: Try to be kinder for portability by not including
        gcc-specific wanring options in the Makefile. The options really
        are handy, so we provide an example in the Makefile for how users
        who want them can get at them.

Index: Makefile
RCS file: /cvs/cairo/cairo-demo/PS/Makefile,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Makefile	31 Aug 2004 19:39:31 -0000	1.3
+++ Makefile	21 Feb 2005 20:32:17 -0000	1.4
@@ -1,11 +1,24 @@
-CFLAGS+=-g -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls `pkg-config --cflags cairo libpng`
-LDFLAGS+=`pkg-config --libs cairo libpng`
+# I'd like to put a bunch of compiler-specific warning flags here, but
+# I don't know a good way to choose the right flags based on the
+# compiler in use.
+# So, for now, if you want more warnings, set them in CFLAGS before
+# calling make. For example, for gcc:
+# CFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing" make
+MYCFLAGS=`pkg-config --cflags cairo libpng`
+MYLDFLAGS=`pkg-config --libs cairo libpng`
 all: ${EXAMPLES}
-${EXAMPLES}: write_png.o
+%.o: %.c
+	$(CC) -c $(CFLAGS) $(CPPFLAGS) ${MYCFLAGS} $< -o $@
+%: %.c write_png.o
 write_png.o: write_png.c write_png.h

More information about the cairo-commit mailing list