Unified local.conf with pEpJNIAdapter, added local.conf.example, (BUILD_CONFIG gone seemed to be broken, anyone missing it? /q heck)
parent
0426b8b8bb
commit
d92b92c844
2
Makefile
2
Makefile
|
@ -7,7 +7,7 @@ include Makefile.conf
|
|||
|
||||
TARGET=libpEpAdapter.a
|
||||
|
||||
.PHONY: install, uninstall, clean
|
||||
.PHONY: install uninstall clean
|
||||
|
||||
SOURCE=$(wildcard *.cc)
|
||||
HEADERS=$(wildcard *.hh *.hxx)
|
||||
|
|
|
@ -6,7 +6,12 @@
|
|||
HERE:=$(dir $(lastword $(MAKEFILE_LIST)))
|
||||
|
||||
|
||||
PREFIX?=$(HOME)
|
||||
# Defaults
|
||||
DEBUG=1
|
||||
PREFIX?=$(HOME)/local
|
||||
ENGINE_LIB_PATH=$(PREFIX)/lib
|
||||
ENGINE_INC_PATH=$(PREFIX)/include
|
||||
|
||||
CXXFLAGS+=-std=c++11 -fPIC
|
||||
|
||||
# Build target
|
||||
|
@ -18,20 +23,20 @@ else ifneq (,$(findstring clang,$(CXX)))
|
|||
CXXFLAGS+=-fcolor-diagnostics
|
||||
endif
|
||||
|
||||
# Debug or Release build
|
||||
|
||||
ifndef NDEBUG
|
||||
CXXFLAGS+=-g -O0
|
||||
else
|
||||
CXXFLAGS+=-DNDEBUG -O2
|
||||
endif
|
||||
|
||||
######### Engine #########
|
||||
ENGINE_LIB_PATH=$(PREFIX)/lib
|
||||
ENGINE_INC_PATH=$(PREFIX)/include
|
||||
|
||||
######### Overrides #########
|
||||
-include $(HERE)/local.conf
|
||||
ifneq ("$(wildcard $(HERE)local.conf)","")
|
||||
$(info including: $(HERE)local.conf)
|
||||
-include $(HERE)local.conf
|
||||
else
|
||||
$(info Optional build config not found: $(HERE)local.conf)
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
CXXFLAGS+=-g -O0
|
||||
else
|
||||
CXXFLAGS+=-DNDEBUG=1 -O3
|
||||
endif
|
||||
|
||||
# Add -L Prefixes to LIB/INC paths,
|
||||
# if not already explicitly set in local.conf
|
||||
|
@ -42,12 +47,9 @@ ifndef ENGINE_INC
|
|||
ENGINE_INC=-I$(ENGINE_INC_PATH)
|
||||
endif
|
||||
|
||||
ifdef BUILD_CONFIG
|
||||
include $(BUILD_CONFIG)
|
||||
endif
|
||||
CXXFLAGS += $(ENGINE_INC)
|
||||
|
||||
ifndef ENGINE_TEST
|
||||
ENGINE_TEST = \"$(HOME)/dev/pEpEngine/test\"
|
||||
endif
|
||||
|
||||
CXXFLAGS += $(ENGINE_INC)
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
# This is an Example build config file (local.conf)
|
||||
# you might not need this file, but if the defaults dont work for you
|
||||
# You can override them here.
|
||||
# Tweak the values to your needs and rename it to local.conf
|
||||
|
||||
######### C++ Compiler #########
|
||||
# Should work with clang and g++
|
||||
# CXX=g++
|
||||
# DEBUG=1 # DEBUG Build (Default)
|
||||
# DEBUG=0 # RELEASE Build
|
||||
|
||||
############# DIRS #############
|
||||
# PREFIX=$(HOME)/local
|
||||
# ENGINE_LIB_PATH=$(PREFIX)/lib
|
||||
# ENGINE_INC_PATH=$(PREFIX)/include
|
||||
# ENGINE_TEST=
|
Loading…
Reference in New Issue