Allow compiler flags from command line

The following variables are reserved for use from the
GNUmake command line:
  CMD_INCLUDES
  CMD_CPPFLAGS
  CMD_CFLAGS
  CMD_CXXFLAGS
  CMD_LDFLAGS
  CMD_DBFLAGS
  CMD_DBDFLAGS
  CMD_ARFLAGS

For example:
  make CMD_INCLUDES=/opt/local/include CMD_LDFLAGS=-L/opt/local/lib
This commit is contained in:
Andrew Johnson
2015-02-20 14:48:05 -06:00
parent 4cf3613ace
commit 4658a88584
4 changed files with 53 additions and 38 deletions

View File

@@ -24,8 +24,8 @@ vpath %.acs $(USR_VPATH) $(GENERIC_SRC_DIRS) $(COMMON_DIR)
DBD_SEARCH_DIRS = . .. $(COMMON_DIR) $(SRC_DIRS) $(INSTALL_DBD) $(RELEASE_DBD_DIRS)
DB_SEARCH_DIRS = . .. $(COMMON_DIR) $(SRC_DIRS) $(INSTALL_DB) $(RELEASE_DB_DIRS)
DBDFLAGS = $(USR_DBDFLAGS) $(addprefix -I,$(DBD_SEARCH_DIRS))
DBFLAGS = $($*_DBFLAGS) $(USR_DBFLAGS) $(addprefix -I,$(DB_SEARCH_DIRS))
DBDFLAGS = $(USR_DBDFLAGS) $(CMD_DBDFLAGS) $(addprefix -I,$(DBD_SEARCH_DIRS))
DBFLAGS = $($*_DBFLAGS) $(USR_DBFLAGS) $(CMD_DBFLAGS) $(addprefix -I,$(DB_SEARCH_DIRS))
#####################################################
# To allow os specific dbd files AND have the -j option work properly,