Browse Source

Switch CFLAGS based on DBUG value.

scossu 2 weeks ago
parent
commit
b65a6be645
1 changed files with 7 additions and 1 deletions
  1. 7 1
      Makefile

+ 7 - 1
Makefile

@@ -13,7 +13,13 @@ VOLK_LIBDIR = $(VOLK_ROOT)/build
 
 INCLUDE = -I$(PREFIX)/include
 VOLK_INCLUDE = -I$(VOLK_ROOT)/include
-CFLAGS = -shared -DDEBUG -Og -ggdb -Wall -fPIC
+CFLAGS = -shared -Wall -Wextra -fPIC
+ifneq ($(DEBUG), 0)
+CFLAGS += -DDEBUG -Og -ggdb
+else
+CFLAGS += -DNDEBUG -O3 -g0
+endif
+
 LDFLAGS = -L$(PREFIX)/lib -L$(VOLK_LIBDIR) -llua -llmdb -lxxhash -luuid
 
 LUAC_SRC = $(wildcard src/*.c)