summary refs log tree commit diff stats
path: root/c/acronym/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'c/acronym/makefile')
-rw-r--r--c/acronym/makefile37
1 files changed, 37 insertions, 0 deletions
diff --git a/c/acronym/makefile b/c/acronym/makefile
new file mode 100644
index 0000000..f34535a
--- /dev/null
+++ b/c/acronym/makefile
@@ -0,0 +1,37 @@
+### If you wish to use extra libraries (math.h for instance),
+### add their flags here (-lm in our case) in the "LIBS" variable.
+
+LIBS = -lm
+
+###
+CFLAGS  = -std=c99
+CFLAGS += -g
+CFLAGS += -Wall
+CFLAGS += -Wextra
+CFLAGS += -pedantic
+CFLAGS += -Werror
+CFLAGS += -Wmissing-declarations
+CFLAGS += -DUNITY_SUPPORT_64
+
+ASANFLAGS  = -fsanitize=address
+ASANFLAGS += -fno-common
+ASANFLAGS += -fno-omit-frame-pointer
+
+.PHONY: test
+test: tests.out
+	@./tests.out
+
+.PHONY: memcheck
+memcheck: test/*.c src/*.c src/*.h
+	@echo Compiling $@
+	@$(CC) $(ASANFLAGS) $(CFLAGS) src/*.c test/vendor/unity.c test/*.c -o memcheck.out $(LIBS)
+	@./memcheck.out
+	@echo "Memory check passed"
+
+.PHONY: clean
+clean:
+	rm -rf *.o *.out *.out.dSYM
+
+tests.out: test/*.c src/*.c src/*.h
+	@echo Compiling $@
+	@$(CC) $(CFLAGS) src/*.c test/vendor/unity.c test/*.c -o tests.out $(LIBS)
26ed875b8ede4'>dc92d375 ^
565247df ^
5b14517a ^
cceb5d67 ^

912e26b4 ^
db2d4b1c ^
14adeb9c ^
dc92d375 ^
4d814e1e ^
8263cbac ^
dc92d375 ^
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