]> gitweb.michael.orlitzky.com - libsvgtiny.git/blob - makefile
Implement svgtiny_free() and fix memory usage.
[libsvgtiny.git] / makefile
1 #
2 # This file is part of Libsvgtiny
3 # Licensed under the MIT License,
4 # http://opensource.org/licenses/mit-license.php
5 # Copyright 2008 James Bursa <james@semichrome.net>
6 #
7
8 SOURCE = svgtiny.c colors.c
9 HDRS = svgtiny.h
10
11 .PHONY: all install clean
12
13 CFLAGS = -std=c99 -g -W -Wall -Wundef -Wpointer-arith -Wcast-qual \
14 -Wcast-align -Wwrite-strings -Wstrict-prototypes \
15 -Wmissing-prototypes -Wmissing-declarations \
16 -Wnested-externs -Winline -Wno-cast-align \
17 `xml2-config --cflags`
18 LIBS = `xml2-config --libs`
19 ARFLAGS = cr
20
21 OBJS = $(SOURCE:.c=.o)
22
23 all: libsvgtiny.a svgtiny_test$(EXEEXT)
24
25 libsvgtiny.a: $(OBJS)
26 $(AR) $(ARFLAGS) $@ $(OBJS)
27
28 svgtiny_test$(EXEEXT): svgtiny_test.c libsvgtiny.a
29 $(CC) $(CFLAGS) $(LIBS) -o $@ $^
30
31 clean:
32 -rm *.o libsvgtiny.a svgtiny_test$(EXEEXT) colors.c
33
34 colors.c: colors.gperf
35 gperf --output-file=$@ $<
36
37 .c.o: $(HDRS)
38 $(CC) $(CFLAGS) -c -o $@ $<