aboutsummaryrefslogtreecommitdiff
path: root/2022/01/Makefile
diff options
context:
space:
mode:
authorMarvin Borner2022-12-01 12:25:41 +0100
committerMarvin Borner2022-12-01 12:25:41 +0100
commit7bdd889035089706c4c3219f29941501af0259b6 (patch)
treeda5ff97a5447e929f56909a856a9beb2d6be5a09 /2022/01/Makefile
parent7dc8aaa7f8e17a74c0b0c59690ac9737395452d8 (diff)
c how fast
Diffstat (limited to '2022/01/Makefile')
-rw-r--r--2022/01/Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/2022/01/Makefile b/2022/01/Makefile
new file mode 100644
index 0000000..49ca4e1
--- /dev/null
+++ b/2022/01/Makefile
@@ -0,0 +1,19 @@
+DEBUG = -Wno-error -Og -g -fsanitize=undefined -fsanitize=address -fstack-protector-all
+CFLAGS = -Wall -Wextra -Werror -Wshadow -Wpointer-arith -Wwrite-strings -Wredundant-decls -Wnested-externs -Wformat=2 -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wswitch-default -Wswitch-enum -Wunreachable-code -Wundef -Wold-style-definition -Wvla -pedantic-errors -Ofast
+
+# Not the best makefile but idc
+
+debug:
+ @gcc $(CFLAGS) $(DEBUG) solve.c -o solve.o
+
+build:
+ @gcc $(CFLAGS) solve.c -o solve.o
+
+clean:
+ @rm -f *.o
+
+run: debug
+ @./solve.o
+
+time: build
+ @./solve.o