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
22 OPENLAYERS_TARBALL
= OpenLayers-2.10.
tar.gz
23 PRISTINE_OPENLAYERS_DIR
= OpenLayers-2.10
24 EXAMPLES_DIR
= examples
26 OPENLAYERS_DIR
= ol
#for compiled/shrunk OpenLayers
27 OPENLAYERS_CONFIG
= phoros.cfg
28 OPENLAYERS_JS
= ol
/OpenLayers.js
29 OPENLAYERS_THEME
= ol
/theme
30 OPENLAYERS_IMG
= ol
/img
31 LOGO
= public_html
/phoros-logo-plain.png
32 BUTTON_IMAGE
= public_html
/phoros-logo-button.png
33 BACKGROUND_IMAGE
= public_html
/phoros-logo-background.png
34 CURSOR_IMAGE
= public_html
/phoros-cursor.png
35 FAVICON
= public_html
/favicon.ico
36 INDEX_HTML
= public_html
/index.html
37 PHOROS_HELP_HTML
= public_html
/phoros--help.html
38 DEPLOYMENT_HTML
= public_html
/deployment.html
39 PUBLIC_CSS
= public_html
/style.css
40 NOT_FOUND_HTML
= public_html
/404.html
41 PHOROS_VERSION
= $(shell .
/phoros
--version
)
42 LATEST_TAG
= $(shell git describe
)
43 MACHINE_TYPE
= $(shell uname
-m
)
44 PHOROS_HELP_OUTPUT
= phoros-help.txt
45 SOURCE
= *.lisp
*.asd Makefile
47 all : fasttrack phoros
49 phoros
: $(SOURCE
) photogrammetry_lib
$(OPENLAYERS_JS
) \
50 $(OPENLAYERS_THEME
) $(OPENLAYERS_IMG
) \
51 $(BACKGROUND_IMAGE
) $(LOGO
) $(FAVICON
) $(CURSOR_IMAGE
) \
54 $(LISP
) --lose-on-corruption \
56 --dynamic-space-size
4096 \
57 --end-runtime-options \
59 --eval
'(progn (pushnew :build-phoros *features*) (load "make.lisp"))'
61 fasttrack
: $(SOURCE
) photogrammetry_lib \
62 $(BACKGROUND_IMAGE
) $(LOGO
) $(BUTTON_IMAGE
)
64 $(LISP
) --lose-on-corruption \
66 --dynamic-space-size
4096 \
67 --end-runtime-options \
69 --eval
'(progn (pushnew :build-fasttrack *features*) (load "make.lisp"))'
71 $(OPENLAYERS_TARBALL
) :
72 wget https
://github.com
/openlayers
/openlayers
/releases
/download
/release-2.10
/$@
74 $(PRISTINE_OPENLAYERS_DIR
)/lib
/* : $(OPENLAYERS_TARBALL
)
77 $(OPENLAYERS_JS
) : $(PRISTINE_OPENLAYERS_DIR
)/build
/OpenLayers.js
78 mkdir
-p
$(OPENLAYERS_DIR
) && cp
$< $@
80 $(PRISTINE_OPENLAYERS_DIR
)/build
/OpenLayers.js
: \
81 $(PRISTINE_OPENLAYERS_DIR
)/lib
/* $(OPENLAYERS_CONFIG
)
82 cp
$(OPENLAYERS_CONFIG
) $(PRISTINE_OPENLAYERS_DIR
)/build
/ && \
83 cd
$(PRISTINE_OPENLAYERS_DIR
)/build
&& .
/build.py
$(OPENLAYERS_CONFIG
)
84 ###### cd $(PRISTINE_OPENLAYERS_DIR)/build && ./build.py full.cfg
86 .INTERMEDIATE
: $(PRISTINE_OPENLAYERS_DIR
)/build
/OpenLayers.js
88 $(OPENLAYERS_THEME
) : $(PRISTINE_OPENLAYERS_DIR
)/theme
$(OPENLAYERS_JS
)
91 $(OPENLAYERS_IMG
) : $(PRISTINE_OPENLAYERS_DIR
)/img
$(OPENLAYERS_JS
)
100 $(LOGO
) : Makefile public_html
102 -size
113x125 xc
:transparent \
105 -pointsize
200 -gravity center
-draw
"text 3,3 'Φ'" \
106 -pointsize
57 -gravity center
-draw
"text 23,2 'Σ'" \
107 $@
2>&1 | grep convert
:
108 $(BUTTON_IMAGE
) : Makefile public_html
110 -size
113x125 xc
:transparent \
113 -pointsize
200 -gravity center
-draw
"text 3,3 'Φ'" \
114 -pointsize
57 -gravity center
-draw
"text 23,2 'Σ'" \
116 $@
2>&1 | grep convert
:
118 $(BACKGROUND_IMAGE
) : Makefile public_html
120 -size
113x125 xc
:transparent \
123 -pointsize
200 -gravity center
-draw
"text 3,3 'Φ'" \
124 -pointsize
57 -gravity center
-draw
"text 23,2 'Σ'" \
126 $@
2>&1 | grep convert
:
127 $(CURSOR_IMAGE
) : Makefile public_html
129 -size
14x16 xc
:transparent \
132 -pointsize
22 -gravity center
-draw
"text 0.21,1 'Φ'" \
133 -pointsize
7 -gravity center
-draw
"text 1.61,.1 'Σ'" \
134 $@
2>&1 | grep convert
:
135 # Font Gentium is in Debian package fonts-sil-gentium.
137 $(FAVICON
) : favicon.png
140 favicon.png
: $(LOGO
)
141 convert
$< -resize
16x16
$@
143 .INTERMEDIATE
: favicon.png
145 $(PHOROS_HELP_OUTPUT
) : phoros
148 .INTERMEDIATE
: $(PHOROS_HELP_OUTPUT
)
150 $(INDEX_HTML
) : doc
/index.org
$(LOGO
)
151 emacs
--batch
--visit
=$< --eval
'(progn (org-html-export-as-html) (write-file "../$@"))'
153 $(DEPLOYMENT_HTML
) : doc
/deployment.org
$(LOGO
)
154 emacs
--batch
--visit
=$< --eval
'(progn (org-html-export-as-html) (write-file "../$@"))'
156 $(PHOROS_HELP_HTML
) : doc
/phoros--help.org
$(PHOROS_HELP_OUTPUT
) $(LOGO
)
157 emacs
--batch
--visit
=$< --eval
'(progn (org-html-export-as-html) (write-file "../$@"))'
159 $(PUBLIC_CSS
) : doc
/style.css public_html
162 $(NOT_FOUND_HTML
) : doc
/404.org
$(LOGO
)
163 emacs
--batch
--visit
=$< --eval
'(progn (org-html-export-as-html) (write-file "../$@"))'
166 git archive
--prefix=phoros_
$(LATEST_TAG
)/ --output
=$@
$(LATEST_TAG
)
170 && git archive
--prefix=phoros_
$(LATEST_TAG
)/phoml
/ --output
=..
/$@ HEAD
172 .INTERMEDIATE
: phoros-proper.
tar phoml.
tar
174 bin-tarball
: phoros TimeSteps.history fasttrack README \
178 $(BACKGROUND_IMAGE
) $(LOGO
) $(FAVICON
) $(CURSOR_IMAGE
) \
179 $(LIBPHOML_DIR
)/$(LIBPHOML
) \
182 --transform
='s,^,phoros_$(PHOROS_VERSION)/,' \
183 phoros TimeSteps.history fasttrack fasttrack.ui README \
187 $(BACKGROUND_IMAGE
) $(LOGO
) $(FAVICON
) $(CURSOR_IMAGE
) \
190 --directory
=$(LIBPHOML_DIR
) $(LIBPHOML
) \
192 > phoros_
$(PHOROS_VERSION
)_
$(MACHINE_TYPE
).
tar.gz
194 src-tarball
: phoros-proper.
tar phoml.
tar
195 tar --concatenate
-f phoros_
$(LATEST_TAG
).
tar $^ \
196 && gzip
-f phoros_
$(LATEST_TAG
).
tar
198 html
: $(INDEX_HTML
) $(DEPLOYMENT_HTML
) $(PHOROS_HELP_HTML
) $(PUBLIC_CSS
) $(FAVICON
) $(NOT_FOUND_HTML
)
200 git-tag
: phoros
#tag name is :version string in phoros.asd
201 git tag
-a
$(PHOROS_VERSION
) -m
""
203 imread
: imread.c Makefile
#for debugging
204 gcc imread.c
-O2
-o imread
`pkg-config --cflags --libs libpng` -lm
206 $(LIBIMREAD
) : imread.c Makefile
207 gcc
-fpic
-shared
-O2
-o imread.so
`pkg-config --cflags --libs libpng` -lm imread.c
210 rm -rf
*.fasl
*.log \
211 phoros phoros
*.
tar.gz \
212 fasttrack fasttrack.ui \
213 $(LIBIMREAD
) imread \
214 $(LOGO
) $(BACKGROUND_IMAGE
) $(FAVICON
) $(CURSOR_IMAGE
) \
216 $(PHOROS_HELP_OUTPUT
) \
217 $(INDEX_HTML
) $(DEPLOYMENT_HTML
) \
219 rm -rf
$(OPENLAYERS_DIR
) $(PRISTINE_OPENLAYERS_DIR
)
220 cd phoml
; $(MAKE
) clean
223 .PHONY
: bin-tarball src-tarball html git-tag
clean
231 $(MAKE
) gh-pages
/index.html \
232 gh-pages
/deployment.html \
233 gh-pages
/phoros--help.html \
234 gh-pages
/phoros-12.8
.1.png \
235 gh-pages
/phoros-logo-plain.png \
239 gh-pages
/favicon.ico \
240 gh-pages
/robots.txt \
242 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
244 gh-pages
/%.html
: public_html
/%.html
247 gh-pages
/favicon.ico
: public_html
/favicon.ico
250 gh-pages
/phoros-logo-plain.png
: public_html
/phoros-logo-plain.png