summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 10 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 95e8d9a..aa9ed13 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,17 @@
+CC=clang
+CFLAGS=-Wfatal-errors -Wall -Werror -Wextra -g -O2
+CFLAGS_TESTBIN=-Wfatal-errors -Wall -Werror -Wextra -g -fsanitize=address
+TARGET=7ed
+TESTTARGET=7ed-TESTING
+
all: 7ed
7ed:
- gcc -Wfatal-errors -Wall -Werror -Wextra -g -O3 7ed.c functions.c startmode.c editmode.c -o 7ed
+ $(CC) $(CFLAGS) 7ed.c functions.c startmode.c editmode.c -o $(TARGET)
clean:
- rm -f 7ed
- rm -f test/7ed-TESTING
+ rm -f $(TARGET)
+ rm -f test/$(TESTTARGET)
tests:
- gcc -Wfatal-errors -Wall -Werror -Wextra -g -fsanitize=address 7ed.c functions.c startmode.c editmode.c -o test/7ed-TESTING
+ $(CC) $(CFLAGS_TESTBIN) 7ed.c functions.c startmode.c editmode.c -o test/$(TESTTARGET)