aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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 $@