json/test/Makefile

22 lines
888 B
Makefile
Raw Normal View History

2016-08-04 05:24:46 +00:00
##########################################################################
# unit tests
##########################################################################
# additional flags
CXXFLAGS += -std=c++11 -Wall -Wextra -pedantic -Weffc++ -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-declarations -Wmissing-include-dirs -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-overflow=5 -Wswitch -Wundef -Wno-unused -Wnon-virtual-dtor -Wreorder -Wdeprecated -Wfloat-equal
2016-08-04 05:33:44 +00:00
CPPFLAGS += -I ../src -I .
2016-08-04 05:24:46 +00:00
SOURCES = src/unit-runner.cpp src/unit.cpp
OBJECTS = $(SOURCES:.cpp=.o)
all: json_unit
json_unit: $(OBJECTS) ../src/json.hpp src/catch.hpp
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) -o $@
%.o: %.cpp
2016-08-04 05:33:44 +00:00
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
2016-08-04 05:24:46 +00:00
clean:
rm -fr json_unit $(OBJECTS)