1 # PHOROS -- Photogrammetric Road Survey
2 # Copyright (C) 2010, 2011 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
24 OPENLAYERS_DIR
= ol
#for compiled/shrunk OpenLayers
25 OPENLAYERS_CONFIG
= phoros.cfg
26 OPENLAYERS_JS
= ol
/OpenLayers.js
27 OPENLAYERS_THEME
= ol
/theme
28 OPENLAYERS_IMG
= ol
/img
29 LOGO
= public_html
/phoros-logo-plain.png
30 BACKGROUND_IMAGE
= public_html
/phoros-logo-background.png
31 CURSOR_IMAGE
= public_html
/phoros-cursor.png
32 FAVICON
= public_html
/favicon.ico
33 INDEX_HTML
= public_html
/index.html
34 PHOROS_HELP_HTML
= public_html
/phoros--help.html
35 DEPLOYMENT_HTML
= public_html
/deployment.html
36 PUBLIC_CSS
= public_html
/style.css
37 NOT_FOUND_HTML
= public_html
/404.html
38 PHOROS_VERSION
= $(shell .
/phoros
--version
)
39 LATEST_TAG
= $(shell git tag | tail
-n
1)
40 MACHINE_TYPE
= $(shell uname
-m
)
41 PHOROS_HELP_OUTPUT
= phoros-help.txt
42 SOURCE
= *.lisp
*.asd Makefile
44 phoros
: $(SOURCE
) photogrammetry_lib
$(OPENLAYERS_JS
) \
45 $(OPENLAYERS_THEME
) $(OPENLAYERS_IMG
) \
46 $(BACKGROUND_IMAGE
) $(LOGO
) $(FAVICON
) $(CURSOR_IMAGE
)
48 $(LISP
) --lose-on-corruption \
50 --dynamic-space-size
4096 \
51 --end-runtime-options \
55 $(OPENLAYERS_TARBALL
) :
56 wget http
://openlayers.org
/download
/$@
58 $(PRISTINE_OPENLAYERS_DIR
)/lib
/* : $(OPENLAYERS_TARBALL
)
61 $(OPENLAYERS_JS
) : $(PRISTINE_OPENLAYERS_DIR
)/build
/OpenLayers.js
62 mkdir
-p
$(OPENLAYERS_DIR
) && cp
$< $@
64 $(PRISTINE_OPENLAYERS_DIR
)/build
/OpenLayers.js
: \
65 $(PRISTINE_OPENLAYERS_DIR
)/lib
/* $(OPENLAYERS_CONFIG
)
66 cp
$(OPENLAYERS_CONFIG
) $(PRISTINE_OPENLAYERS_DIR
)/build
/ && \
67 cd
$(PRISTINE_OPENLAYERS_DIR
)/build
&& .
/build.py
$(OPENLAYERS_CONFIG
)
68 ###### cd $(PRISTINE_OPENLAYERS_DIR)/build && ./build.py full.cfg
70 .INTERMEDIATE
: $(PRISTINE_OPENLAYERS_DIR
)/build
/OpenLayers.js
72 $(OPENLAYERS_THEME
) : $(PRISTINE_OPENLAYERS_DIR
)/theme
$(OPENLAYERS_JS
)
75 $(OPENLAYERS_IMG
) : $(PRISTINE_OPENLAYERS_DIR
)/img
$(OPENLAYERS_JS
)
84 $(LOGO
) : Makefile public_html
86 -size
113x125 xc
:transparent \
87 -font Gentium-Regular \
89 -pointsize
200 -gravity center
-draw
"text 3,3 'Φ'" \
90 -pointsize
57 -gravity center
-draw
"text 23,2 'Σ'" \
91 $@
2>&1 | grep convert
:
93 $(BACKGROUND_IMAGE
) : Makefile public_html
95 -size
113x125 xc
:transparent \
96 -font Gentium-Regular \
98 -pointsize
200 -gravity center
-draw
"text 3,3 'Φ'" \
99 -pointsize
57 -gravity center
-draw
"text 23,2 'Σ'" \
101 $@
2>&1 | grep convert
:
102 $(CURSOR_IMAGE
) : Makefile public_html
104 -size
14x16 xc
:transparent \
105 -font Gentium-Regular \
107 -pointsize
22 -gravity center
-draw
"text 0.21,1 'Φ'" \
108 -pointsize
7 -gravity center
-draw
"text 1.61,.1 'Σ'" \
109 $@
2>&1 | grep convert
:
110 # Font Gentium-Regular is in Debian package ttf-sil-gentium.
112 $(FAVICON
) : favicon.png
115 favicon.png
: $(LOGO
)
116 convert
$< -resize
16x16
$@
118 .INTERMEDIATE
: favicon.png
120 $(PHOROS_HELP_OUTPUT
) : phoros
123 .INTERMEDIATE
: $(PHOROS_HELP_OUTPUT
)
125 $(INDEX_HTML
) : doc
/index.org
$(LOGO
)
126 emacs
--batch
--visit
=$< --funcall org-export-as-html-batch \
127 && mv doc
/index.html
$@
129 $(DEPLOYMENT_HTML
) : doc
/deployment.org
$(LOGO
)
130 emacs
--batch
--visit
=$< --funcall org-export-as-html-batch \
131 && mv doc
/deployment.html
$@
133 $(PHOROS_HELP_HTML
) : doc
/phoros--help.org
$(PHOROS_HELP_OUTPUT
) $(LOGO
)
134 emacs
--batch
--visit
=$< --funcall org-export-as-html-batch \
135 && mv doc
/phoros--help.html
$@
137 $(PUBLIC_CSS
) : doc
/style.css public_html
140 $(NOT_FOUND_HTML
) : doc
/404.org
$(LOGO
)
141 emacs
--batch
--visit
=$< --funcall org-export-as-html-batch \
142 && mv doc
/404.html
$@
145 git archive
--prefix=phoros_
$(LATEST_TAG
)/ --output
=$@
$(LATEST_TAG
)
149 && git archive
--prefix=phoros_
$(LATEST_TAG
)/phoml
/ --output
=..
/$@ HEAD
151 .INTERMEDIATE
: phoros-proper.
tar phoml.
tar
153 bin-tarball
: phoros TimeSteps.history README \
156 $(BACKGROUND_IMAGE
) $(LOGO
) $(FAVICON
) $(CURSOR_IMAGE
) \
157 $(LIBPHOML_DIR
)/$(LIBPHOML
)
159 --transform
='s,^,phoros_$(PHOROS_VERSION)/,' \
160 phoros TimeSteps.history README \
163 $(BACKGROUND_IMAGE
) $(LOGO
) $(FAVICON
) $(CURSOR_IMAGE
) \
164 --directory
=$(LIBPHOML_DIR
) $(LIBPHOML
) \
166 > phoros_
$(PHOROS_VERSION
)_
$(MACHINE_TYPE
).
tar.gz
168 src-tarball
: phoros-proper.
tar phoml.
tar
169 tar --concatenate
-f phoros_
$(LATEST_TAG
).
tar $^ \
170 && gzip
-f phoros_
$(LATEST_TAG
).
tar
172 html
: $(INDEX_HTML
) $(DEPLOYMENT_HTML
) $(PHOROS_HELP_HTML
) $(PUBLIC_CSS
) $(FAVICON
) $(NOT_FOUND_HTML
)
174 git-tag
: phoros
#tag name is :version string in phoros.asd
175 git tag
-a
$(PHOROS_VERSION
) -m
""
178 rm -f
*.fasl
*.log phoros phoros
*.
tar.gz \
179 $(LOGO
) $(BACKGROUND_IMAGE
) $(FAVICON
) $(CURSOR_IMAGE
) \
180 $(PHOROS_HELP_OUTPUT
) \
181 $(INDEX_HTML
) $(DEPLOYMENT_HTML
) \
183 rm -rf
$(OPENLAYERS_DIR
) $(PRISTINE_OPENLAYERS_DIR
)
184 cd phoml
; $(MAKE
) clean
187 .PHONY
: bin-tarball src-tarball html git-tag
clean
195 $(MAKE
) gh-pages
/index.html \
196 gh-pages
/deployment.html \
197 gh-pages
/phoros--help.html \
198 gh-pages
/phoros-12.8
.1.png \
202 gh-pages
/favicon.ico \
203 gh-pages
/robots.txt \
205 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
207 gh-pages
/%.html
: public_html
/%.html
210 gh-pages
/favicon.ico
: public_html
/favicon.ico