--- /dev/null
+#!/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 <action> <subdir> [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 <action> 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 $*
+
--- /dev/null
+\r
+Microsoft Visual Studio Solution File, Format Version 12.00\r
+# Visual Studio 15\r
+VisualStudioVersion = 15.0.26228.4\r
+MinimumVisualStudioVersion = 10.0.40219.1\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "can-config-generator", "can-config-generator.vcxproj", "{9DCC61FB-6E10-4D4C-A66D-D694238D4169}"\r
+EndProject\r
+Global\r
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+ Debug|x64 = Debug|x64\r
+ Release|x64 = Release|x64\r
+ EndGlobalSection\r
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+ {9DCC61FB-6E10-4D4C-A66D-D694238D4169}.Debug|x64.ActiveCfg = Debug|x64\r
+ {9DCC61FB-6E10-4D4C-A66D-D694238D4169}.Debug|x64.Build.0 = Debug|x64\r
+ {9DCC61FB-6E10-4D4C-A66D-D694238D4169}.Release|x64.ActiveCfg = Release|x64\r
+ {9DCC61FB-6E10-4D4C-A66D-D694238D4169}.Release|x64.Build.0 = Release|x64\r
+ EndGlobalSection\r
+ GlobalSection(SolutionProperties) = preSolution\r
+ HideSolutionNode = FALSE\r
+ EndGlobalSection\r
+EndGlobal\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="build.sh" />\r
+ <None Include="LICENSE" />\r
+ <None Include="README.md" />\r
+ <None Include="tests\signals.json" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="3rdparty\json\json.hpp" />\r
+ <ClInclude Include="src\openxc\can_bus.hpp" />\r
+ <ClInclude Include="src\openxc\can_message.hpp" />\r
+ <ClInclude Include="src\openxc\command.hpp" />\r
+ <ClInclude Include="src\openxc\diagnostic_message.hpp" />\r
+ <ClInclude Include="src\openxc\mapping.hpp" />\r
+ <ClInclude Include="src\openxc\message_set.hpp" />\r
+ <ClInclude Include="src\openxc\signal.hpp" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="src\main.cpp" />\r
+ <ClCompile Include="src\openxc\can_bus.cpp" />\r
+ <ClCompile Include="src\openxc\can_message.cpp" />\r
+ <ClCompile Include="src\openxc\command.cpp" />\r
+ <ClCompile Include="src\openxc\diagnostic_message.cpp" />\r
+ <ClCompile Include="src\openxc\mapping.cpp" />\r
+ <ClCompile Include="src\openxc\message_set.cpp" />\r
+ <ClCompile Include="src\openxc\signal.cpp" />\r
+ <ClCompile Include="tests\generated.cpp" />\r
+ <ClCompile Include="tests\handlers.cpp" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Text Include="CMakeLists.txt" />\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{9dcc61fb-6e10-4d4c-a66d-d694238d4169}</ProjectGuid>\r
+ <Keyword>Linux</Keyword>\r
+ <RootNamespace>can_config_generator</RootNamespace>\r
+ <MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>\r
+ <ApplicationType>Linux</ApplicationType>\r
+ <ApplicationTypeRevision>1.0</ApplicationTypeRevision>\r
+ <TargetLinuxPlatform>Generic</TargetLinuxPlatform>\r
+ <LinuxProjectType>{FC1A4D80-50E9-41DA-9192-61C0DBAA00D2}</LinuxProjectType>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
+ <UseDebugLibraries>true</UseDebugLibraries>\r
+ <ConfigurationType>Makefile</ConfigurationType>\r
+ <RemoteRootDir>~/agl/projects</RemoteRootDir>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
+ <UseDebugLibraries>false</UseDebugLibraries>\r
+ <ConfigurationType>Makefile</ConfigurationType>\r
+ <RemoteRootDir>~/agl/projects</RemoteRootDir>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <ImportGroup Label="ExtensionSettings" />\r
+ <ImportGroup Label="Shared" />\r
+ <ImportGroup Label="PropertySheets" />\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+ <LocalRemoteCopySources>false</LocalRemoteCopySources>\r
+ <NMakeIncludeSearchPath>D:\home\ctxnop\agl\sdk\porter\sysroots\cortexa15hf-neon-agl-linux-gnueabi\usr\include;$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>\r
+ <RemoteBuildCommandLine>$(RemoteProjectDir)/build.sh build bin/$(PlatformTarget)/$(Configuration) $(Configuration)</RemoteBuildCommandLine>\r
+ <RemoteReBuildCommandLine>$(RemoteProjectDir)/build.sh rebuild bin/$(PlatformTarget)/$(Configuration) $(Configuration)</RemoteReBuildCommandLine>\r
+ <RemoteCleanCommandLine>$(RemoteProjectDir)/build.sh clean bin/$(PlatformTarget)/$(Configuration)</RemoteCleanCommandLine>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+ <LocalRemoteCopySources>false</LocalRemoteCopySources>\r
+ <NMakeIncludeSearchPath>D:\home\ctxnop\agl\sdk\porter\sysroots\cortexa15hf-neon-agl-linux-gnueabi\usr\include;$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>\r
+ <RemoteBuildCommandLine>$(RemoteProjectDir)/build.sh build bin/$(PlatformTarget)/$(Configuration) $(Configuration)</RemoteBuildCommandLine>\r
+ <RemoteReBuildCommandLine>$(RemoteProjectDir)/build.sh rebuild bin/$(PlatformTarget)/$(Configuration) $(Configuration)</RemoteReBuildCommandLine>\r
+ <RemoteCleanCommandLine>$(RemoteProjectDir)/build.sh clean bin/$(PlatformTarget)/$(Configuration)</RemoteCleanCommandLine>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets" />\r
+</Project>
\ No newline at end of file