-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (22 loc) · 1.08 KB
/
Makefile
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
CC=clang
COMMON= -Wall -Wextra -Wfloat-equal -Wpedantic -Wvla -std=c99 -Werror
DEBUG= -g3
SANITIZE= $(COMMON) -fsanitize=undefined -fsanitize=address $(DEBUG)
VALGRIND= $(COMMON) $(DEBUG)
GENERAL= ./General
PRODUCTION= $(COMMON) -O3
LDLIBS =
all: testlinked_s testlinked_v testlinked
testlinked_s: lisp.h Linked/specific.h Linked/linked.c testlisp.c $(GENERAL)/general.h $(GENERAL)/general.c
$(CC) testlisp.c Linked/linked.c $(GENERAL)/general.c -o testlinked_s -I./Linked -I./$(GENERAL) $(SANITIZE) $(LDLIBS)
testlinked_v: lisp.h Linked/specific.h Linked/linked.c testlisp.c $(GENERAL)/general.h $(GENERAL)/general.c
$(CC) testlisp.c Linked/linked.c $(GENERAL)/general.c -o testlinked_v -I./Linked -I./$(GENERAL) $(VALGRIND) $(LDLIBS)
testlinked: lisp.h Linked/specific.h Linked/linked.c testlisp.c $(GENERAL)/general.h $(GENERAL)/general.c
$(CC) testlisp.c Linked/linked.c $(GENERAL)/general.c -o testlinked -I./Linked -I./$(GENERAL) $(PRODUCTION) $(LDLIBS)
clean:
rm -f testlinked_s testlinked_v testlinked
run: all
./testlinked_s
valgrind ./testlinked_v
run_no_val: all
./testlinked_s