Browse Source

Unified local.conf with pEpJNIAdapter, added local.conf.example, (BUILD_CONFIG gone seemed to be broken, anyone missing it? /q heck)

pull/1/head
heck 1 year ago
parent
commit
d92b92c844
3 changed files with 34 additions and 16 deletions
  1. +1
    -1
      Makefile
  2. +17
    -15
      Makefile.conf
  3. +16
    -0
      local.conf.example

+ 1
- 1
Makefile View File

@ -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)


+ 17
- 15
Makefile.conf View File

@ -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
######### Overrides #########
ifneq ("$(wildcard $(HERE)local.conf)","")
$(info including: $(HERE)local.conf)
-include $(HERE)local.conf
else
CXXFLAGS+=-DNDEBUG -O2
$(info Optional build config not found: $(HERE)local.conf)
endif
######### Engine #########
ENGINE_LIB_PATH=$(PREFIX)/lib
ENGINE_INC_PATH=$(PREFIX)/include
######### Overrides #########
-include $(HERE)/local.conf
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)

+ 16
- 0
local.conf.example View File

@ -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…
Cancel
Save