-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (25 loc) · 701 Bytes
/
Copy pathMakefile
File metadata and controls
36 lines (25 loc) · 701 Bytes
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
26
27
28
29
30
31
32
33
34
35
36
CC = clang
CFLAGS = -Wall -Wextra -Werror -Wpedantic -O2 -march=nehalem -I.
LFLAGS =
OBJS=src/bv.o src/field.o src/grass.o
all: grass asgn8.pdf
grass: $(OBJS)
$(CC) $(LDFLAGS) -o grass $(OBJS)
asgn8.pdf: asgn8.tex
pdflatex asgn8.tex
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
tidy_objects:
$(RM) $(OBJS)
tidy_latex:
$(RM) asgn8.aux asgn8.listing asgn8.log asgn8.out
tidy: tidy_objects tidy_latex
clean: tidy
$(RM) grass asgn8.pdf
# --use-cc=clang allows it to run without GCC installed per @242 on Piazza
scan-build: clean
scan-build --use-cc=clang make
# suggested by tutor Eric
format:
clang-format -i -style=file *.[ch]
.PHONY: all clean scan-build format tidy tidy_objects tidy_latex