From baf8100d9bc88fc579035d603363d8a3c78672ae Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Fri, 28 Nov 2008 17:17:45 +0000 Subject: 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 --- css/Makefile | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 css/Makefile (limited to 'css/Makefile') 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 $@ $< + -- cgit v1.2.3