aboutsummaryrefslogtreecommitdiff
path: root/ReapperRun/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'ReapperRun/Makefile')
-rw-r--r--ReapperRun/Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/ReapperRun/Makefile b/ReapperRun/Makefile
new file mode 100644
index 0000000..8007624
--- /dev/null
+++ b/ReapperRun/Makefile
@@ -0,0 +1,26 @@
+.POSIX:
+CFLAGS += -std=c99
+CFLAGS += -Wall
+
+release: main
+
+all: main test
+
+t:
+ make all LDFLAGS="-fsanitize=address $(LDFLAGS)" CFLAGS+="-fsanitize=address -O0 -g3 -rdynamic $(CFLAGS)"
+ ./main ./test
+
+main: main.o
+ $(CC) $(LDFLAGS) $(LDLIBS) $^ -o $@
+
+main.o: main.c
+ $(CC) $(CFLAGS) -o $@ -c $<
+
+test: test.o
+ $(CC) $(LDFLAGS) $(LDLIBS) $^ -o $@
+
+test.o: main.c
+ $(CC) $(CFLAGS) -o $@ -DTEST -c $<
+
+clean:
+ rm -rf main main.o test test.o