Bugfix: SSL in credentials dialog
[phoros.git] / Makefile
blobe85627eac3e1a05551df61d6f371aa5c9012f90c
1 # PHOROS -- Photogrammetric Road Survey
2 # Copyright (C) 2010, 2011, 2012, 2015 Bert Burgemeister
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License along
15 # with this program; if not, write to the Free Software Foundation, Inc.,
16 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 LISP = $(shell test -x ../sbcl/bin/sbcl && echo ../sbcl/bin/sbcl || which sbcl)
19 LIBPHOML_DIR = phoml/lib
20 LIBPHOML = libphoml.so
21 OPENLAYERS_TARBALL = OpenLayers-2.10.tar.gz
22 PRISTINE_OPENLAYERS_DIR = OpenLayers-2.10
23 EXAMPLES_DIR = examples
24 ETC_DIR = etc
25 OPENLAYERS_DIR = ol #for compiled/shrunk OpenLayers
26 OPENLAYERS_CONFIG = phoros.cfg
27 OPENLAYERS_JS = ol/OpenLayers.js
28 OPENLAYERS_THEME = ol/theme
29 OPENLAYERS_IMG = ol/img
30 LOGO = public_html/phoros-logo-plain.png
31 BUTTON_IMAGE = public_html/phoros-logo-button.png
32 BACKGROUND_IMAGE = public_html/phoros-logo-background.png
33 CURSOR_IMAGE = public_html/phoros-cursor.png
34 FAVICON = public_html/favicon.ico
35 INDEX_HTML = public_html/index.html
36 PHOROS_HELP_HTML = public_html/phoros--help.html
37 DEPLOYMENT_HTML = public_html/deployment.html
38 PUBLIC_CSS = public_html/style.css
39 NOT_FOUND_HTML = public_html/404.html
40 PHOROS_VERSION = $(shell ./phoros --version)
41 LATEST_TAG = $(shell git describe)
42 MACHINE_TYPE = $(shell uname -m)
43 PHOROS_HELP_OUTPUT = phoros-help.txt
44 SOURCE = *.lisp *.asd Makefile
46 all : fasttrack phoros
48 phoros : $(SOURCE) photogrammetry_lib $(OPENLAYERS_JS) \
49 $(OPENLAYERS_THEME) $(OPENLAYERS_IMG) \
50 $(BACKGROUND_IMAGE) $(LOGO) $(FAVICON) $(CURSOR_IMAGE)
51 CC=gcc \
52 $(LISP) --lose-on-corruption \
53 --disable-ldb \
54 --dynamic-space-size 4096 \
55 --end-runtime-options \
56 --disable-debugger \
57 --eval '(progn (pushnew :build-phoros *features*) (load "make.lisp"))'
59 fasttrack : $(SOURCE) photogrammetry_lib \
60 $(BACKGROUND_IMAGE) $(LOGO) $(BUTTON_IMAGE)
61 CC=gcc \
62 $(LISP) --lose-on-corruption \
63 --disable-ldb \
64 --dynamic-space-size 4096 \
65 --end-runtime-options \
66 --disable-debugger \
67 --eval '(progn (pushnew :build-fasttrack *features*) (load "make.lisp"))'
69 $(OPENLAYERS_TARBALL) :
70 wget https://github.com/openlayers/openlayers/releases/download/release-2.10/$@
72 $(PRISTINE_OPENLAYERS_DIR)/lib/* : $(OPENLAYERS_TARBALL)
73 tar -xmzf $<
75 $(OPENLAYERS_JS) : $(PRISTINE_OPENLAYERS_DIR)/build/OpenLayers.js
76 mkdir -p $(OPENLAYERS_DIR) && cp $< $@
78 $(PRISTINE_OPENLAYERS_DIR)/build/OpenLayers.js : \
79 $(PRISTINE_OPENLAYERS_DIR)/lib/* $(OPENLAYERS_CONFIG)
80 cp $(OPENLAYERS_CONFIG) $(PRISTINE_OPENLAYERS_DIR)/build/ && \
81 cd $(PRISTINE_OPENLAYERS_DIR)/build && ./build.py $(OPENLAYERS_CONFIG)
82 ###### cd $(PRISTINE_OPENLAYERS_DIR)/build && ./build.py full.cfg
84 .INTERMEDIATE : $(PRISTINE_OPENLAYERS_DIR)/build/OpenLayers.js
86 $(OPENLAYERS_THEME) : $(PRISTINE_OPENLAYERS_DIR)/theme $(OPENLAYERS_JS)
87 cp -R $< $@
89 $(OPENLAYERS_IMG) : $(PRISTINE_OPENLAYERS_DIR)/img $(OPENLAYERS_JS)
90 cp -R $< $@
92 photogrammetry_lib :
93 cd phoml; $(MAKE)
95 public_html :
96 mkdir -p public_html
98 $(LOGO) : Makefile public_html
99 ! convert \
100 -size 113x125 xc:transparent \
101 -font Gentium \
102 -fill black \
103 -pointsize 200 -gravity center -draw "text 3,3 'Φ'" \
104 -pointsize 57 -gravity center -draw "text 23,2 'Σ'" \
105 $@ 2>&1 | grep convert:
106 $(BUTTON_IMAGE) : Makefile public_html
107 ! convert \
108 -size 113x125 xc:transparent \
109 -font Gentium \
110 -fill navy \
111 -pointsize 200 -gravity center -draw "text 3,3 'Φ'" \
112 -pointsize 57 -gravity center -draw "text 23,2 'Σ'" \
113 -resize 40% \
114 $@ 2>&1 | grep convert:
116 $(BACKGROUND_IMAGE) : Makefile public_html
117 ! convert \
118 -size 113x125 xc:transparent \
119 -font Gentium \
120 -fill "#f5f5f5" \
121 -pointsize 200 -gravity center -draw "text 3,3 'Φ'" \
122 -pointsize 57 -gravity center -draw "text 23,2 'Σ'" \
123 -resize 150% \
124 $@ 2>&1 | grep convert:
125 $(CURSOR_IMAGE) : Makefile public_html
126 ! convert \
127 -size 14x16 xc:transparent \
128 -font Gentium \
129 -fill Navy \
130 -pointsize 22 -gravity center -draw "text 0.21,1 'Φ'" \
131 -pointsize 7 -gravity center -draw "text 1.61,.1 'Σ'" \
132 $@ 2>&1 | grep convert:
133 # Font Gentium is in Debian package fonts-sil-gentium.
135 $(FAVICON) : favicon.png
136 icotool -c -o $@ $<
138 favicon.png : $(LOGO)
139 convert $< -resize 16x16 $@
141 .INTERMEDIATE : favicon.png
143 $(PHOROS_HELP_OUTPUT) : phoros
144 ./phoros --help > $@
146 .INTERMEDIATE : $(PHOROS_HELP_OUTPUT)
148 $(INDEX_HTML) : doc/index.org $(LOGO)
149 emacs --batch --visit=$< --eval '(progn (org-html-export-as-html) (write-file "../$@"))'
151 $(DEPLOYMENT_HTML) : doc/deployment.org $(LOGO)
152 emacs --batch --visit=$< --eval '(progn (org-html-export-as-html) (write-file "../$@"))'
154 $(PHOROS_HELP_HTML) : doc/phoros--help.org $(PHOROS_HELP_OUTPUT) $(LOGO)
155 emacs --batch --visit=$< --eval '(progn (org-html-export-as-html) (write-file "../$@"))'
157 $(PUBLIC_CSS) : doc/style.css public_html
158 cp $< $@
160 $(NOT_FOUND_HTML) : doc/404.org $(LOGO)
161 emacs --batch --visit=$< --eval '(progn (org-html-export-as-html) (write-file "../$@"))'
163 phoros-proper.tar :
164 git archive --prefix=phoros_$(LATEST_TAG)/ --output=$@ $(LATEST_TAG)
166 phoml.tar :
167 cd phoml \
168 && git archive --prefix=phoros_$(LATEST_TAG)/phoml/ --output=../$@ HEAD
170 .INTERMEDIATE : phoros-proper.tar phoml.tar
172 bin-tarball : phoros TimeSteps.history fasttrack README \
173 $(EXAMPLES_DIR) \
174 $(ETC_DIR) \
175 $(OPENLAYERS_DIR) \
176 $(BACKGROUND_IMAGE) $(LOGO) $(FAVICON) $(CURSOR_IMAGE) \
177 $(LIBPHOML_DIR)/$(LIBPHOML)
178 tar -cf - \
179 --transform='s,^,phoros_$(PHOROS_VERSION)/,' \
180 phoros TimeSteps.history fasttrack fasttrack.ui README \
181 $(EXAMPLES_DIR) \
182 $(ETC_DIR) \
183 $(OPENLAYERS_DIR) \
184 $(BACKGROUND_IMAGE) $(LOGO) $(FAVICON) $(CURSOR_IMAGE) \
185 $(BUTTON_IMAGE) \
186 --directory=$(LIBPHOML_DIR) $(LIBPHOML) \
187 | gzip -f \
188 > phoros_$(PHOROS_VERSION)_$(MACHINE_TYPE).tar.gz
190 src-tarball : phoros-proper.tar phoml.tar
191 tar --concatenate -f phoros_$(LATEST_TAG).tar $^ \
192 && gzip -f phoros_$(LATEST_TAG).tar
194 html : $(INDEX_HTML) $(DEPLOYMENT_HTML) $(PHOROS_HELP_HTML) $(PUBLIC_CSS) $(FAVICON) $(NOT_FOUND_HTML)
196 git-tag : phoros #tag name is :version string in phoros.asd
197 git tag -a $(PHOROS_VERSION) -m ""
199 clean :
200 rm -rf *.fasl *.log \
201 phoros phoros*.tar.gz \
202 fasttrack fasttrack.ui \
203 $(LOGO) $(BACKGROUND_IMAGE) $(FAVICON) $(CURSOR_IMAGE) \
204 $(BUTTON_IMAGE) \
205 $(PHOROS_HELP_OUTPUT) \
206 $(INDEX_HTML) $(DEPLOYMENT_HTML) \
207 $(PUBLIC_CSS)
208 rm -rf $(OPENLAYERS_DIR) $(PRISTINE_OPENLAYERS_DIR)
209 cd phoml; $(MAKE) clean
212 .PHONY : bin-tarball src-tarball html git-tag clean
215 # Github
217 gh-publish:
218 rm -rf gh-pages
219 mkdir gh-pages
220 $(MAKE) gh-pages/index.html \
221 gh-pages/deployment.html \
222 gh-pages/phoros--help.html \
223 gh-pages/phoros-12.8.1.png \
224 gh-pages/phoros-logo-plain.png \
225 gh-pages/404.html \
226 gh-pages/CNAME \
227 gh-pages/README \
228 gh-pages/favicon.ico \
229 gh-pages/robots.txt \
230 gh-pages/style.css
231 cd gh-pages; git init; git add ./; git commit -a -m "gh-pages pseudo commit"; git push git@github.com:trebb/phoros.git +master:gh-pages
233 gh-pages/%.html: public_html/%.html
234 cp $< $@
236 gh-pages/favicon.ico: public_html/favicon.ico
237 cp $< $@
239 gh-pages/phoros-logo-plain.png: public_html/phoros-logo-plain.png
240 cp $< $@
242 gh-pages/%: doc/%
243 cp $< $@