mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-28 06:20:12 +01:00
Look for the headers in -I./include. Make the circle track the width and height of the window dynamically. Remove boring expander example. Add more interesting LCA exmaple. Add some notes about how to use this stuff.
31 lines
1.1 KiB
Makefile
31 lines
1.1 KiB
Makefile
MYCFLAGS=-I./include $(shell pkg-config --cflags --libs cairo gtk+-2.0) -Wall -g -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing
|
|
|
|
# If you don't want to/can't compile all of these targets, then trim
|
|
# this list.
|
|
# all: gtk xlib pdf png
|
|
all: gtk xlib png
|
|
|
|
GTK_EXAMPLES=$(patsubst %.c,%-gtk,$(wildcard *.c))
|
|
gtk: $(GTK_EXAMPLES)
|
|
%-gtk:%.c ./include/cairo-tutorial-gtk.h
|
|
$(CC) -DCAIRO_TUTORIAL_GTK $(CFLAGS) $(MYCFLAGS) -o $@ $<
|
|
|
|
XLIB_EXAMPLES=$(patsubst %.c,%-xlib,$(wildcard *.c))
|
|
xlib: $(XLIB_EXAMPLES)
|
|
%-xlib:%.c ./include/cairo-tutorial-xlib.h
|
|
$(CC) -DCAIRO_TUTORIAL_XLIB $(CFLAGS) $(MYCFLAGS) -o $@ $<
|
|
|
|
PDF_EXAMPLES=$(patsubst %.c,%-pdf,$(wildcard *.c))
|
|
pdf: $(PDF_EXAMPLES)
|
|
%-pdf:%.c ./include/cairo-tutorial-pdf.h
|
|
$(CC) -DCAIRO_TUTORIAL_PDF $(CFLAGS) $(MYCFLAGS) -o $@ $<
|
|
|
|
PNG_EXAMPLES=$(patsubst %.c,%-png,$(wildcard *.c))
|
|
png: $(PNG_EXAMPLES)
|
|
%-png:%.c ./include/cairo-tutorial-png.h
|
|
$(CC) -DCAIRO_TUTORIAL_PNG $(CFLAGS) $(MYCFLAGS) -o $@ $<
|
|
|
|
clean:
|
|
rm -f $(GTK_EXAMPLES) $(XLIB_EXAMPLES) $(PDF_EXAMPLES) $(PNG_EXAMPLES) *.png
|
|
|
|
.PHONY: all gtk xlib pdf png clean
|