From 366b9d18bd37df869591f96f364d8f57a6317b50 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lo=C3=AFc=20Collignon?= Date: Thu, 16 Mar 2017 10:49:31 +0100 Subject: [PATCH] added visual studio 2017 linux cross compile projects. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Loïc Collignon --- build.sh | 81 +++++++++++++++++++++++++++++++++++++++++ can-config-generator.sln | 22 +++++++++++ can-config-generator.vcxproj | 87 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 190 insertions(+) create mode 100755 build.sh create mode 100644 can-config-generator.sln create mode 100644 can-config-generator.vcxproj diff --git a/build.sh b/build.sh new file mode 100755 index 00000000..b6d9216a --- /dev/null +++ b/build.sh @@ -0,0 +1,81 @@ +#!/bin/bash + +function build { + echo "ACTION: build" + if [ ! -d "$1/$2" ]; then + echo "INFO: build dir ($1/$2) doesn't exist, created it!" + mkdir -p "$1/$2" + fi + pushd "$1/$2" + #cd "$1/$2" + cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=$3 $1 + make + popd +} + +function clean { + echo "ACTION: clean" + if [ -d "$1/$2" ]; then + rm -vrf "$1/$2" + fi +} + +function rebuild { + clean $1 $2 + build $1 $2 $3 +} + +function printhelp { + echo "Usage: build.sh [config]" + echo " action: can be one of the following" + echo " build: build this project." + echo " rebuild: rebuild this project." + echo " clean: clean the previous build." + echo " install: install the build result." + echo " subdir: the subdir into which the build is done." + echo " config: can be Debug or Release. Ignored if the action is 'clean'." +} + +function checkparams { + if [ "$#" -ne "$(($1+1))" ]; then + echo "ERROR: Wrong number of parameters, expected $1 but got $(($#-1))" + printhelp + exit 1 + fi +} + +function main { + CURRENT_DIR=$( dirname "$(readlink -f "$0")" ) + echo "Current script: $CURRENT_DIR" + + if [ "$#" -lt "1" ]; then + echo "ERROR: At least must be specified!" + exit 1 + fi + + case "$1" in + "build") + checkparams 3 $* + build $CURRENT_DIR $2 $3 + ;; + "rebuild") + checkparams 3 $* + rebuild $CURRENT_DIR $2 $3 + ;; + "clean") + checkparams 2 $* + clean $CURRENT_DIR $2 + ;; + "install") + checkparams 3 $* + echo "ERROR: Not implemented yet!" + ;; + *) + echo "ERROR: Unknown action '$3'!" + exit 1 + ;; + esac +} + +main $* + diff --git a/can-config-generator.sln b/can-config-generator.sln new file mode 100644 index 00000000..aa58f4a2 --- /dev/null +++ b/can-config-generator.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26228.4 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "can-config-generator", "can-config-generator.vcxproj", "{9DCC61FB-6E10-4D4C-A66D-D694238D4169}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9DCC61FB-6E10-4D4C-A66D-D694238D4169}.Debug|x64.ActiveCfg = Debug|x64 + {9DCC61FB-6E10-4D4C-A66D-D694238D4169}.Debug|x64.Build.0 = Debug|x64 + {9DCC61FB-6E10-4D4C-A66D-D694238D4169}.Release|x64.ActiveCfg = Release|x64 + {9DCC61FB-6E10-4D4C-A66D-D694238D4169}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/can-config-generator.vcxproj b/can-config-generator.vcxproj new file mode 100644 index 00000000..3a2b5c9b --- /dev/null +++ b/can-config-generator.vcxproj @@ -0,0 +1,87 @@ + + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {9dcc61fb-6e10-4d4c-a66d-d694238d4169} + Linux + can_config_generator + 15.0 + Linux + 1.0 + Generic + {FC1A4D80-50E9-41DA-9192-61C0DBAA00D2} + + + + true + Makefile + ~/agl/projects + + + false + Makefile + ~/agl/projects + + + + + + + + false + D:\home\ctxnop\agl\sdk\porter\sysroots\cortexa15hf-neon-agl-linux-gnueabi\usr\include;$(NMakeIncludeSearchPath) + $(RemoteProjectDir)/build.sh build bin/$(PlatformTarget)/$(Configuration) $(Configuration) + $(RemoteProjectDir)/build.sh rebuild bin/$(PlatformTarget)/$(Configuration) $(Configuration) + $(RemoteProjectDir)/build.sh clean bin/$(PlatformTarget)/$(Configuration) + + + false + D:\home\ctxnop\agl\sdk\porter\sysroots\cortexa15hf-neon-agl-linux-gnueabi\usr\include;$(NMakeIncludeSearchPath) + $(RemoteProjectDir)/build.sh build bin/$(PlatformTarget)/$(Configuration) $(Configuration) + $(RemoteProjectDir)/build.sh rebuild bin/$(PlatformTarget)/$(Configuration) $(Configuration) + $(RemoteProjectDir)/build.sh clean bin/$(PlatformTarget)/$(Configuration) + + + + + \ No newline at end of file -- 2.16.6