1 # PHOROS -- Photogrammetric Road Survey
2 # Copyright (C) 2010, 2011, 2012, 2015, 2017 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 LIBIMREAD
= libimread.so
22 CCFLAGS
= -std
=c99
-Wall
-Wextra
-pedantic
-O2
23 OPENLAYERS_TARBALL
= OpenLayers-2.10.
tar.gz
24 PRISTINE_OPENLAYERS_DIR
= OpenLayers-2.10
25 EXAMPLES_DIR
= examples
27 OPENLAYERS_DIR
= ol
#for compiled/shrunk OpenLayers
28 OPENLAYERS_CONFIG
= phoros.cfg
29 OPENLAYERS_JS
= ol
/OpenLayers.js
30 OPENLAYERS_THEME
= ol
/theme
31 OPENLAYERS_IMG
= ol
/img
32 LOGO
= public_html
/phoros-logo-plain.png
33 BUTTON_IMAGE
= public_html
/phoros-logo-button.png
34 BACKGROUND_IMAGE
= public_html
/phoros-logo-background.png
35 CURSOR_IMAGE
= public_html
/phoros-cursor.png
36 FAVICON
= public_html
/favicon.ico
37 INDEX_HTML
= public_html
/index.html
38 PHOROS_HELP_HTML
= public_html
/phoros--help.html
39 DEPLOYMENT_HTML
= public_html
/deployment.html
40 PUBLIC_CSS
= public_html
/style.css
41 NOT_FOUND_HTML
= public_html
/404.html
42 PHOROS_VERSION
= $(shell .
/phoros
--version
)
43 LATEST_TAG
= $(shell git describe
)
44 MACHINE_TYPE
= $(shell uname
-m
)
45 PHOROS_HELP_OUTPUT
= phoros-help.txt
46 SOURCE
= *.lisp
*.asd Makefile
48 all : fasttrack phoros
50 phoros
: $(SOURCE
) photogrammetry_lib
$(OPENLAYERS_JS
) \
51 $(OPENLAYERS_THEME
) $(OPENLAYERS_IMG
) \
52 $(BACKGROUND_IMAGE
) $(LOGO
) $(FAVICON
) $(CURSOR_IMAGE
) \
55 $(LISP
) --lose-on-corruption \
57 --dynamic-space-size
8192 \
58 --end-runtime-options \
60 --eval
'(progn (pushnew :build-phoros *features*) (load "make.lisp"))'
62 fasttrack
: $(SOURCE
) photogrammetry_lib \
63 $(BACKGROUND_IMAGE
) $(LOGO
) $(BUTTON_IMAGE
)
65 $(LISP
) --lose-on-corruption \
67 --dynamic-space-size
4096 \
68 --end-runtime-options \
70 --eval
'(progn (pushnew :build-fasttrack *features*) (load "make.lisp"))'
72 $(OPENLAYERS_TARBALL
) :
73 wget https
://github.com
/openlayers
/openlayers
/releases
/download
/release-2.10
/$@
75 $(PRISTINE_OPENLAYERS_DIR
)/lib
/* : $(OPENLAYERS_TARBALL
)
78 $(OPENLAYERS_JS
) : $(PRISTINE_OPENLAYERS_DIR
)/build
/OpenLayers.js
79 mkdir
-p
$(OPENLAYERS_DIR
) && cp
$< $@
81 $(PRISTINE_OPENLAYERS_DIR
)/build
/OpenLayers.js
: \
82 $(PRISTINE_OPENLAYERS_DIR
)/lib
/* $(OPENLAYERS_CONFIG
)
83 cp
$(OPENLAYERS_CONFIG
) $(PRISTINE_OPENLAYERS_DIR
)/build
/ && \
84 cd
$(PRISTINE_OPENLAYERS_DIR
)/build
&& .
/build.py
$(OPENLAYERS_CONFIG
)
85 ###### cd $(PRISTINE_OPENLAYERS_DIR)/build && ./build.py full.cfg
87 .INTERMEDIATE
: $(PRISTINE_OPENLAYERS_DIR
)/build
/OpenLayers.js
89 $(OPENLAYERS_THEME
) : $(PRISTINE_OPENLAYERS_DIR
)/theme
$(OPENLAYERS_JS
)
92 $(OPENLAYERS_IMG
) : $(PRISTINE_OPENLAYERS_DIR
)/img
$(OPENLAYERS_JS
)
101 $(LOGO
) : Makefile public_html
103 -size
113x125 xc
:transparent \
106 -pointsize
200 -gravity center
-draw
"text 3,3 'Φ'" \
107 -pointsize
57 -gravity center
-draw
"text 23,2 'Σ'" \
108 $@
2>&1 | grep convert
:
109 $(BUTTON_IMAGE
) : Makefile public_html
111 -size
113x125 xc
:transparent \
114 -pointsize
200 -gravity center
-draw
"text 3,3 'Φ'" \
115 -pointsize
57 -gravity center
-draw
"text 23,2 'Σ'" \
117 $@
2>&1 | grep convert
:
119 $(BACKGROUND_IMAGE
) : Makefile public_html
121 -size
113x125 xc
:transparent \
124 -pointsize
200 -gravity center
-draw
"text 3,3 'Φ'" \
125 -pointsize
57 -gravity center
-draw
"text 23,2 'Σ'" \
127 $@
2>&1 | grep convert
:
128 $(CURSOR_IMAGE
) : Makefile public_html
130 -size
14x16 xc
:transparent \
133 -pointsize
22 -gravity center
-draw
"text 0.21,1 'Φ'" \
134 -pointsize
7 -gravity center
-draw
"text 1.61,.1 'Σ'" \
135 $@
2>&1 | grep convert
:
136 # Font Gentium is in Debian package fonts-sil-gentium.
138 $(FAVICON
) : favicon.png
141 favicon.png
: $(LOGO
)
142 convert
$< -resize
16x16
$@
144 .INTERMEDIATE
: favicon.png
146 $(PHOROS_HELP_OUTPUT
) : phoros
149 .INTERMEDIATE
: $(PHOROS_HELP_OUTPUT
)
151 $(INDEX_HTML
) : doc
/index.org
$(LOGO
)
152 emacs
--batch
--visit
=$< --eval
'(progn (org-html-export-as-html) (write-file "../$@"))'
154 $(DEPLOYMENT_HTML
) : doc
/deployment.org
$(LOGO
)
155 emacs
--batch
--visit
=$< --eval
'(progn (org-html-export-as-html) (write-file "../$@"))'
157 $(PHOROS_HELP_HTML
) : doc
/phoros--help.org
$(PHOROS_HELP_OUTPUT
) $(LOGO
)
158 emacs
--batch
--visit
=$< --eval
'(progn (org-html-export-as-html) (write-file "../$@"))'
160 $(PUBLIC_CSS
) : doc
/style.css public_html
163 $(NOT_FOUND_HTML
) : doc
/404.org
$(LOGO
)
164 emacs
--batch
--visit
=$< --eval
'(progn (org-html-export-as-html) (write-file "../$@"))'
167 git archive
--prefix=phoros_
$(LATEST_TAG
)/ --output
=$@
$(LATEST_TAG
)
171 && git archive
--prefix=phoros_
$(LATEST_TAG
)/phoml
/ --output
=..
/$@ HEAD
173 .INTERMEDIATE
: phoros-proper.
tar phoml.
tar
175 bin-tarball
: phoros TimeSteps.history fasttrack README \
179 $(BACKGROUND_IMAGE
) $(LOGO
) $(FAVICON
) $(CURSOR_IMAGE
) \
180 $(LIBPHOML_DIR
)/$(LIBPHOML
) \
183 --transform
='s,^,phoros_$(PHOROS_VERSION)/,' \
184 phoros TimeSteps.history fasttrack fasttrack.ui README \
188 $(BACKGROUND_IMAGE
) $(LOGO
) $(FAVICON
) $(CURSOR_IMAGE
) \
191 --directory
=$(LIBPHOML_DIR
) $(LIBPHOML
) \
193 > phoros_
$(PHOROS_VERSION
)_
$(MACHINE_TYPE
).
tar.gz
195 src-tarball
: phoros-proper.
tar phoml.
tar
196 tar --concatenate
-f phoros_
$(LATEST_TAG
).
tar $^ \
197 && gzip
-f phoros_
$(LATEST_TAG
).
tar
199 html
: $(INDEX_HTML
) $(DEPLOYMENT_HTML
) $(PHOROS_HELP_HTML
) $(PUBLIC_CSS
) $(FAVICON
) $(NOT_FOUND_HTML
)
201 git-tag
: phoros
#tag name is :version string in phoros.asd
202 git tag
-a
$(PHOROS_VERSION
) -m
""
204 imreadtest
: imreadtest.c
$(LIBIMREAD
) Makefile
#for debugging
205 gcc
$(CCFLAGS
) imreadtest.c
-o imreadtest \
206 `pkg-config --cflags --libs libpng libjpeg` -lm \
207 -L.
/ -limread
-Wl
,-rpath
,"./"
209 $(LIBIMREAD
) : imread.c imread.h Makefile
210 gcc
$(CCFLAGS
) -fpic
-shared
-o libimread.so \
211 `pkg-config --cflags --libs libpng libjpeg` -lm imread.c
214 rm -rf
*.fasl
*.log \
215 phoros phoros
*.
tar.gz \
216 fasttrack fasttrack.ui \
217 $(LIBIMREAD
) imreadtest \
218 $(LOGO
) $(BACKGROUND_IMAGE
) $(FAVICON
) $(CURSOR_IMAGE
) \
220 $(PHOROS_HELP_OUTPUT
) \
221 $(INDEX_HTML
) $(DEPLOYMENT_HTML
) \
223 rm -rf
$(OPENLAYERS_DIR
) $(PRISTINE_OPENLAYERS_DIR
)
224 cd phoml
; $(MAKE
) clean
227 .PHONY
: bin-tarball src-tarball html git-tag
clean
235 $(MAKE
) gh-pages
/index.html \
236 gh-pages
/deployment.html \
237 gh-pages
/phoros--help.html \
238 gh-pages
/phoros-12.8
.1.png \
239 gh-pages
/phoros-logo-plain.png \
243 gh-pages
/favicon.ico \
244 gh-pages
/robots.txt \
246 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
248 gh-pages
/%.html
: public_html
/%.html
251 gh-pages
/favicon.ico
: public_html
/favicon.ico
254 gh-pages
/phoros-logo-plain.png
: public_html
/phoros-logo-plain.png