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

CPPC    := g++
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
	$(CC) $(CARGS) $< -o $@ $(LDARGS)

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