-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
527 changed files
with
92,562 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
BuildScripts | ||
GettingStartedGuide | ||
*.user | ||
*.suo |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#Set the path variables | ||
path-constant BUILD_DIR : build ; | ||
path-constant STAGING_DIR : Output ; | ||
path-constant TOP : . ; | ||
|
||
#Define the project | ||
project | ||
: requirements <toolset>gcc:<cxxflags>-std=c++11 #Set the requirements for the project (if you are using the gcc toolchain, add the cxxflags) | ||
: build-dir $(BUILD_DIR) #Set the build directory | ||
; | ||
|
||
#Alias MSCL (can use /mscl-lib to refer to the MSCL project) | ||
use-project /mscl-lib : MSCL ; | ||
|
||
#Build the MSCL_Examples project | ||
build-project MSCL_Examples ; | ||
|
||
#Alias stage to "MSCL//stage_all" | ||
alias stage : MSCL//stage_all ; | ||
|
||
#Make the user explicitly tell bjam to build the stage alias | ||
explicit stage ; | ||
|
||
alias stage_dynamic : MSCL//stage_python_dynamic MSCL//stage_c++ MSCL//stage_headers ; | ||
explicit stage_dynamic ; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
import swig ; | ||
import python ; | ||
import cast ; | ||
import path ; | ||
import common ; | ||
|
||
#Setup path variables | ||
path-constant SWIG_PYTHON : $(BUILD_DIR)/swig-python ; | ||
|
||
#Define the project | ||
project | ||
: usage-requirements <include>source | ||
; | ||
|
||
#Define libraries that exist on the system | ||
lib boost_system ; | ||
lib boost_filesystem ; | ||
lib boost_chrono ; | ||
lib boost_date_time ; | ||
lib pthread ; | ||
|
||
#cpp-pch stdafx : source/stdafx.h ; #TODO: Trying to get Precompiled Headers to work | ||
|
||
#On Windows (non-gcc), these are empty aliases | ||
alias unixsocket_cpp ; | ||
alias boostLibs ; | ||
alias boostStaticLibs ; | ||
|
||
#On Linux (gcc), define these aliases | ||
alias unixsocket_cpp : source/mscl/Communication/UnixSocketConnection.cpp : <toolset>gcc ; | ||
alias boostLibs : boost_system boost_filesystem boost_date_time boost_chrono pthread : <toolset>gcc ; | ||
alias boostStaticLibs : boost_system/<link>static boost_date_time/<link>static boost_chrono/<link>static : <toolset>gcc ; | ||
|
||
alias msclSrcs | ||
: [ glob source/*.cpp ] | ||
[ glob source/mscl/*.cpp ] | ||
[ glob source/mscl/Communication/*.cpp : source/mscl/Communication/UnixSocketConnection.cpp ] | ||
[ glob source/mscl/MicroStrain/*.cpp ] | ||
[ glob source/mscl/MicroStrain/Inertial/*.cpp ] | ||
[ glob source/mscl/MicroStrain/Inertial/Commands/*.cpp ] | ||
[ glob source/mscl/MicroStrain/Inertial/Packets/*.cpp ] | ||
[ glob source/mscl/MicroStrain/Wireless/*.cpp ] | ||
[ glob source/mscl/MicroStrain/Wireless/Commands/*.cpp ] | ||
[ glob source/mscl/MicroStrain/Wireless/Configuration/*.cpp ] | ||
[ glob source/mscl/MicroStrain/Wireless/Features/*.cpp ] | ||
[ glob source/mscl/MicroStrain/Wireless/Packets/*.cpp ] | ||
unixsocket_cpp | ||
; | ||
|
||
#Define how we build the C++ library | ||
lib mscl | ||
: msclSrcs | ||
boostLibs | ||
: <include>source | ||
<toolset>gcc:<define>UNIX_SOCKETS | ||
; | ||
|
||
#Ensure that the python output folder exists | ||
make $(SWIG_PYTHON) : : @common.mkdir ; | ||
|
||
#Setup dependencies for the mscl python project | ||
DEPENDS _mscl : $(SWIG_PYTHON) ; | ||
DEPENDS _mscl-dynamic : $(SWIG_PYTHON) ; | ||
|
||
alias MSCL_Main_Interface.cpp : [ cast _ swigi : source/mscl/Wrapper/MSCL_Main_Interface.i ] ; #Reference the .i file as a swig_i file | ||
|
||
#Define the python mscl build | ||
python-extension _mscl | ||
: MSCL_Main_Interface.cpp | ||
msclSrcs #Include the MSCL Source | ||
boostLibs | ||
: <include>source/mscl/Wrapper/ | ||
<swig-options>-python | ||
<swig-options>"-outdir $(SWIG_PYTHON)" | ||
<toolset>gcc:<swig-options>-DUNIX_SOCKETS | ||
<toolset>gcc:<define>UNIX_SOCKETS | ||
; | ||
|
||
#Define the python mscl build | ||
python-extension _mscl-dynamic | ||
: MSCL_Main_Interface.cpp | ||
mscl #Include the MSCL Source | ||
boostLibs | ||
: <include>source/mscl/Wrapper/ | ||
<swig-options>-python | ||
<swig-options>"-outdir $(SWIG_PYTHON)" | ||
<toolset>gcc:<swig-options>-DUNIX_SOCKETS | ||
<toolset>gcc:<define>UNIX_SOCKETS | ||
; | ||
|
||
#Copy all the header files and put them in an output directory | ||
install stage_headers | ||
: [ glob-tree *.h : .svn stdafx.h ] | ||
: <location>$(STAGING_DIR)/include <install-source-root>source | ||
; | ||
explicit stage_headers ; | ||
|
||
#Copy the lib directory | ||
install stage_c++ | ||
: mscl | ||
: <variant>release:<location>$(STAGING_DIR)/C++/Release | ||
<variant>debug:<location>$(STAGING_DIR)/C++/Debug | ||
; | ||
explicit stage_c++ ; | ||
|
||
#Copy the python directory | ||
install stage_python | ||
: _mscl [ path.glob-tree $(SWIG_PYTHON) : *.py ] | ||
: <location>$(STAGING_DIR)/Python | ||
; | ||
explicit stage_python ; | ||
|
||
install stage_python_dynamic | ||
: _mscl-dynamic [ path.glob-tree $(SWIG_PYTHON) : *.py ] | ||
: <location>$(STAGING_DIR)/Python | ||
; | ||
explicit stage_python_dynamic ; | ||
|
||
#Make an alias for all of the copying | ||
alias stage_all | ||
: stage_c++ stage_python #stage_headers | ||
; | ||
explicit stage_all ; |
Oops, something went wrong.