aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorHristo Venev <hristo@venev.name>2021-07-23 16:51:04 +0300
committerHristo Venev <hristo@venev.name>2021-08-08 18:30:49 +0300
commit8c89da4825322660a912b717ba83326151e0866e (patch)
tree7dcb3a6fc56da030aaf2d0087c6b4857d989a994 /Makefile
Initial commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile40
1 files changed, 40 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..638e08d
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,40 @@
+CFLAGS_dev:= \
+ -std=gnu17 -Wall -Wextra \
+ -Werror=conversion \
+ -Werror=sign-conversion \
+ -Werror=float-conversion \
+ -Werror=old-style-definition \
+ -Werror=strict-prototypes \
+ -Werror=missing-prototypes \
+ -Werror=implicit-function-declaration \
+ -Werror=missing-declarations \
+ -Werror=return-type \
+ -Werror=pointer-arith \
+ -Werror=vla \
+ -Werror=incompatible-pointer-types \
+ -Werror=int-conversion \
+ -Werror=int-conversion \
+ -Werror=format=2 \
+ -Werror=overflow \
+ -Werror=shift-count-overflow \
+ -Werror=init-self \
+ -Werror=shadow \
+ -Werror=redundant-decls \
+ -Werror=missing-field-initializers \
+ -Werror=write-strings \
+ -Werror=date-time \
+ -Werror=nested-externs \
+ -Werror=endif-labels \
+ -Werror=undef \
+ -Wmissing-include-dirs \
+ -Wfloat-equal \
+ -Winline \
+ -Wmissing-noreturn \
+ -Werror=implicit-fallthrough \
+ -Werror=shift-overflow
+
+CC?=gcc
+CFLAGS?=-O2 -flto -ggdb
+
+pgbak: pgbak.c
+ $(CC) $(CFLAGS_dev) $(CFLAGS) $< -o $@