Browse Source

Build config, added foo_PATH vars, for more flexible reuse of paths

Backwards compatible with "old" local.conf
JNI-88
heck 3 years ago
parent
commit
e9f2b449bd
2 changed files with 24 additions and 8 deletions
  1. +18
    -4
      Makefile.conf
  2. +6
    -4
      README.md

+ 18
- 4
Makefile.conf View File

@ -43,17 +43,31 @@ YML2_PROC=$(YML2_PATH)/yml2proc $(YML2_OPTS)
YML2_OPTS=--encoding=utf8
######### Engine #########
ENGINE_LIB=-L$(HOME)/lib
ENGINE_INC=-I$(HOME)/include
ENGINE_LIB_PATH=$(HOME)/lib
ENGINE_INC_PATH=$(HOME)/include
######### libAdapter #########
AD_LIB=-L$(HOME)/lib
AD_INC=-I$(HOME)/include
AD_LIB_PATH=$(HOME)/lib
AD_INC_PATH=$(HOME)/include
######### Overrides #########
-include $(HERE)/local.conf
-include $(HERE)/src/local.conf
# Add Prefixes to paths, if not already explicitly set in local.conf(s)
ifndef ENGINE_LIB
ENGINE_LIB=-L$(ENGINE_LIB_PATH)
endif
ifndef ENGINE_INC
ENGINE_INC=-I$(ENGINE_INC_PATH)
endif
ifndef AD_LIB
AD_LIB=-L$(AD_LIB_PATH)
endif
ifndef AD_INC
AD_INC=-I$(AD_INC_PATH)
endif
ifdef BUILD_CONFIG
include $(BUILD_CONFIG)
endif


+ 6
- 4
README.md View File

@ -39,13 +39,15 @@ JAVA_HOME=/Library/Java/JavaVirtualMachines/openjdk8/Contents/Home
YML2_PATH=$(HOME)/code/yml2
ENGINE_INC=-I$(HOME)/code/engine/build/include
ENGINE_LIB=-L$(HOME)/code/engine/build/lib
ENGINE_INC_PATH=$(HOME)/code/engine/build/include
ENGINE_LIB_PATH=$(HOME)/code/engine/build/lib
AD_INC=-L$(HOME)/code/libad/build/include
AD_LIB=-L$(HOME)/code/libad/build/lib
AD_INC_PATH=$(HOME)/code/libad/build/include
AD_LIB_PATH=$(HOME)/code/libad/build/lib
~~~
The the foo_PATH variables will be turned into compiler directives (-I / -L), which can be directly set by just omitting "\_PATH" (e.g. ENGINE_INC). They will take priority.
Depending on what is already set in your environment, or can be found in your default include/library paths, setting any of these variables may be optional on your platform.
Now, build the Adapter with


Loading…
Cancel
Save