summaryrefslogtreecommitdiff
path: root/test/Makefile
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2007-09-22 13:32:42 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2007-09-22 13:32:42 +0000
commitf1f80696ebe87520de0c857371e0ca109fce68cb (patch)
tree66b241e6ef7384e9bed2b57b11c5d8f075601b12 /test/Makefile
parentdac9bafa302a42ef8e58fa017739cc29a046413f (diff)
downloadlibdom-f1f80696ebe87520de0c857371e0ca109fce68cb.tar.gz
libdom-f1f80696ebe87520de0c857371e0ca109fce68cb.tar.bz2
Create a library of utility functions for the testsuite to use
Make test/binding.c include stdio.h itself rather than relying on other things to include it. svn path=/trunk/dom/; revision=3568
Diffstat (limited to 'test/Makefile')
-rw-r--r--test/Makefile18
1 files changed, 14 insertions, 4 deletions
diff --git a/test/Makefile b/test/Makefile
index fd17232..d298648 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -22,6 +22,9 @@
CFLAGS += -I${TOP}/src/ -I${TOP}/bindings/xml/ -I$(CURDIR)
LDFLAGS += `${PKGCONFIG} ${PKGCONFIGFLAGS} --libs libxml-2.0`
+# Libraries we link against
+LIBS = -L./lib -ldebug -ldom-libxml-debug -ldom-debug
+
# Release output
RELEASE =
@@ -39,14 +42,17 @@ XMLOBJS = $(addprefix xml/bin/, $(notdir $(XMLFILES:.xml=)))
OTHEROBJS = binding
OBJS = $(OTHEROBJS) $(XMLOBJS)
-.PHONY: clean debug export release setup test
+.PHONY: clean debug export release setup test transform
# Targets
release:
+ @${MAKE} -C lib release
debug:
+ @${MAKE} -C lib debug
clean:
+ @${MAKE} -C lib clean
ifneq (${OBJS}, )
-@${RM} ${RMFLAGS} $(addsuffix ${EXEEXT}, $(OTHEROBJS))
-@${RM} ${RMFLAGS} -r xml/c/
@@ -54,15 +60,18 @@ ifneq (${OBJS}, )
endif
distclean:
+ @${MAKE} -C lib distclean
-@${RM} ${RMFLAGS} log
setup:
+ @${MAKE} -C lib setup
@${MKDIR} ${MKDIRFLAGS} $(CURDIR)/xml/c
@${MKDIR} ${MKDIRFLAGS} $(CURDIR)/xml/bin
export:
+ @${MAKE} -C lib export
-test: $(OBJS)
+test: release debug $(OBJS)
@${PERL} testrunner.pl ${EXEEXT}
transform: $(CFILES)
@@ -71,7 +80,7 @@ transform: $(CFILES)
xml/bin/%: xml/c/%.c
@${ECHO} ${ECHOFLAGS} "==> $<"
@${CC} -c -g ${CFLAGS} -o $@.o $<
- @${LD} -g -o $@ $@.o ${LDFLAGS} -ldom-libxml-debug -ldom-debug
+ @${LD} -g -o $@ $@.o ${LDFLAGS} $(LIBS)
@${RM} ${RMFLAGS} $@.o
xml/c/%.c: xml/tests/%.xml
@@ -80,5 +89,6 @@ xml/c/%.c: xml/tests/%.xml
%: %.c
@${ECHO} ${ECHOFLAGS} "==> $<"
@${CC} -c -g ${CFLAGS} -o $@.o $<
- @${LD} -g -o $@ $@.o ${LDFLAGS} -ldom-libxml-debug -ldom-debug
+ @${LD} -g -o $@ $@.o ${LDFLAGS} $(LIBS)
@${RM} ${RMFLAGS} $@.o
+