-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathmakefile
111 lines (93 loc) · 3.54 KB
/
makefile
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
#sectional, enroute, tac, wac, heli, grand_canyon
CHARTTYPE = tac
ORIGINALDIR =./original
LINKDIR =./sourceRasters/$(CHARTTYPE)
SHAPEDIR =./clippingShapes/$(CHARTTYPE)
EXPANDEDDIR =./expandedRasters/$(CHARTTYPE)
WARPEDDIR =./warpedRasters/$(CHARTTYPE)
CLIPPEDDIR =./clippedRasters/$(CHARTTYPE)
MBTILESDIR =./mbtiles/$(CHARTTYPE)
#Root directory of where the aeronav charts are mirrored to
chartsRoot=/media/sf_Shared_Folder/charts/
#Where the original .tif files of various types are from aeronav
originalHeliDirectory="$(chartsRoot)/aeronav.faa.gov/content/aeronav/heli_files/"
originalTacDirectory="$(chartsRoot)/aeronav.faa.gov/content/aeronav/tac_files/"
originalWacDirectory="$(chartsRoot)/aeronav.faa.gov/content/aeronav/wac_files/"
originalSectionalDirectory="$(chartsRoot)/aeronav.faa.gov/content/aeronav/sectional_files/"
originalGrandCanyonDirectory="$(chartsRoot)/aeronav.faa.gov/content/aeronav/grand_canyon_files/"
originalEnrouteDirectory="$(chartsRoot)/aeronav.faa.gov/enroute/01-08-2015/"
#Root of directories where our processed images etc will be saved
destinationRoot=/home/jlmcgraw/Documents/myPrograms/mergedCharts
LINKS = $(wildcard $(LINKDIR)/*.tif)
SHAPES = $(patsubst $(LINKDIR)/%.tif,$(SHAPEDIR)/%.shp,$(LINKS))
EXPANDED = $(patsubst $(LINKDIR)/%.tif,$(EXPANDEDDIR)/%.tif,$(LINKS))
WARPED = $(patsubst $(LINKDIR)/%.tif,$(WARPEDDIR)/%.tif,$(LINKS))
CLIPPED = $(patsubst $(LINKDIR)/%.tif,$(CLIPPEDDIR)/%.tif,$(LINKS))
MBTILES = $(patsubst $(LINKDIR)/%.tif,$(MBTILESDIR)/%.mbtiles,$(LINKS))
all: FRESHEN LINKS $(MBTILES) ALLCHARTS
# @echo $(LINKS)
# @echo $(SHAPES)
# @echo $(EXPANDED)
# @echo $(CLIPPED)
$(MBTILES): $(MBTILESDIR)/%.mbtiles: $(CLIPPEDDIR)/%.tif
@echo Build MBTILE: $@
@echo Changed Dendencies: $?
@echo Current Dependency: $<
# touch $@
# rm $@
#@echo ./enroute.sh $(originalEnrouteDirectory) $(destinationRoot) $@
@echo ----------------------------------------------------------------------------------------
$(CLIPPED): $(CLIPPEDDIR)/%.tif: $(SHAPEDIR)/%.shp $(WARPEDDIR)/%.tif
# $(CLIPPED): $(SHAPES) $(EXPANDED)
@echo Build CLIPPED: $@
@echo Changed Dendencies: $?
@echo Current Dependency: $<
# touch $@
# rm $@
#@echo ./enroute.sh $(originalEnrouteDirectory) $(destinationRoot) $@
@echo ----------------------------------------------------------------------------------------
$(WARPED): $(WARPEDDIR)/%.tif: $(LINKDIR)/%.tif
# $(EXPANDED): $(LINKDIR)/%.tif
@echo Build WARP: $@
@echo Changed Dendencies: $?
@echo Current Dependency: $<
#BUG TODO Enroute charts don't have to be expanded
# rm $@
@echo ./warpClip.sh
$(EXPANDED): $(EXPANDEDDIR)/%.tif: $(LINKDIR)/%.tif
# $(EXPANDED): $(LINKDIR)/%.tif
@echo Build EXPAND: $@
@echo Changed Dendencies: $?
@echo Current Dependency: $<
#BUG TODO Enroute charts don't have to be expanded
@echo ./translateExpand.sh
@echo rm $@
$(SHAPES): $(SHAPEDIR)/%.shp: $(LINKDIR)/%.tif
@echo Build SHAPE: $@
@echo Changed Dendencies: $?
@echo Current Dependency: $<
# touch $@
$(LINKS):
@echo Build LINK: $@
@echo Changed Dendencies: $?
@echo Current Dependency: $<
# @touch $@
FRESHEN:
# ./freshenLocalCharts.sh $(chartsRoot)
LINKS:
# ./updateLinks.sh $(originalEnrouteDirectory) $(destinationRoot) $(CHARTTYPE)
ALLCHARTS:
# ./allcharts.sh
# .PHONY: $(SHAPES) $(LINKS)
# $(CLIPPEDDIR)/%.tif: $(SHAPEDIR)/%.shp $(EXPANDEDDIR)/%.tif
# # $(CC) -c -o $@ $< $(CFLAGS)
# echo $@ $< $
# echo $(LINKS)
# echo $(SHAPES)
# hellomake: $(OBJ)
# gcc -o $@ $^ $(CFLAGS) $(LIBS)
#
# .PHONY: clean
#
# clean:
# rm -f $(ODIR)/*.o *~ core $(INCDIR)/*~