]> gitweb.michael.orlitzky.com - libsvgtiny.git/blob - examples/GNUmakefile
examples/GNUmakefile: add a GNUmakefile for the example program
[libsvgtiny.git] / examples / GNUmakefile
1 CC ?= cc
2
3 # Handle libsvgtiny flags and libs separately in case it's missing. If
4 # you're building against a local (non-system) libsvgtiny, then the
5 # absence of its pkg-config file should not be a fatal error.
6 SVGTINY_CPPFLAGS := $(shell pkg-config --silence-errors --cflags libsvgtiny)
7 OTHER_CPPFLAGS := $(shell pkg-config --cflags cairo x11)
8 CPPFLAGS += $(SVGTINY_CPPFLAGS) $(OTHER_CPPFLAGS)
9
10 SVGTINY_LIBS := $(shell pkg-config --silence-errors --libs libsvgtiny)
11 OTHER_LIBS := $(shell pkg-config --libs cairo x11) -lm
12 LIBS += $(SVGTINY_LIBS) $(OTHER_LIBS)
13
14 all: svgtiny_display_x11
15 .c:
16 $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
17
18 .PHONY : clean
19 clean:
20 rm -f svgtiny_display_x11