summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-03-13 08:12:46 -0700
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-03-13 08:12:46 -0700
commit6457f0941204a79ec5ba359a12aa00bf06f0e621 (patch)
treed3cde590a04fafb28e4e24c0d77f0289a1c80550 /Makefile
parent50822aa2ac07175a96e65324627d5e31877ac40a (diff)
parent15fba1debca5498989048677ffda38758b2df984 (diff)
Merge branch 'master' into compact
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 897bcbb..b50ff69 100644
--- a/Makefile
+++ b/Makefile
@@ -3,10 +3,10 @@ defines=standard
BUILD=build/make-$(CXX)-$(config)-$(defines)
-SOURCES=src/pugixml.cpp $(wildcard tests/*.cpp)
+SOURCES=src/pugixml.cpp tests/main.cpp tests/allocator.cpp tests/test.cpp tests/writer_string.cpp $(wildcard tests/test_*.cpp)
EXECUTABLE=$(BUILD)/test
-CXXFLAGS=-c -g -Wall -Wextra -Werror -pedantic
+CXXFLAGS=-g -Wall -Wextra -Werror -pedantic
LDFLAGS=
ifeq ($(config),release)
@@ -39,6 +39,11 @@ test: $(EXECUTABLE)
./$(EXECUTABLE)
endif
+fuzz:
+ @mkdir -p $(BUILD)
+ $(AFL)/afl-clang++ tests/fuzz_parse.cpp tests/allocator.cpp src/pugixml.cpp $(CXXFLAGS) -o $(BUILD)/fuzz_parse
+ $(AFL)/afl-fuzz -i tests/data_fuzz_parse -o $(BUILD)/fuzz_parse_out -x $(AFL)/testcases/_extras/xml/ -- $(BUILD)/fuzz_parse @@
+
clean:
rm -rf $(BUILD)
@@ -47,7 +52,7 @@ $(EXECUTABLE): $(OBJECTS)
$(BUILD)/%.o: %
@mkdir -p $(dir $@)
- $(CXX) $< $(CXXFLAGS) -MMD -MP -o $@
+ $(CXX) $< $(CXXFLAGS) -c -MMD -MP -o $@
-include $(OBJECTS:.o=.d)