Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Have example makefiles use explicit path executables

If the user wants to use custom paths, they must define EXECDIR.
  • Loading branch information...
commit a05d6cf20815afd84853f6afaffa9de76b8e26da 1 parent f733b67
@zmoratto zmoratto authored
View
31 data/CTX/Makefile
@@ -1,6 +1,19 @@
# This is makefile to run the demo for MRO CTX of North Terra Meridiani
-STEREO = stereo
+# Users with custom paths must override this variable
+EXECDIR ?= ../../bin/
+
+# Executables
+ifeq ($(EXECDIR),)
+ EEXECDIR=
+else
+ EEXECDIR=../$(EXECDIR)
+endif
+STEREO = $(EXECDIR)stereo
+POINT2DEM = $(EEXECDIR)point2dem
+HILLSHADE = $(EEXECDIR)hillshade
+COLORMAP = $(EEXECDIR)colormap
+CAM2MAP4STEREO = $(EXECDIR)cam2map4stereo.py
all: nonmap/nonmap-DEM_CMAP.tif map/map-DEM_CMAP.tif
@@ -19,34 +32,34 @@ P03_002258_1817_XI_01N356W.IMG:
nonmapprojected: P02_001981_1823_XI_02N356W.cal.cub P03_002258_1817_XI_01N356W.cal.cub
mapprojected: nonmapprojected
- cam2map4stereo.py P02_001981_1823_XI_02N356W.cal.cub P03_002258_1817_XI_01N356W.cal.cub
+ $(CAM2MAP4STEREO) P02_001981_1823_XI_02N356W.cal.cub P03_002258_1817_XI_01N356W.cal.cub
map/map-PC.tif: mapprojected
$(STEREO) P02_001981_1823_XI_02N356W.map.cub P03_002258_1817_XI_01N356W.map.cub map/map -s stereo.map
map/map-DEM.tif: map/map-PC.tif
cd map; \
- point2dem -r mars --nodata -32767 map-PC.tif
+ $(POINT2DEM) -r mars --nodata -32767 map-PC.tif
map/map-DEM_CMAP.tif: map/map-DEM.tif
cd map; \
- hillshade map-DEM.tif; \
- colormap -s map-DEM_HILLSHADE.tif map-DEM.tif
+ $(HILLSHADE) map-DEM.tif; \
+ $(COLORMAP) -s map-DEM_HILLSHADE.tif map-DEM.tif
nonmap/nonmap-PC.tif: nonmapprojected
$(STEREO) P02_001981_1823_XI_02N356W.cal.cub P03_002258_1817_XI_01N356W.cal.cub nonmap/nonmap -s stereo.default
nonmap/nonmap-DEM.tif: nonmap/nonmap-PC.tif
cd nonmap; \
- point2dem -r mars --nodata -32767 nonmap-PC.tif
+ $(POINT2DEM) -r mars --nodata -32767 nonmap-PC.tif
nonmap/nonmap-DEM_CMAP.tif: nonmap/nonmap-DEM.tif
cd nonmap; \
- hillshade nonmap-DEM.tif; \
- colormap -s nonmap-DEM_HILLSHADE.tif nonmap-DEM.tif
+ $(HILLSHADE) nonmap-DEM.tif; \
+ $(COLORMAP) -s nonmap-DEM_HILLSHADE.tif nonmap-DEM.tif
clean:
rm -rf nonmap map *.vwip
distclean:
- rm -rf *.cub
+ rm -rf *.cub map *~ *.match
View
18 data/K10/Makefile
@@ -10,9 +10,21 @@
# features like image subsampling/mask generation should be shut
# off. Our image integer correlation also needs some fiddling.
+# Users with custom paths must override this variable
+EXECDIR ?= ../../bin/
+
+# Executables
+ifeq ($(EXECDIR),)
+ EEXECDIR=
+else
+ EEXECDIR=../$(EXECDIR)
+endif
+STEREO = $(EXECDIR)stereo
+DISPARITYDEBUG = $(EEXECDIR)disparitydebug
+POINT2MESH = $(EEXECDIR)point2mesh
+
RESULTSDIR = results
OUT = k10black
-STEREO = stereo
PREFIX = $(RESULTSDIR)/$(OUT)
all: $(PREFIX)-F-H.tif $(PREFIX).ive
@@ -22,10 +34,10 @@ $(PREFIX)-PC.tif:
$(STEREO) left4.png right4.png black_left.tsai black_right.tsai $(PREFIX)
$(PREFIX)-F-H.tif: $(PREFIX)-PC.tif
- cd $(RESULTSDIR); disparitydebug $(OUT)-F.tif
+ cd $(RESULTSDIR); $(DISPARITYDEBUG) $(OUT)-F.tif
$(PREFIX).ive: $(PREFIX)-PC.tif
- cd $(RESULTSDIR); point2mesh -s 1 $(OUT)-PC.tif $(OUT)-L.tif
+ cd $(RESULTSDIR); $(POINT2MESH) -s 1 $(OUT)-PC.tif $(OUT)-L.tif
clean:
rm -rf $(RESULTSDIR)
View
48 data/MER/Makefile
@@ -4,6 +4,20 @@
# Stereo from the Microscopic imager doesn't work unforunately because
# the CAHVOR is not modelling the variable focal length they're using.
+# Users with custom paths must override this variables
+EXECDIR ?= ../../bin/
+
+# Executables
+ifeq ($(EXECDIR),)
+ EEXECDIR=
+else
+ EEXECDIR=../$(EXECDIR)
+endif
+STEREO = $(EXECDIR)stereo
+DISPARITYDEBUG = $(EEXECDIR)disparitydebug
+POINT2MESH = $(EXECDIR)point2mesh
+MER2CAMERA = $(EXECDIR)mer2camera
+
# User interfaces
###############################################
@@ -22,55 +36,55 @@ mesh: pan01/pan01.ive nav01/nav01.ive mi01/mi01.ive fh01lin/fh01lin.ive fh01/fh0
gdal_translate -scale -ot byte $< $@
%.cahvor: %.img
- mer2camera $<
+ $(MER2CAMERA) $<
%.cahv: %.img
- mer2camera $<
+ $(MER2CAMERA) $<
%.cahvore: %.img
- mer2camera $<
+ $(MER2CAMERA) $<
pan01/pan01-PC.tif: imagery
- stereo 1p270664103esf90csp2566l2m1.tif 1p270664103esf90csp2566r2m1.tif 1p270664103esf90csp2566l2m1.cahvor 1p270664103esf90csp2566r2m1.cahvor pan01/pan01
+ $(STEREO) 1p270664103esf90csp2566l2m1.tif 1p270664103esf90csp2566r2m1.tif 1p270664103esf90csp2566l2m1.cahvor 1p270664103esf90csp2566r2m1.cahvor pan01/pan01
nav01/nav01-PC.tif: imagery
- stereo 1n270487304eff90cip1952l0m1.tif 1n270487304eff90cip1952r0m1.tif 1n270487304eff90cip1952l0m1.cahvor 1n270487304eff90cip1952r0m1.cahvor nav01/nav01
+ $(STEREO) 1n270487304eff90cip1952l0m1.tif 1n270487304eff90cip1952r0m1.tif 1n270487304eff90cip1952l0m1.cahvor 1n270487304eff90cip1952r0m1.cahvor nav01/nav01
mi01/mi01-PC.tif: imagery
- stereo 2m147677487eff8800p2976m2f1.tif 2m147677547eff8800p2976m2f1.tif 2m147677487eff8800p2976m2f1.cahvor 2m147677547eff8800p2976m2f1.cahvor mi01/mi01
+ $(STEREO) 2m147677487eff8800p2976m2f1.tif 2m147677547eff8800p2976m2f1.tif 2m147677487eff8800p2976m2f1.cahvor 2m147677547eff8800p2976m2f1.cahvor mi01/mi01
fh01lin/fh01lin-PC.tif: imagery
- stereo 2f194370083fflap00p1214r0m1.tif 2f194370083fflap00p1214l0m1.tif 2f194370083fflap00p1214r0m1.cahv 2f194370083fflap00p1214l0m1.cahv fh01lin/fh01lin
+ $(STEREO) 2f194370083fflap00p1214r0m1.tif 2f194370083fflap00p1214l0m1.tif 2f194370083fflap00p1214r0m1.cahv 2f194370083fflap00p1214l0m1.cahv fh01lin/fh01lin
fh01/fh01-PC.tif: imagery
- stereo 2f194370083effap00p1214l0m1.tif 2f194370083effap00p1214r0m1.tif 2f194370083effap00p1214l0m1.cahvore 2f194370083effap00p1214r0m1.cahvore fh01/fh01
+ $(STEREO) 2f194370083effap00p1214l0m1.tif 2f194370083effap00p1214r0m1.tif 2f194370083effap00p1214l0m1.cahvore 2f194370083effap00p1214r0m1.cahvore fh01/fh01
fh02/fh02-PC.tif: imagery
- stereo 2f191703508effanhep1110l0m1.tif 2f191703508effanhep1110r0m1.tif 2f191703508effanhep1110l0m1.cahvore 2f191703508effanhep1110r0m1.cahvore fh02/fh02
+ $(STEREO) 2f191703508effanhep1110l0m1.tif 2f191703508effanhep1110r0m1.tif 2f191703508effanhep1110l0m1.cahvore 2f191703508effanhep1110r0m1.cahvore fh02/fh02
rh01/rh01-PC.tif: imagery
- stereo 2r195521583effaq00p1301l0m1.tif 2r195521583effaq00p1301r0m1.tif 2r195521583effaq00p1301l0m1.cahvore 2r195521583effaq00p1301r0m1.cahvore rh01/rh01
+ $(STEREO) 2r195521583effaq00p1301l0m1.tif 2r195521583effaq00p1301r0m1.tif 2r195521583effaq00p1301l0m1.cahvore 2r195521583effaq00p1301r0m1.cahvore rh01/rh01
pan01/pan01.ive: pan01/pan01-PC.tif
- point2mesh -s 1 -l pan01/pan01-PC.tif pan01/pan01-L.tif
+ $(POINT2MESH) -s 1 -l pan01/pan01-PC.tif pan01/pan01-L.tif
nav01/nav01.ive: nav01/nav01-PC.tif
- point2mesh -s 1 -l nav01/nav01-PC.tif nav01/nav01-L.tif
+ $(POINT2MESH) -s 1 -l nav01/nav01-PC.tif nav01/nav01-L.tif
mi01/mi01.ive: mi01/mi01-PC.tif
- point2mesh -s 1 -l mi01/mi01-PC.tif mi01/mi01-L.tif
+ $(POINT2MESH) -s 1 -l mi01/mi01-PC.tif mi01/mi01-L.tif
fh01lin/fh01lin.ive: fh01lin/fh01lin-PC.tif
- point2mesh -s 1 -l fh01lin/fh01lin-PC.tif fh01lin/fh01lin-L.tif
+ $(POINT2MESH) -s 1 -l fh01lin/fh01lin-PC.tif fh01lin/fh01lin-L.tif
fh01/fh01.ive: fh01/fh01-PC.tif
- point2mesh -s 1 -l fh01/fh01-PC.tif fh01/fh01-L.tif
+ $(POINT2MESH) -s 1 -l fh01/fh01-PC.tif fh01/fh01-L.tif
fh02/fh02.ive: fh02/fh02-PC.tif
- point2mesh -s 1 -l fh02/fh02-PC.tif fh02/fh02-L.tif
+ $(POINT2MESH) -s 1 -l fh02/fh02-PC.tif fh02/fh02-L.tif
rh01/rh01.ive: rh01/rh01-PC.tif
- point2mesh -s 1 -l rh01/rh01-PC.tif rh01/rh01-L.tif
+ $(POINT2MESH) -s 1 -l rh01/rh01-PC.tif rh01/rh01-L.tif
# Downloading data
##############################################
View
54 data/MOC/Makefile
@@ -1,9 +1,27 @@
# This Makefile executes the steps detailed in Chapter 3 of the
# Stereo Pipeline Users' Guide
+# Users with custom paths must override this variable
+EXECDIR ?= ../../bin/
+
+# Executables
+ifeq ($(EXECDIR),)
+ EEXECDIR=
+else
+ EEXECDIR=../$(EXECDIR)
+endif
+STEREO = $(EXECDIR)stereo
+IMAGE2QTREE = $(EXECDIR)image2qtree
+POINT2DEM = $(EEXECDIR)point2dem
+ORTHOPROJECT = $(EEXECDIR)orthoproject
+HILLSHADE = $(EEXECDIR)hillshade
+COLORMAP = $(EEXECDIR)colormap
+DISPARITYDEBUG = $(EEXECDIR)disparitydebug
+POINT2MESH = $(EEXECDIR)point2mesh
+
+# Output variables
RESULTSDIR = results
OUT = E0201461-M0100115
-STEREO = stereo
MAPPED = E0201461.map.cub M0100115.map.cub
PREFIX = $(RESULTSDIR)/$(OUT)
POINTCLOUD = $(PREFIX)-PC.tif
@@ -26,41 +44,37 @@ E0201461.map.cub: E0201461.cub M0100115.map.cub
cam2map from=E0201461.cub to=E0201461.map.cub map=M0100115.map.cub matchmap=true
M0100115.map/M0100115.kml: M0100115.map.cub
- image2qtree -m kml --normalize $<
+ $(IMAGE2QTREE) -m kml --normalize $<
E0201461.map/E0201461.kml: E0201461.map.cub
- image2qtree -m kml --normalize $<
+ $(IMAGE2QTREE) -m kml --normalize $<
$(POINTCLOUD): $(MAPPED)
mkdir -p $(RESULTSDIR)
$(STEREO) $(MAPPED) $(RESULTSDIR)/$(OUT)
$(PREFIX)-F-H.tif: $(POINTCLOUD)
- cd $(RESULTSDIR); disparitydebug $(OUT)-F.tif
+ cd $(RESULTSDIR); $(DISPARITYDEBUG) $(OUT)-F.tif
$(PREFIX).ive: $(POINTCLOUD)
- cd $(RESULTSDIR); point2mesh $(OUT)-PC.tif $(OUT)-L.tif
+ cd $(RESULTSDIR); $(POINT2MESH) $(OUT)-PC.tif $(OUT)-L.tif
$(PREFIX)-DRG.tif: $(POINTCLOUD)
- cd $(RESULTSDIR); \
- point2dem -r mars --orthoimage $(OUT)-L.tif $(OUT)-PC.tif;
+ cd $(RESULTSDIR); $(POINT2DEM) -r mars --orthoimage $(OUT)-L.tif $(OUT)-PC.tif;
$(PREFIX)-DEM.tif: $(POINTCLOUD)
- cd $(RESULTSDIR); \
- point2dem -r mars -n --nodata -32767 $(OUT)-PC.tif;
+ cd $(RESULTSDIR); $(POINT2DEM) -r mars -n --nodata -32767 $(OUT)-PC.tif;
$(PREFIX)-OrthoR.tif: $(PREFIX)-DEM.tif
- cd $(RESULTSDIR); \
- orthoproject $(OUT)-DEM.tif ../M0100115.cub $(OUT)-OrthoR.tif;
+ cd $(RESULTSDIR); $(ORTHOPROJECT) $(OUT)-DEM.tif ../M0100115.cub $(OUT)-OrthoR.tif;
$(PREFIX)-OrthoL.tif: $(PREFIX)-DEM.tif
- cd $(RESULTSDIR); \
- orthoproject $(OUT)-DEM.tif ../E0201461.cub $(OUT)-OrthoL.tif;
+ cd $(RESULTSDIR); $(ORTHOPROJECT) $(OUT)-DEM.tif ../E0201461.cub $(OUT)-OrthoL.tif;
$(PREFIX)-DEM_CMAP.tif: $(PREFIX)-DEM.tif
cd $(RESULTSDIR); \
- hillshade $(OUT)-DEM.tif; \
- colormap -s $(OUT)-DEM_HILLSHADE.tif $(OUT)-DEM.tif
+ $(HILLSHADE) $(OUT)-DEM.tif; \
+ $(COLORMAP) -s $(OUT)-DEM_HILLSHADE.tif $(OUT)-DEM.tif
products_map: $(PREFIX)-F-H.tif $(PREFIX).ive $(PREFIX)-DRG.tif $(PREFIX)-OrthoL.tif $(PREFIX)-OrthoR.tif E0201461.map/E0201461.kml M0100115.map/M0100115.kml $(PREFIX)-DEM_CMAP.tif
@@ -69,20 +83,20 @@ $(POINTCLOUDU): $(UNMAPPED)
$(STEREO) $(UNMAPPED) $(RESULTSDIRU)/$(OUT) -s stereo.unmapped
$(PREFIXU).ive: $(POINTCLOUDU)
- cd $(RESULTSDIRU); point2mesh $(OUT)-PC.tif $(OUT)-L.tif
+ cd $(RESULTSDIRU); $(POINT2MESH) $(OUT)-PC.tif $(OUT)-L.tif
$(PREFIXU)-DRG.tif: $(POINTCLOUDU)
cd $(RESULTSDIRU); \
- point2dem -r mars --orthoimage $(OUT)-L.tif $(OUT)-PC.tif;
+ $(POINT2DEM) -r mars --orthoimage $(OUT)-L.tif $(OUT)-PC.tif;
$(PREFIXU)-DEM.tif: $(POINTCLOUDU)
cd $(RESULTSDIRU); \
- point2dem -r mars -n --nodata -32767 $(OUT)-PC.tif;
+ $(POINT2DEM) -r mars -n --nodata -32767 $(OUT)-PC.tif;
$(PREFIXU)-DEM_CMAP.tif: $(PREFIXU)-DEM.tif
cd $(RESULTSDIRU); \
- hillshade $(OUT)-DEM.tif; \
- colormap -s $(OUT)-DEM_HILLSHADE.tif $(OUT)-DEM.tif
+ $(HILLSHADE) $(OUT)-DEM.tif; \
+ $(COLORMAP) -s $(OUT)-DEM_HILLSHADE.tif $(OUT)-DEM.tif
products_unmap: $(PREFIXU).ive $(PREFIXU)-DRG.tif $(PREFIXU)-DEM_CMAP.tif
Please sign in to comment.
Something went wrong with that request. Please try again.