Permalink
Browse files

build_vw_asp: added build script

  • Loading branch information...
1 parent 07ac5bd commit df8a45b4b7bb570ee28a7501889bdf279e869461 @dshean committed Mar 20, 2013
Showing with 125 additions and 0 deletions.
  1. +125 −0 build_vw_asp.csh
View
125 build_vw_asp.csh
@@ -0,0 +1,125 @@
+#! /bin/tcsh -f
+
+#David Shean
+#dshean@gmail.com
+#3/20/13
+
+#Build script for NASA VisionWorkbench and Ames Stereo Pipeline on OS X
+#Assumes all necessary dependencies are installed with homebrew
+
+set brew_root = /usr/local
+set src_root = /Users/dshean
+
+echo
+echo "Building VW"
+echo
+
+#setenv CPPFLAGS "-I${brew_root}/include"
+#setenv LDFLAGS "-L${brew_root}/lib"
+
+#Vision Workbench
+set vwsrcdir = $src_root/src/visionworkbench
+set vwdstdir_root = $src_root/sw/vw
+
+cd $vwsrcdir
+
+#git reset --hard HEAD
+#git clean -f
+#git pull
+git fetch --all
+git rebase upstream/master
+
+set commit_id = `git log upstream/master -n 1 --pretty=format:%H | cut -c 1-7`
+set vwdstdir = "${vwdstdir_root}/vw_${commit_id}"
+
+if ($1 == "asponly") then
+ goto asp
+endif
+
+#Note, the --without-tiff will force vw to use the GDAL internal libtiff/libgeotiff
+set config_opt = (--prefix=$vwdstdir --enable-debug)
+
+echo
+./autogen
+
+if ($status) goto failed
+
+echo
+./configure $config_opt
+
+if ($status) goto failed
+
+echo
+make clean
+echo
+make -j 8
+
+if ($status) goto failed
+
+echo
+make install
+
+if ($status) goto failed
+
+cd $vwdstdir_root
+rm latest
+ln -s $vwdstdir:t latest
+
+#Ames Stereo Pipeline
+asp:
+
+echo
+echo "Building ASP"
+echo
+
+#setenv CPPFLAGS "-I${brew_root}/include -I${vwdstdir}/include"
+setenv CPPFLAGS "-I${vwdstdir}/include"
+#setenv LDFLAGS "-L${brew_root}/lib -L${vwdstdir}/lib"
+setenv LDFLAGS "-L${vwdstdir}/lib"
+
+set aspsrcdir = $src_root/src/StereoPipeline
+set aspdstdir_root = $src_root/sw/asp
+
+cd $aspsrcdir
+
+#git reset --hard HEAD
+#git clean -f
+git pull
+
+set commit_id = `git log upstream/master -n 1 --pretty=format:%H | cut -c 1-7`
+set aspdstdir = "${aspdstdir_root}/asp_${commit_id}"
+
+set config_opt = (--prefix=$aspdstdir --enable-debug)
+
+echo
+./autogen
+
+if ($status) goto failed
+
+echo
+./configure $config_opt
+
+if ($status) goto failed
+
+echo
+make clean
+echo
+make -j 2
+
+if ($status) goto failed
+
+echo
+make install
+
+if ($status) goto failed
+
+cd $aspdstdir_root
+rm latest
+ln -s $aspdstdir:t latest
+
+exit
+
+failed:
+
+echo "Failed"
+exit 1

0 comments on commit df8a45b

Please sign in to comment.