Skip to content

Commit

Permalink
Added make file commands so it's possible to 'build' and SRTM object …
Browse files Browse the repository at this point in the history
…from the command like. i.e. make N15W088.hgt.zip
  • Loading branch information
rbdavison committed Feb 1, 2011
1 parent 95d17d0 commit 78507bb
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -26,6 +26,7 @@
/conf/conf.xml.20*
/conf/control_panel.xml
/conf/%gconf.xml
/conf/srtm_data/*

# /doc/pprz_algebra/
/doc/pprz_algebra/headfile.log
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Expand Up @@ -241,3 +241,9 @@ paparazzi:
sw/simulator/launchsitl:
cat src/$(@F) | sed s#OCAMLRUN#$(OCAMLRUN)# | sed s#OCAML#$(OCAML)# > $@
chmod a+x $@

#.SUFFIXES: .hgt.zip

%.hgt.zip:
cd data/srtm; $(MAKE) $(@)

31 changes: 31 additions & 0 deletions data/srtm/Makefile
@@ -0,0 +1,31 @@
DATADIR = $(PAPARAZZI_HOME)/conf/srtm_data
Q=@

SRTMData: $(DATADIR)/Africa $(DATADIR)/Australia $(DATADIR)/Eurasia $(DATADIR)/Islands $(DATADIR)/North_America $(DATADIR)/South_America

$(DATADIR):
mkdir $(DATADIR)

$(DATADIR)/Africa: $(DATADIR)
wget -O $(@) http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/$(@F)

$(DATADIR)/Australia: $(DATADIR)
wget -O $(@) http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/$(@F)

$(DATADIR)/Eurasia: $(DATADIR)
wget -O $(@) http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/$(@F)

$(DATADIR)/Islands: $(DATADIR)
wget -O $(@) http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/$(@F)

$(DATADIR)/North_America: $(DATADIR)
wget -O $(@) http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/$(@F)

$(DATADIR)/South_America: $(DATADIR)
wget -O $(@) http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/$(@F)

.SUFFIXES: .hgt.zip

%.hgt.zip: SRTMData
$(Q)wget -c -nv -N http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/$(shell grep -l $(@F) $(DATADIR)/* | sed -e s#$(DATADIR)/##)/$(@F)

0 comments on commit 78507bb

Please sign in to comment.