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 5 years ago
parent
commit
d92b92c844
  1. 2
      Makefile
  2. 32
      Makefile.conf
  3. 16
      local.conf.example

2
Makefile

@ -7,7 +7,7 @@ include Makefile.conf
TARGET=libpEpAdapter.a TARGET=libpEpAdapter.a
.PHONY: install, uninstall, clean .PHONY: install uninstall clean
SOURCE=$(wildcard *.cc) SOURCE=$(wildcard *.cc)
HEADERS=$(wildcard *.hh *.hxx) HEADERS=$(wildcard *.hh *.hxx)

32
Makefile.conf

@ -6,7 +6,12 @@
HERE:=$(dir $(lastword $(MAKEFILE_LIST))) 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 CXXFLAGS+=-std=c++11 -fPIC
# Build target # Build target
@ -18,20 +23,20 @@ else ifneq (,$(findstring clang,$(CXX)))
CXXFLAGS+=-fcolor-diagnostics CXXFLAGS+=-fcolor-diagnostics
endif endif
# Debug or Release build
ifndef NDEBUG ######### Overrides #########
CXXFLAGS+=-g -O0 ifneq ("$(wildcard $(HERE)local.conf)","")
$(info including: $(HERE)local.conf)
-include $(HERE)local.conf
else else
CXXFLAGS+=-DNDEBUG -O2 $(info Optional build config not found: $(HERE)local.conf)
endif endif
######### Engine ######### ifeq ($(DEBUG),1)
ENGINE_LIB_PATH=$(PREFIX)/lib CXXFLAGS+=-g -O0
ENGINE_INC_PATH=$(PREFIX)/include else
CXXFLAGS+=-DNDEBUG=1 -O3
######### Overrides ######### endif
-include $(HERE)/local.conf
# Add -L Prefixes to LIB/INC paths, # Add -L Prefixes to LIB/INC paths,
# if not already explicitly set in local.conf # if not already explicitly set in local.conf
@ -42,12 +47,9 @@ ifndef ENGINE_INC
ENGINE_INC=-I$(ENGINE_INC_PATH) ENGINE_INC=-I$(ENGINE_INC_PATH)
endif endif
ifdef BUILD_CONFIG CXXFLAGS += $(ENGINE_INC)
include $(BUILD_CONFIG)
endif
ifndef ENGINE_TEST ifndef ENGINE_TEST
ENGINE_TEST = \"$(HOME)/dev/pEpEngine/test\" ENGINE_TEST = \"$(HOME)/dev/pEpEngine/test\"
endif endif
CXXFLAGS += $(ENGINE_INC)

16
local.conf.example

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