1 # PHOROS -- Photogrammetric Road Survey
2 # Copyright (C) 2010, 2011, 2012 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 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
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 BACKGROUND_IMAGE
= public_html
/phoros-logo-background.png
32 CURSOR_IMAGE
= public_html
/phoros-cursor.png
33 FAVICON
= public_html
/favicon.ico
34 INDEX_HTML
= public_html
/index.html
35 PHOROS_HELP_HTML
= public_html
/phoros--help.html
36 DEPLOYMENT_HTML
= public_html
/deployment.html
37 PUBLIC_CSS
= public_html
/style.css
38 NOT_FOUND_HTML
= public_html
/404.html
39 PHOROS_VERSION
= $(shell .
/phoros
--version
)
40 LATEST_TAG
= $(shell git describe
)
41 MACHINE_TYPE
= $(shell uname
-m
)
42 PHOROS_HELP_OUTPUT
= phoros-help.txt
43 SOURCE
= *.lisp
*.asd Makefile
45 phoros
: $(SOURCE
) photogrammetry_lib
$(OPENLAYERS_JS
) \
46 $(OPENLAYERS_THEME
) $(OPENLAYERS_IMG
) \
47 $(BACKGROUND_IMAGE
) $(LOGO
) $(FAVICON
) $(CURSOR_IMAGE
)
49 $(LISP
) --lose-on-corruption \
51 --dynamic-space-size
4096 \
52 --end-runtime-options \
56 $(OPENLAYERS_TARBALL
) :
57 wget http
://openlayers.org
/download
/$@
59 $(PRISTINE_OPENLAYERS_DIR
)/lib
/* : $(OPENLAYERS_TARBALL
)
62 $(OPENLAYERS_JS
) : $(PRISTINE_OPENLAYERS_DIR
)/build
/OpenLayers.js
63 mkdir
-p
$(OPENLAYERS_DIR
) && cp
$< $@
65 $(PRISTINE_OPENLAYERS_DIR
)/build
/OpenLayers.js
: \
66 $(PRISTINE_OPENLAYERS_DIR
)/lib
/* $(OPENLAYERS_CONFIG
)
67 cp
$(OPENLAYERS_CONFIG
) $(PRISTINE_OPENLAYERS_DIR
)/build
/ && \
68 cd
$(PRISTINE_OPENLAYERS_DIR
)/build
&& .
/build.py
$(OPENLAYERS_CONFIG
)
69 ###### cd $(PRISTINE_OPENLAYERS_DIR)/build && ./build.py full.cfg
71 .INTERMEDIATE
: $(PRISTINE_OPENLAYERS_DIR
)/build
/OpenLayers.js
73 $(OPENLAYERS_THEME
) : $(PRISTINE_OPENLAYERS_DIR
)/theme
$(OPENLAYERS_JS
)
76 $(OPENLAYERS_IMG
) : $(PRISTINE_OPENLAYERS_DIR
)/img
$(OPENLAYERS_JS
)
85 $(LOGO
) : Makefile public_html
87 -size
113x125 xc
:transparent \
88 -font Gentium-Regular \
90 -pointsize
200 -gravity center
-draw
"text 3,3 'Φ'" \
91 -pointsize
57 -gravity center
-draw
"text 23,2 'Σ'" \
92 $@
2>&1 | grep convert
:
94 $(BACKGROUND_IMAGE
) : Makefile public_html
96 -size
113x125 xc
:transparent \
97 -font Gentium-Regular \
99 -pointsize
200 -gravity center
-draw
"text 3,3 'Φ'" \
100 -pointsize
57 -gravity center
-draw
"text 23,2 'Σ'" \
102 $@
2>&1 | grep convert
:
103 $(CURSOR_IMAGE
) : Makefile public_html
105 -size
14x16 xc
:transparent \
106 -font Gentium-Regular \
108 -pointsize
22 -gravity center
-draw
"text 0.21,1 'Φ'" \
109 -pointsize
7 -gravity center
-draw
"text 1.61,.1 'Σ'" \
110 $@
2>&1 | grep convert
:
111 # Font Gentium-Regular is in Debian package ttf-sil-gentium.
113 $(FAVICON
) : favicon.png
116 favicon.png
: $(LOGO
)
117 convert
$< -resize
16x16
$@
119 .INTERMEDIATE
: favicon.png
121 $(PHOROS_HELP_OUTPUT
) : phoros
124 .INTERMEDIATE
: $(PHOROS_HELP_OUTPUT
)
126 $(INDEX_HTML
) : doc
/index.org
$(LOGO
)
127 emacs
--batch
--visit
=$< --funcall org-export-as-html-batch \
128 && mv doc
/index.html
$@
130 $(DEPLOYMENT_HTML
) : doc
/deployment.org
$(LOGO
)
131 emacs
--batch
--visit
=$< --funcall org-export-as-html-batch \
132 && mv doc
/deployment.html
$@
134 $(PHOROS_HELP_HTML
) : doc
/phoros--help.org
$(PHOROS_HELP_OUTPUT
) $(LOGO
)
135 emacs
--batch
--visit
=$< --funcall org-export-as-html-batch \
136 && mv doc
/phoros--help.html
$@
138 $(PUBLIC_CSS
) : doc
/style.css public_html
141 $(NOT_FOUND_HTML
) : doc
/404.org
$(LOGO
)
142 emacs
--batch
--visit
=$< --funcall org-export-as-html-batch \
143 && mv doc
/404.html
$@
146 git archive
--prefix=phoros_
$(LATEST_TAG
)/ --output
=$@
$(LATEST_TAG
)
150 && git archive
--prefix=phoros_
$(LATEST_TAG
)/phoml
/ --output
=..
/$@ HEAD
152 .INTERMEDIATE
: phoros-proper.
tar phoml.
tar
154 bin-tarball
: phoros TimeSteps.history README \
158 $(BACKGROUND_IMAGE
) $(LOGO
) $(FAVICON
) $(CURSOR_IMAGE
) \
159 $(LIBPHOML_DIR
)/$(LIBPHOML
)
161 --transform
='s,^,phoros_$(PHOROS_VERSION)/,' \
162 phoros TimeSteps.history README \
166 $(BACKGROUND_IMAGE
) $(LOGO
) $(FAVICON
) $(CURSOR_IMAGE
) \
167 --directory
=$(LIBPHOML_DIR
) $(LIBPHOML
) \
169 > phoros_
$(PHOROS_VERSION
)_
$(MACHINE_TYPE
).
tar.gz
171 src-tarball
: phoros-proper.
tar phoml.
tar
172 tar --concatenate
-f phoros_
$(LATEST_TAG
).
tar $^ \
173 && gzip
-f phoros_
$(LATEST_TAG
).
tar
175 html
: $(INDEX_HTML
) $(DEPLOYMENT_HTML
) $(PHOROS_HELP_HTML
) $(PUBLIC_CSS
) $(FAVICON
) $(NOT_FOUND_HTML
)
177 git-tag
: phoros
#tag name is :version string in phoros.asd
178 git tag
-a
$(PHOROS_VERSION
) -m
""
181 rm -f
*.fasl
*.log phoros phoros
*.
tar.gz \
182 $(LOGO
) $(BACKGROUND_IMAGE
) $(FAVICON
) $(CURSOR_IMAGE
) \
183 $(PHOROS_HELP_OUTPUT
) \
184 $(INDEX_HTML
) $(DEPLOYMENT_HTML
) \
186 rm -rf
$(OPENLAYERS_DIR
) $(PRISTINE_OPENLAYERS_DIR
)
187 cd phoml
; $(MAKE
) clean
190 .PHONY
: bin-tarball src-tarball html git-tag
clean
198 $(MAKE
) gh-pages
/index.html \
199 gh-pages
/deployment.html \
200 gh-pages
/phoros--help.html \
201 gh-pages
/phoros-12.8
.1.png \
205 gh-pages
/favicon.ico \
206 gh-pages
/robots.txt \
208 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
210 gh-pages
/%.html
: public_html
/%.html
213 gh-pages
/favicon.ico
: public_html
/favicon.ico