summaryrefslogtreecommitdiff
path: root/css/Makefile
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-11-28 17:17:45 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-11-28 17:17:45 +0000
commitbaf8100d9bc88fc579035d603363d8a3c78672ae (patch)
treef4fd44ff82f535b232db2f92460047c846229c55 /css/Makefile
parent7c65316f44f7a7073f1c43630844f6b14a61ed12 (diff)
downloadnetsurf-baf8100d9bc88fc579035d603363d8a3c78672ae.tar.gz
netsurf-baf8100d9bc88fc579035d603363d8a3c78672ae.tar.bz2
Extract test code from css.c into a separate source file.
Modify test driver to take stylesheet filename on the command line. Makefile to build a library from the css parser sources and link the test driver against it. svn path=/trunk/netsurf/; revision=5812
Diffstat (limited to 'css/Makefile')
-rw-r--r--css/Makefile39
1 files changed, 39 insertions, 0 deletions
diff --git a/css/Makefile b/css/Makefile
new file mode 100644
index 000000000..7e4727daa
--- /dev/null
+++ b/css/Makefile
@@ -0,0 +1,39 @@
+# Makefile for CSS test code
+
+AR := ar
+CC := gcc
+LD := gcc
+
+CFLAGS := -O2 -I.. -I/usr/include/libxml2 -std=c99
+LDFLAGS := -lxml2 -lz -lcurl
+
+LIBOBJS := css.o css_enum.o parser.o ruleset.o scanner.o \
+ messages.o hashtable.o talloc.o url.o utils.o
+
+test: lib testcss.o
+ $(LD) -o $@ testcss.o $(LDFLAGS) -L. -lcss
+
+lib: $(LIBOBJS)
+ $(AR) -cru libcss.a $^
+
+clean:
+ $(RM) $(LIBOBJS) testcss.o test libcss.a
+
+messages.o: ../utils/messages.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+hashtable.o: ../utils/hashtable.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+talloc.o: ../utils/talloc.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+url.o: ../utils/url.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+utils.o: ../utils/utils.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+%.o : %.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+