1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

OP-1879 remove openpilot hardcoding: added naming variables to top Makefile

This commit is contained in:
James Duley 2015-05-18 18:03:11 +01:00 committed by LibrePilot Packager
parent 5474583660
commit 4dea2d3d97
2 changed files with 12 additions and 4 deletions

View File

@ -51,6 +51,13 @@ export DIST_DIR := $(ROOT_DIR)/build/dist
DIRS = $(DL_DIR) $(TOOLS_DIR) $(BUILD_DIR) $(PACKAGE_DIR) $(DIST_DIR)
# Naming for binaries and packaging etc,.
OP_BIG_NAME := OpenPilot
GCS_BIG_NAME := ${OP_BIG_NAME} GCS
# These should be lowercase with no spaces
OP_SMALL_NAME := openpilot
GCS_SMALL_NAME := ${OP_SMALL_NAME}gcs
# Set up default build configurations (debug | release)
GCS_BUILD_CONF := release
GOOGLE_API_VERSION := 14
@ -456,7 +463,7 @@ else
GCS_SILENT := silent
endif
OPENPILOTGCS_DIR := $(BUILD_DIR)/openpilotgcs_$(GCS_BUILD_CONF)
OPENPILOTGCS_DIR := $(BUILD_DIR)/$(GCS_SMALL_NAME)_$(GCS_BUILD_CONF)
DIRS += $(OPENPILOTGCS_DIR)
OPENPILOTGCS_MAKEFILE := $(OPENPILOTGCS_DIR)/Makefile
@ -465,7 +472,8 @@ OPENPILOTGCS_MAKEFILE := $(OPENPILOTGCS_DIR)/Makefile
openpilotgcs_qmake $(OPENPILOTGCS_MAKEFILE): | $(OPENPILOTGCS_DIR)
$(V1) cd $(OPENPILOTGCS_DIR) && \
$(QMAKE) $(ROOT_DIR)/ground/openpilotgcs/openpilotgcs.pro \
-spec $(QT_SPEC) -r CONFIG+=$(GCS_BUILD_CONF) CONFIG+=$(GCS_SILENT) $(GCS_QMAKE_OPTS)
-spec $(QT_SPEC) -r CONFIG+=$(GCS_BUILD_CONF) CONFIG+=$(GCS_SILENT) \
'GCS_BIG_NAME="$(GCS_BIG_NAME)"' GCS_SMALL_NAME=$(GCS_SMALL_NAME) $(GCS_QMAKE_OPTS)
.PHONY: openpilotgcs
openpilotgcs: uavobjgenerator $(OPENPILOTGCS_MAKEFILE)
@ -717,7 +725,7 @@ endif
# Define some variables
PACKAGE_LBL := $(shell $(VERSION_INFO) --format=\$${LABEL})
PACKAGE_NAME := OpenPilot
PACKAGE_NAME := $(OP_BIG_NAME)
PACKAGE_SEP := -
PACKAGE_FULL_NAME := $(PACKAGE_NAME)$(PACKAGE_SEP)$(PACKAGE_LBL)

View File

@ -21,7 +21,7 @@ include(../libs/version_info/version_info.pri)
LIBS *= -l$$qtLibraryName(ExtensionSystem) -l$$qtLibraryName(Aggregation)
DEFINES += PLUGIN_REL_PATH=$$shell_quote(\"$$relative_path($$GCS_PLUGIN_PATH, $$GCS_APP_PATH)\")
DEFINES += GCS_NAME=$$shell_quote(\"$$GCS_APP_TARGET\")
DEFINES += GCS_NAME=$$shell_quote(\"$$GCS_BIG_NAME\")
win32 {
RC_FILE = openpilotgcs.rc