summaryrefslogtreecommitdiff
path: root/tests/Makefile.travis
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Makefile.travis')
-rw-r--r--tests/Makefile.travis24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/Makefile.travis b/tests/Makefile.travis
new file mode 100644
index 0000000..02f22e7
--- /dev/null
+++ b/tests/Makefile.travis
@@ -0,0 +1,24 @@
+CXXFLAGS=-c -Wall -Wextra -Werror -pedantic
+
+BUILD=build/travis
+
+SOURCES=src/pugixml.cpp $(wildcard tests/*.cpp)
+OBJECTS=$(SOURCES:%=$(BUILD)/%.o)
+EXECUTABLE=$(BUILD)/test
+
+all: $(EXECUTABLE)
+
+test: $(EXECUTABLE)
+ ./$(EXECUTABLE)
+
+$(EXECUTABLE): $(OBJECTS)
+ $(CXX) $(OBJECTS) $(LDFLAGS) -o $@
+
+$(BUILD)/%.cpp.o: %.cpp
+ mkdir -p $(dir $@)
+ $(CXX) $(CXXFLAGS) $< -o $@
+
+clean:
+ rm -rf $(BUILD)
+
+.PHONY: all test clean \ No newline at end of file