Browse Source

Add DEBUG or RELEASE build option

JNI-98
heck 5 years ago
parent
commit
b62446db0e
  1. 12
      Makefile.conf
  2. 2
      local.conf.example

12
Makefile.conf

@ -12,7 +12,7 @@ ifeq ($(PLATFORM),linux)
endif
######### C and C++ #########
CXXFLAGS+=-g -O0 -std=c++11
CXXFLAGS+=-O0 -std=c++11
LDFLAGS+=-shared $(ENGINE_LIB) $(AD_LIB)
LDLIBS=-lstdc++ -lpEpEngine -lpEpAdapter
@ -35,6 +35,7 @@ ENGINE_LIB_PATH=$(HOME)/lib
ENGINE_INC_PATH=$(HOME)/include
AD_LIB_PATH=$(HOME)/lib
AD_INC_PATH=$(HOME)/include
DEBUG=1
######### Overrides from the config file(s) #########
-include $(HERE)/local.conf
@ -49,5 +50,14 @@ ifdef BUILD_CONFIG
include $(BUILD_CONFIG)
endif
# Debug or Release build
ifeq ($(DEBUG),1)
$(info Debug build (set DEBUG=0 for release build))
CXXFLAGS+=-g
else
$(info Release Build (set DEBUG=1 for debug build))
CXXFLAGS+=-DNDEBUG=1
endif
# YML_PATH is needed in the environment of every call to a program of the YML2 distribution
export YML_PATH=$(YML2_PATH)

2
local.conf.example

@ -6,6 +6,8 @@
######### C++ Compiler #########
# Should work with clang and g++
# CXX=g++
# DEBUG=1 # DEBUG Build (Default)
# DEBUG=0 # RELEASE Build
######### JAVA #########
# JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_231.jdk/Contents/Home

Loading…
Cancel
Save