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 $@