From 25a8a35ed52aa02cc4337a1b4d76f3e4be1a63cb Mon Sep 17 00:00:00 2001 From: Brian Webb Date: Sun, 20 Dec 2015 19:17:05 -0700 Subject: [PATCH] LP-187 Msys2: Removes unnecessary targets from Windows SDK targets and updates CONTRIBUTING.md --- CONTRIBUTING.md | 53 ++++++++++++++++++++++++++++++------------------- make/tools.mk | 6 ++++-- 2 files changed, 37 insertions(+), 22 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 15544b42b..56ba98fc4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,40 +1,53 @@ -How to build from source? -========================= +# How to build from source? Both development environment and GCS are supported on Windows, Linux and Mac OS X +## Install prerequisites + The first step is to Install all OS specific prerequisites. -###Mac OS X + +### Mac OS X + Install XCode and its relatated command line tools (follow Apple documentation). Install git, curl and p7zip. You can use brew `brew install git curl p7zip` or macport: `sudo port install git curl p7zip` -###Ubuntu - - sudo apt-get install git build-essential curl gdb wget debhelper p7zip-full unzip flex bison libsdl1.2-dev libudev-dev libusb-1.0-0-dev libc6-i386 mesa-common-dev -###Windows -Install [msysGIT](https://msysgit.github.io/) under `C:\git` +### Ubuntu -Clone LibrePilot Git repository. -Open Git Bash and run + sudo apt-get install git build-essential curl gdb wget debhelper p7zip-full unzip flex bison libsdl1.2-dev libudev-dev libusb-1.0-0-dev libc6-i386 mesa-common-dev - cd /path/to/LibrePilot_root - ./make/scripts/win_sdk_install.sh -You can build using the `/path/to/LibrePilot_root/make/winx86/bin/make` wrapper to call `mingw32-make.exe` as: +### Windows - ./make/winx86/bin/make all_sdk_install -or call `mingw32-make` directly +Install [Msys2](https://msys2.github.io/) following the instructions on the web site. You can either install the i686 (32 bit) or x86_64 (64 bit) version. - mingw32-make all_sdk_install +Start a "MinGW-w64 Win32 Shell" or "MinGW-w64 Win32 Win64 Shell" (NOT "MSYS2 Shell") + +Install the dependent packages (32 bit): + + pacman -S --needed git unzip tar mingw-w64-i686-toolchain mingw-w64-i686-qt5 mingw-w64-i686-SDL mingw-w64-i686-mesa mingw-w64-i686-openssl + +Or for a 64 bit build: + + pacman -S --needed git unzip tar mingw-w64-x86_64-toolchain mingw-w64-x86_64-qt5 mingw-w64-x86_64-SDL mingw-w64-x86_64-mesa mingw-w64-x86_64-openssl + +*NOTE* On Windows you need to run the mingw version of make, which is 'mingw32-make' + + +## Setup the build environment and build -##Setup the build environment and build The `all_sdk_install` target will automatically retrieve and install all needed tools (qt, arm gcc etc.) in a local folder `/path/to/LibrePilot_root/tools` +### Ubuntu / Mac OS X - make all_sdk_install - make package + make all_sdk_install + make package -The `package` target will build the complete installable package for the current platform. +### Windows + + mingw32-make all_sdk_install + mingw32-make package + +The `package` target will build the complete installable package for the current platform. You can build the 'all' target to just build the software. Run make with no arguments to show the complete list of supported targets. diff --git a/make/tools.mk b/make/tools.mk index 881813c99..2df72f9b3 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -166,9 +166,11 @@ QT_SDK_PREFIX := $(QT_SDK_DIR) # ############################## -BUILD_SDK_TARGETS := arm_sdk qt_sdk osg +BUILD_SDK_TARGETS := arm_sdk ifeq ($(UNAME), Windows) - BUILD_SDK_TARGETS += sdl nsis mesawin openssl ccache + BUILD_SDK_TARGETS += nsis +else + BUILD_SDK_TARGETS += qt_sdk endif ALL_SDK_TARGETS := $(BUILD_SDK_TARGETS) gtest uncrustify doxygen