forked from NeoGeographyToolkit/StereoPipeline
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build_vw_asp.csh
executable file
·125 lines (85 loc) · 1.97 KB
/
build_vw_asp.csh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
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