2018-02-02 05:20:26 +08:00
|
|
|
SRCDIR = ../single_include
|
2015-07-08 22:55:29 +08:00
|
|
|
|
2021-12-29 20:41:01 +08:00
|
|
|
all: create_output
|
2015-06-22 03:24:03 +08:00
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
# example files
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
# where are the example cpp files
|
|
|
|
EXAMPLES = $(wildcard examples/*.cpp)
|
|
|
|
|
|
|
|
# create output from a stand-alone example file
|
|
|
|
%.output: %.cpp
|
|
|
|
make $(<:.cpp=) CPPFLAGS="-I $(SRCDIR)" CXXFLAGS="-std=c++11"
|
|
|
|
./$(<:.cpp=) > $@
|
|
|
|
rm $(<:.cpp=)
|
|
|
|
|
|
|
|
# compare created output with current output of the example files
|
|
|
|
%.test: %.cpp
|
|
|
|
make $(<:.cpp=) CPPFLAGS="-I $(SRCDIR)" CXXFLAGS="-std=c++11"
|
|
|
|
./$(<:.cpp=) > $@
|
|
|
|
diff $@ $(<:.cpp=.output)
|
|
|
|
rm $(<:.cpp=) $@
|
|
|
|
|
|
|
|
# create output from all stand-alone example files
|
|
|
|
create_output: $(EXAMPLES:.cpp=.output)
|
|
|
|
|
|
|
|
# check output of all stand-alone example files
|
|
|
|
check_output: $(EXAMPLES:.cpp=.test)
|
|
|
|
|
2016-05-29 20:06:43 +08:00
|
|
|
clean:
|
2021-12-29 20:41:01 +08:00
|
|
|
rm -fr $(EXAMPLES:.cpp=)
|
2020-08-13 16:52:20 +08:00
|
|
|
$(MAKE) clean -C docset
|
|
|
|
$(MAKE) clean -C mkdocs
|