summaryrefslogtreecommitdiffstats
path: root/vector/makefile
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2018-12-09 19:21:06 +0100
committerNao Pross <naopross@thearcway.org>2018-12-09 19:21:06 +0100
commit997ceb15e2b088f7aa8710970d02d658d1844d3f (patch)
treeb1e0e9d50865464fc9ba5199c5ac4598d5cffebe /vector/makefile
parentAdd overly complicated templated operator overloading example (diff)
downloadcplusplus-997ceb15e2b088f7aa8710970d02d658d1844d3f.tar.gz
cplusplus-997ceb15e2b088f7aa8710970d02d658d1844d3f.zip
Add C 3d vector library example
Diffstat (limited to '')
-rw-r--r--vector/makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/vector/makefile b/vector/makefile
new file mode 100644
index 0000000..6ce8fd9
--- /dev/null
+++ b/vector/makefile
@@ -0,0 +1,18 @@
+CARGS := -Wall -Werror -I.
+CPPARGS := -Wall -Werror -I.
+
+all: cpp-vector.pdf c_build/vectors
+
+%.pdf: %.md
+ pandoc \
+ --latex-engine=xelatex \
+ --filter pandoc-include-code \
+ $< -o $@
+
+c_build/%: %.c
+ mkdir -p c_build
+ gcc $(CARGS) $< -o $@
+
+cpp_build/%: %.cpp
+ mkdir -p cpp_build
+ g++ $(CPPARGS) $< -o $@