summaryrefslogtreecommitdiffstats
path: root/vector/makefile
blob: d504a716116c350d23b2ee105cbb971a982a9870 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
CARGS   := -Wall -Werror -I.
LDARGS  := -lm
CPPARGS := -Wall -I.

all: vector.pdf c_build/vector cpp_build/vector

%.pdf: %.md
	pandoc \
        --from=markdown+raw_tex \
		--latex-engine=xelatex \
        --number-sections \
		--filter pandoc-include-code \
        --highlight-style tango \
		$< -o $@

c_build/%: %.c
	mkdir -p c_build
	gcc $(CARGS) $< -o $@ $(LDARGS)

cpp_build/%: %.cpp
	mkdir -p cpp_build
	g++ $(CPPARGS) $< -o $@