mirror of
https://github.com/nlohmann/json.git
synced 2025-05-11 13:43:57 +00:00
26 lines
488 B
Makefile
26 lines
488 B
Makefile
SRCDIR = ../../src
|
|
|
|
EXAMPLES = $(wildcard *.cpp)
|
|
|
|
all:
|
|
@echo "check"
|
|
@echo "create"
|
|
|
|
clean:
|
|
rm -f $(EXAMPLES:.cpp=) $(EXAMPLES:.cpp=.output) $(EXAMPLES:.cpp=.test)
|
|
|
|
%.output: %.cpp
|
|
make $(<:.cpp=) CPPFLAGS="-I $(SRCDIR)" CXXFLAGS="-std=c++11"
|
|
./$(<:.cpp=) > $@
|
|
rm $(<:.cpp=)
|
|
|
|
%.test: %.cpp
|
|
make $(<:.cpp=) CPPFLAGS="-I $(SRCDIR)" CXXFLAGS="-std=c++11"
|
|
./$(<:.cpp=) > $@
|
|
diff $@ $(<:.cpp=.output)
|
|
rm $(<:.cpp=) $@
|
|
|
|
create: $(EXAMPLES:.cpp=.output)
|
|
|
|
check: $(EXAMPLES:.cpp=.test)
|