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
)
47 $(LISP
) --lose-on-corruption
--disable-ldb
--end-runtime-options \
48 --disable-debugger
--load make.lisp
50 $(OPENLAYERS_TARBALL
) :
51 wget http
://openlayers.org
/download
/$@
53 $(PRISTINE_OPENLAYERS_DIR
)/lib
/* : $(OPENLAYERS_TARBALL
)
56 $(OPENLAYERS_JS
) : $(PRISTINE_OPENLAYERS_DIR
)/build
/OpenLayers.js
57 mkdir
-p
$(OPENLAYERS_DIR
) && cp
$< $@
59 $(PRISTINE_OPENLAYERS_DIR
)/build
/OpenLayers.js
: \
60 $(PRISTINE_OPENLAYERS_DIR
)/lib
/* $(OPENLAYERS_CONFIG
)
61 cp
$(OPENLAYERS_CONFIG
) $(PRISTINE_OPENLAYERS_DIR
)/build
/ && \
62 cd
$(PRISTINE_OPENLAYERS_DIR
)/build
&& .
/build.py
$(OPENLAYERS_CONFIG
)
63 ###### cd $(PRISTINE_OPENLAYERS_DIR)/build && ./build.py full.cfg
65 .INTERMEDIATE
: $(PRISTINE_OPENLAYERS_DIR
)/build
/OpenLayers.js
67 $(OPENLAYERS_THEME
) : $(PRISTINE_OPENLAYERS_DIR
)/theme
$(OPENLAYERS_JS
)
70 $(OPENLAYERS_IMG
) : $(PRISTINE_OPENLAYERS_DIR
)/img
$(OPENLAYERS_JS
)
79 $(LOGO
) : Makefile public_html
81 -size
113x125 xc
:transparent \
82 -font Gentium-Regular \
84 -pointsize
200 -gravity center
-draw
"text 3,3 'Φ'" \
85 -pointsize
57 -gravity center
-draw
"text 23,2 'Σ'" \
86 $@
2>&1 | grep convert
:
88 $(BACKGROUND_IMAGE
) : Makefile public_html
90 -size
113x125 xc
:transparent \
91 -font Gentium-Regular \
93 -pointsize
200 -gravity center
-draw
"text 3,3 'Φ'" \
94 -pointsize
57 -gravity center
-draw
"text 23,2 'Σ'" \
96 $@
2>&1 | grep convert
:
97 $(CURSOR_IMAGE
) : Makefile public_html
99 -size
14x16 xc
:transparent \
100 -font Gentium-Regular \
102 -pointsize
22 -gravity center
-draw
"text 0.21,1 'Φ'" \
103 -pointsize
7 -gravity center
-draw
"text 1.61,.1 'Σ'" \
104 $@
2>&1 | grep convert
:
105 # Font Gentium-Regular is in Debian package ttf-sil-gentium.
107 $(FAVICON
) : favicon.png
110 favicon.png
: $(LOGO
)
111 convert
$< -resize
16x16
$@
113 .INTERMEDIATE
: favicon.png
115 $(PHOROS_HELP_OUTPUT
) : phoros
118 .INTERMEDIATE
: $(PHOROS_HELP_OUTPUT
)
120 $(INDEX_HTML
) : doc
/index.org
$(LOGO
)
121 emacs
--batch
--visit
=$< --funcall org-export-as-html-batch \
122 && mv doc
/index.html
$@
124 $(DEPLOYMENT_HTML
) : doc
/deployment.org
$(LOGO
)
125 emacs
--batch
--visit
=$< --funcall org-export-as-html-batch \
126 && mv doc
/deployment.html
$@
128 $(PHOROS_HELP_HTML
) : doc
/phoros--help.org
$(PHOROS_HELP_OUTPUT
) $(LOGO
)
129 emacs
--batch
--visit
=$< --funcall org-export-as-html-batch \
130 && mv doc
/phoros--help.html
$@
132 $(PUBLIC_CSS
) : doc
/style.css public_html
135 $(NOT_FOUND_HTML
) : doc
/404.org
$(LOGO
)
136 emacs
--batch
--visit
=$< --funcall org-export-as-html-batch \
137 && mv doc
/404.html
$@
140 git archive
--prefix=phoros_
$(LATEST_TAG
)/ --output
=$@
$(LATEST_TAG
)
144 && git archive
--prefix=phoros_
$(LATEST_TAG
)/phoml
/ --output
=..
/$@ HEAD
146 .INTERMEDIATE
: phoros-proper.
tar phoml.
tar
148 bin-tarball
: phoros TimeSteps.history README \
151 $(BACKGROUND_IMAGE
) $(LOGO
) $(FAVICON
) $(CURSOR_IMAGE
) \
152 $(LIBPHOML_DIR
)/$(LIBPHOML
)
154 --transform
='s,^,phoros_$(PHOROS_VERSION)/,' \
155 phoros TimeSteps.history README \
158 $(BACKGROUND_IMAGE
) $(LOGO
) $(FAVICON
) $(CURSOR_IMAGE
) \
159 --directory
=$(LIBPHOML_DIR
) $(LIBPHOML
) \
161 > phoros_
$(PHOROS_VERSION
)_
$(MACHINE_TYPE
).
tar.gz
163 src-tarball
: phoros-proper.
tar phoml.
tar
164 tar --concatenate
-f phoros_
$(LATEST_TAG
).
tar $^ \
165 && gzip
-f phoros_
$(LATEST_TAG
).
tar
167 html
: $(INDEX_HTML
) $(DEPLOYMENT_HTML
) $(PHOROS_HELP_HTML
) $(PUBLIC_CSS
) $(FAVICON
) $(NOT_FOUND_HTML
)
169 git-tag
: phoros
#tag name is :version string in phoros.asd
170 git tag
-a
$(PHOROS_VERSION
) -m
""
173 rm -f
*.fasl
*.log phoros phoros
*.
tar.gz \
174 $(LOGO
) $(BACKGROUND_IMAGE
) $(FAVICON
) $(CURSOR_IMAGE
) \
175 $(PHOROS_HELP_OUTPUT
) \
176 $(INDEX_HTML
) $(DEPLOYMENT_HTML
) \
178 rm -rf
$(OPENLAYERS_DIR
) $(PRISTINE_OPENLAYERS_DIR
)
179 cd phoml
; $(MAKE
) clean
182 .PHONY
: bin-tarball src-tarball html git-tag
clean
190 $(MAKE
) gh-pages
/index.html \
191 gh-pages
/deployment.html \
192 gh-pages
/phoros--help.html \
193 gh-pages
/phoros-12.8
.1.png \
197 gh-pages
/favicon.ico \
198 gh-pages
/robots.txt \
200 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
202 gh-pages
/%.html
: public_html
/%.html
205 gh-pages
/favicon.ico
: public_html
/favicon.ico