diff --git a/Makefile b/Makefile index 88dab8d..78e08b9 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,4 @@ -PREFIX = /home/heck/local-default/ -DEBUG = 1 -BUILD_DIR = ./build - -BUILD_EXT_OPTS = --prefix=$(PREFIX) - -ifeq ($(DEBUG),1) - BUILD_EXT_OPTS+=--debug -endif +include Makefile.conf .PHONY: all build clean devenv envtest diff --git a/Makefile.conf b/Makefile.conf new file mode 100644 index 0000000..9bacf8a --- /dev/null +++ b/Makefile.conf @@ -0,0 +1,15 @@ +HERE:=$(dir $(lastword $(MAKEFILE_LIST))) + +# Defaults +DEBUG=1 +PREFIX?=$(HOME) +BUILD_DIR = ./build + +######### Overrides ######### +-include $(HERE)local.conf + +ifeq ($(DEBUG),1) + BUILD_EXT_OPTS+=--debug +endif + +BUILD_EXT_OPTS += --prefix=$(PREFIX) diff --git a/local.conf.example b/local.conf.example new file mode 100644 index 0000000..9438ccf --- /dev/null +++ b/local.conf.example @@ -0,0 +1,11 @@ +# 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 ######### +# DEBUG=1 +# DEBUG=0 + +############# DIRS ############# +# PREFIX=$(HOME)/local