summaryrefslogtreecommitdiffstats
path: root/vector/makefile
blob: ad56656dcc6476419a92798b341ca4145696b006 (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 -Werror -I.

all: vector.pdf c_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 $@