Explorar el Código

Switch CFLAGS based on DBUG value.

scossu hace 2 semanas
padre
commit
b65a6be645
Se han modificado 1 ficheros con 7 adiciones y 1 borrados
  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)