X-Git-Url: https://git.ao2.it/visomat-utils.git/blobdiff_plain/ec6cf524733f65ff40ac2e086e96e0dfd38e1dda..89ec9734ef0716e4b46cd33bc10434c677d860a6:/src/Makefile diff --git a/src/Makefile b/src/Makefile index 371a75c..79105ea 100644 --- a/src/Makefile +++ b/src/Makefile @@ -23,13 +23,22 @@ CFLAGS += -fno-common \ -Wswitch-enum \ -Wundef \ -Wunreachable-code \ - -Wunsafe-loop-optimizations \ - -Wunused-but-set-variable \ -Wwrite-strings \ -Wp,-D_FORTIFY_SOURCE=2 \ -fstack-protector \ --param=ssp-buffer-size=4 +ifneq ($(CC),clang) + CFLAGS += -Wunsafe-loop-optimizations -Wunused-but-set-variable +endif + +ifeq ($(DEBUG),1) + CFLAGS += -DDEBUG +endif + +# for getopt +CFLAGS += -D_POSIX_C_SOURCE=2 + CFLAGS += $(shell pkg-config --cflags libusb-1.0) LDLIBS := $(shell pkg-config --libs libusb-1.0)