1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

LP-61 addtional make config options: added libbasename & GCS_LIBRARY_BASENAME

Change-Id: Ied2f50b3f87d40ef7fb0bbad0fff4cd0fd9bb8a9
This commit is contained in:
James Duley 2015-07-26 21:30:41 +01:00
parent fa29163753
commit 50ee70f492
4 changed files with 11 additions and 10 deletions

View File

@ -477,6 +477,7 @@ openpilotgcs_qmake $(OPENPILOTGCS_MAKEFILE): | $(OPENPILOTGCS_DIR)
-spec $(QT_SPEC) -r CONFIG+=$(GCS_BUILD_CONF) CONFIG+=$(GCS_SILENT) \ -spec $(QT_SPEC) -r CONFIG+=$(GCS_BUILD_CONF) CONFIG+=$(GCS_SILENT) \
'GCS_BIG_NAME="$(GCS_BIG_NAME)"' GCS_SMALL_NAME=$(GCS_SMALL_NAME) \ 'GCS_BIG_NAME="$(GCS_BIG_NAME)"' GCS_SMALL_NAME=$(GCS_SMALL_NAME) \
'ORG_BIG_NAME="$(ORG_BIG_NAME)"' ORG_SMALL_NAME=$(ORG_SMALL_NAME) \ 'ORG_BIG_NAME="$(ORG_BIG_NAME)"' ORG_SMALL_NAME=$(ORG_SMALL_NAME) \
'GCS_LIBRARY_BASENAME=$(libbasename)' \
$(GCS_QMAKE_OPTS) $(GCS_QMAKE_OPTS)
.PHONY: openpilotgcs .PHONY: openpilotgcs

View File

@ -140,6 +140,8 @@ isEmpty(ORG_BIG_NAME) {
ORG_BIG_NAME = "$$ORG_BIG_NAME" ORG_BIG_NAME = "$$ORG_BIG_NAME"
} }
isEmpty(GCS_LIBRARY_BASENAME):GCS_LIBRARY_BASENAME = lib
macx { macx {
GCS_APP_TARGET = $$GCS_BIG_NAME GCS_APP_TARGET = $$GCS_BIG_NAME
GCS_PATH = $$GCS_BUILD_TREE/$${GCS_APP_TARGET}.app/Contents GCS_PATH = $$GCS_BUILD_TREE/$${GCS_APP_TARGET}.app/Contents
@ -155,7 +157,7 @@ macx {
GCS_APP_TARGET = $$GCS_SMALL_NAME GCS_APP_TARGET = $$GCS_SMALL_NAME
GCS_PATH = $$GCS_BUILD_TREE GCS_PATH = $$GCS_BUILD_TREE
GCS_APP_PATH = $$GCS_PATH/bin GCS_APP_PATH = $$GCS_PATH/bin
GCS_LIBRARY_PATH = $$GCS_PATH/lib/$$GCS_SMALL_NAME GCS_LIBRARY_PATH = $$GCS_PATH/$$GCS_LIBRARY_BASENAME/$$GCS_SMALL_NAME
GCS_PLUGIN_PATH = $$GCS_LIBRARY_PATH/plugins GCS_PLUGIN_PATH = $$GCS_LIBRARY_PATH/plugins
GCS_DATA_PATH = $$GCS_PATH/share/$$GCS_SMALL_NAME GCS_DATA_PATH = $$GCS_PATH/share/$$GCS_SMALL_NAME
GCS_DOC_PATH = $$GCS_PATH/share/doc GCS_DOC_PATH = $$GCS_PATH/share/doc

View File

@ -81,10 +81,12 @@ endif # Debian based distro?
# Install Linux Target # Install Linux Target
# #
############################## ##############################
enable-udev-rules ?= no enable-udev-rules := no
prefix := /usr/local prefix := /usr/local
bindir := $(prefix)/bin bindir := $(prefix)/bin
libdir := $(prefix)/lib libbasename := lib
libdir := $(prefix)/$(libbasename)
datadir := $(prefix)/share datadir := $(prefix)/share
udevrulesdir := /etc/udev/rules.d udevrulesdir := /etc/udev/rules.d
@ -101,7 +103,7 @@ install:
$(V1) $(MKDIR) -p $(DESTDIR)$(datadir)/applications $(V1) $(MKDIR) -p $(DESTDIR)$(datadir)/applications
$(V1) $(MKDIR) -p $(DESTDIR)$(datadir)/pixmaps $(V1) $(MKDIR) -p $(DESTDIR)$(datadir)/pixmaps
$(V1) $(INSTALL) $(BUILD_DIR)/$(GCS_SMALL_NAME)_$(GCS_BUILD_CONF)/bin/$(GCS_SMALL_NAME) $(DESTDIR)$(bindir) $(V1) $(INSTALL) $(BUILD_DIR)/$(GCS_SMALL_NAME)_$(GCS_BUILD_CONF)/bin/$(GCS_SMALL_NAME) $(DESTDIR)$(bindir)
$(V1) $(INSTALL) $(BUILD_DIR)/$(GCS_SMALL_NAME)_$(GCS_BUILD_CONF)/lib/$(GCS_SMALL_NAME) $(DESTDIR)$(libdir) $(V1) $(INSTALL) $(BUILD_DIR)/$(GCS_SMALL_NAME)_$(GCS_BUILD_CONF)/$(libbasename)/$(GCS_SMALL_NAME) $(DESTDIR)$(libdir)
$(V1) $(INSTALL) $(BUILD_DIR)/$(GCS_SMALL_NAME)_$(GCS_BUILD_CONF)/share/$(GCS_SMALL_NAME) $(DESTDIR)$(datadir) $(V1) $(INSTALL) $(BUILD_DIR)/$(GCS_SMALL_NAME)_$(GCS_BUILD_CONF)/share/$(GCS_SMALL_NAME) $(DESTDIR)$(datadir)
$(V1) $(INSTALL) -T $(ROOT_DIR)/package/linux/gcs.desktop $(DESTDIR)$(datadir)/applications/$(ORG_SMALL_NAME).desktop $(V1) $(INSTALL) -T $(ROOT_DIR)/package/linux/gcs.desktop $(DESTDIR)$(datadir)/applications/$(ORG_SMALL_NAME).desktop
$(V1) $(INSTALL) -T $(ROOT_DIR)/ground/openpilotgcs/src/plugins/coreplugin/images/$(ORG_SMALL_NAME)_logo_128.png \ $(V1) $(INSTALL) -T $(ROOT_DIR)/ground/openpilotgcs/src/plugins/coreplugin/images/$(ORG_SMALL_NAME)_logo_128.png \

View File

@ -52,13 +52,9 @@ and ease of use.
%prep %prep
%setup -q -n %{name}-%{version}-%{gitrev} %setup -q -n %{name}-%{version}-%{gitrev}
# Fix hardcoded paths
sed -i 's!lib/$$GCS_SMALL_NAME!%{_lib}/$$GCS_SMALL_NAME!g' ground/openpilotgcs/openpilotgcs.pri
sed -i 's!lib/$(GCS_SMALL_NAME!%{_lib}/$(GCS_SMALL_NAME!g' package/Linux.mk
%build %build
make %{?_smp_mflags} gcs QMAKE=qmake-qt5 CC=%{__cc} CXX=%{__cxx} libdir=%{_libdir} make %{?_smp_mflags} gcs QMAKE=qmake-qt5 CC=%{__cc} CXX=%{__cxx} libbasename=%{_lib}
#make -j1 opfw_resource #make -j1 opfw_resource
@ -66,7 +62,7 @@ make %{?_smp_mflags} gcs QMAKE=qmake-qt5 CC=%{__cc} CXX=%{__cxx} libdir=%{_libdi
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT \ make install DESTDIR=$RPM_BUILD_ROOT \
prefix=%{_prefix} \ prefix=%{_prefix} \
libdir=%{_libdir} \ libbasename=%{_lib} \
enable-udev-rules=yes \ enable-udev-rules=yes \
udevrulesdir=%{_udevrulesdir} udevrulesdir=%{_udevrulesdir}