[cairo-commit] cairo-demo/X11 Makefile,1.4,1.5

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

Committed by: cworth

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

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/X11/Makefile,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Makefile	28 Oct 2004 19:42:26 -0000	1.4
+++ Makefile	21 Feb 2005 20:32:17 -0000	1.5
@@ -1,10 +1,25 @@
-CFLAGS+=-g -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls `pkg-config --cflags cairo`
-LDFLAGS+=`pkg-config --libs cairo`
 PROGS=cairo-demo cairo-spline cairo-knockout
+# 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`
+MYLDFLAGS=`pkg-config --libs cairo`
 all: $(PROGS)
+%.o: %.c
+	$(CC) -c $(CFLAGS) $(CPPFLAGS) ${MYCFLAGS} $< -o $@
+%: %.c
 	rm -f $(PROGS) *.o

More information about the cairo-commit mailing list