Routino SVN Repository Browser

Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino

ViewVC logotype

Annotation of /branches/libroutino/src/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1738 - (hide annotations) (download)
Thu Jul 9 19:01:12 2015 UTC (9 years, 8 months ago) by amb
File size: 7168 byte(s)
Update the library and include a version of the router program that
uses the libroutino shared library for calculating routes.  Currently
generates output files of all types and accepts but ignores all
options to change this.

1 amb 333 # Source code Makefile
2 amb 2 #
3 amb 151 # Part of the Routino routing software.
4 amb 2 #
5 amb 1680 # This file Copyright 2008-2015 Andrew M. Bishop
6 amb 151 #
7     # This program is free software: you can redistribute it and/or modify
8     # it under the terms of the GNU Affero General Public License as published by
9     # the Free Software Foundation, either version 3 of the License, or
10     # (at your option) any later version.
11     #
12     # This program is distributed in the hope that it will be useful,
13     # but WITHOUT ANY WARRANTY; without even the implied warranty of
14     # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15     # GNU Affero General Public License for more details.
16     #
17     # You should have received a copy of the GNU Affero General Public License
18     # along with this program. If not, see <http://www.gnu.org/licenses/>.
19     #
20 amb 2
21 amb 1343 # All configuration is in the top-level Makefile.conf
22 amb 476
23 amb 1343 include ../Makefile.conf
24 amb 476
25 amb 1343 # Debugging options
26 amb 2
27 amb 1319 #CFLAGS+=-O0 -g
28 amb 887 #CFLAGS+=-pg
29     #CFLAGS+=-fprofile-arcs -ftest-coverage
30 amb 240
31 amb 887 #LDFLAGS+=-pg -static
32     #LDFLAGS+=-fprofile-arcs -ftest-coverage
33 amb 240
34 amb 1343 # Sub-directories and sub-makefiles
35 amb 991
36 amb 1343 SUBFILES=$(wildcard */Makefile)
37     SUBDIRS=$(foreach f,$(SUBFILES),$(dir $f))
38 amb 1194
39 amb 2 # Compilation targets
40    
41     C=$(wildcard *.c)
42 amb 884 D=$(wildcard .deps/*.d)
43 amb 2
44 amb 1738 EXE=planetsplitter planetsplitter-slim router router-slim filedumperx filedumper filedumper-slim \
45     router+lib router+lib-slim
46 amb 333
47 amb 1715 LIB=libroutino.so libroutino-slim.so
48    
49 amb 2 ########
50    
51 amb 1343 all: all-local
52     for dir in $(SUBDIRS); do \
53     ( cd $$dir && $(MAKE) $@ ); \
54     done
55    
56 amb 1715 all-local: $(EXE) $(LIB)
57 amb 2
58     ########
59    
60 amb 161 PLANETSPLITTER_OBJ=planetsplitter.o \
61 amb 949 nodesx.o segmentsx.o waysx.o relationsx.o superx.o prunex.o \
62 amb 365 ways.o types.o \
63 amb 1319 files.o logging.o logerror.o errorlogx.o \
64 amb 333 results.o queue.o sorting.o \
65 amb 1227 xmlparse.o tagging.o \
66     uncompress.o osmxmlparse.o osmpbfparse.o osmo5mparse.o osmparser.o
67 amb 2
68 amb 1699 ifdef MINGW
69     PLANETSPLITTER_OBJ+=mman-win32.o
70     endif
71    
72 amb 910 planetsplitter : $(PLANETSPLITTER_OBJ)
73 amb 2 $(LD) $(PLANETSPLITTER_OBJ) -o $@ $(LDFLAGS)
74    
75     ########
76    
77 amb 452 PLANETSPLITTER_SLIM_OBJ=planetsplitter-slim.o \
78 amb 949 nodesx-slim.o segmentsx-slim.o waysx-slim.o relationsx-slim.o superx-slim.o prunex-slim.o \
79 amb 452 ways.o types.o \
80 amb 1319 files.o logging.o logerror-slim.o errorlogx-slim.o \
81 amb 452 results.o queue.o sorting.o \
82 amb 1227 xmlparse.o tagging.o \
83     uncompress.o osmxmlparse.o osmpbfparse.o osmo5mparse.o osmparser.o
84 amb 452
85 amb 1699 ifdef MINGW
86     PLANETSPLITTER_SLIM_OBJ+=mman-win32.o
87     endif
88    
89 amb 452 planetsplitter-slim : $(PLANETSPLITTER_SLIM_OBJ)
90     $(LD) $(PLANETSPLITTER_SLIM_OBJ) -o $@ $(LDFLAGS)
91    
92     ########
93    
94 amb 397 ROUTER_OBJ=router.o \
95 amb 542 nodes.o segments.o ways.o relations.o types.o fakes.o \
96 amb 453 optimiser.o output.o \
97 amb 519 files.o logging.o profiles.o xmlparse.o \
98 amb 453 results.o queue.o translations.o
99 amb 397
100 amb 1699 ifdef MINGW
101     ROUTER_OBJ+=mman-win32.o
102     endif
103    
104 amb 397 router : $(ROUTER_OBJ)
105     $(LD) $(ROUTER_OBJ) -o $@ $(LDFLAGS)
106    
107     ########
108    
109 amb 453 ROUTER_SLIM_OBJ=router-slim.o \
110 amb 697 nodes-slim.o segments-slim.o ways-slim.o relations-slim.o types.o fakes-slim.o \
111 amb 453 optimiser-slim.o output-slim.o \
112 amb 1296 files.o logging.o profiles.o xmlparse.o \
113 amb 453 results.o queue.o translations.o
114    
115 amb 1699 ifdef MINGW
116     ROUTER_SLIM_OBJ+=mman-win32.o
117     endif
118    
119 amb 453 router-slim : $(ROUTER_SLIM_OBJ)
120     $(LD) $(ROUTER_SLIM_OBJ) -o $@ $(LDFLAGS)
121    
122     ########
123    
124 amb 1149 FILEDUMPERX_OBJ=filedumperx.o \
125 amb 1166 files.o logging.o
126 amb 1149
127 amb 1699 ifdef MINGW
128     FILEDUMPERX_OBJ+=mman-win32.o
129     endif
130    
131 amb 1149 filedumperx : $(FILEDUMPERX_OBJ)
132     $(LD) $(FILEDUMPERX_OBJ) -o $@ $(LDFLAGS)
133    
134     ########
135    
136 amb 161 FILEDUMPER_OBJ=filedumper.o \
137 amb 1321 nodes.o segments.o ways.o relations.o types.o fakes.o errorlog.o \
138 amb 453 visualiser.o \
139 amb 519 files.o logging.o xmlparse.o
140 amb 2
141 amb 1699 ifdef MINGW
142     FILEDUMPER_OBJ+=mman-win32.o
143     endif
144    
145 amb 2 filedumper : $(FILEDUMPER_OBJ)
146     $(LD) $(FILEDUMPER_OBJ) -o $@ $(LDFLAGS)
147    
148     ########
149    
150 amb 453 FILEDUMPER_SLIM_OBJ=filedumper-slim.o \
151 amb 1321 nodes-slim.o segments-slim.o ways-slim.o relations-slim.o types.o fakes-slim.o errorlog-slim.o \
152 amb 1699 visualiser-slim.o \
153 amb 1296 files.o logging.o xmlparse.o
154 amb 453
155 amb 1699 ifdef MINGW
156     FILEDUMPER_SLIM_OBJ+=mman-win32.o
157     endif
158    
159 amb 453 filedumper-slim : $(FILEDUMPER_SLIM_OBJ)
160     $(LD) $(FILEDUMPER_SLIM_OBJ) -o $@ $(LDFLAGS)
161    
162     ########
163    
164 amb 910 %.o : %.c
165     @[ -d .deps ] || mkdir .deps
166 amb 1680 $(CC) -c $(CFLAGS) -DSLIM=0 -DROUTINO_DATADIR=\"$(datadir)\" $< -o $@ -MMD -MP -MF $(addprefix .deps/,$(addsuffix .d,$(basename $@)))
167 amb 2
168 amb 910 %-slim.o : %.c
169     @[ -d .deps ] || mkdir .deps
170 amb 1680 $(CC) -c $(CFLAGS) -DSLIM=1 -DROUTINO_DATADIR=\"$(datadir)\" $< -o $@ -MMD -MP -MF $(addprefix .deps/,$(addsuffix .d,$(basename $@)))
171 amb 452
172 amb 2 ########
173    
174 amb 1738 ROUTER_LIB_OBJ=router+lib.o
175    
176     router+lib : $(ROUTER_LIB_OBJ) -lroutino
177     $(LD) $(ROUTER_LIB_OBJ) -o $@ $(LDFLAGS) -L. -lroutino
178    
179     router+lib-slim : $(ROUTER_LIB_OBJ) -lroutino-slim
180     $(LD) $(ROUTER_LIB_OBJ) -o $@ $(LDFLAGS) -L. -lroutino-slim
181    
182     ########
183    
184 amb 1715 LIBROUTINO_OBJ=routino-lib.o \
185     nodes-lib.o segments-lib.o ways-lib.o relations-lib.o types-lib.o fakes-lib.o \
186     optimiser-lib.o output-lib.o \
187     files-lib.o profiles-lib.o xmlparse-lib.o \
188     results-lib.o queue-lib.o translations-lib.o
189    
190     ifdef MINGW
191     LIBROUTINO_OBJ+=mman-win32.o
192     endif
193    
194     libroutino.so : $(LIBROUTINO_OBJ)
195     $(LD) $(LIBROUTINO_OBJ) -o $@ $(LDFLAGS) $(LDFLAGS_LIB)
196    
197     ########
198    
199     LIBROUTINO_SLIM_OBJ=routino-slim-lib.o \
200     nodes-slim-lib.o segments-slim-lib.o ways-slim-lib.o relations-slim-lib.o types-lib.o fakes-slim-lib.o \
201     optimiser-slim-lib.o output-slim-lib.o \
202     files-lib.o profiles-lib.o xmlparse-lib.o \
203     results-lib.o queue-lib.o translations-lib.o
204    
205     ifdef MINGW
206     LIBROUTINO_SLIM_OBJ+=mman-win32.o
207     endif
208    
209     libroutino-slim.so : $(LIBROUTINO_SLIM_OBJ)
210     $(LD) $(LIBROUTINO_SLIM_OBJ) -o $@ $(LDFLAGS) $(LDFLAGS_LIB)
211    
212     ########
213    
214     %-lib.o : %.c
215     @[ -d .deps ] || mkdir .deps
216     $(CC) -c $(CFLAGS) $(CFLAGS_LIB) -DSLIM=0 -DLIBROUTINO $< -o $@ -MMD -MP -MF $(addprefix .deps/,$(addsuffix .d,$(basename $@)))
217    
218     %-slim-lib.o : %.c
219     @[ -d .deps ] || mkdir .deps
220     $(CC) -c $(CFLAGS) $(CFLAGS_LIB) -DSLIM=1 -DLIBROUTINO $< -o $@ -MMD -MP -MF $(addprefix .deps/,$(addsuffix .d,$(basename $@)))
221    
222     ########
223    
224 amb 1528 test: test-local
225 amb 1343 for dir in $(SUBDIRS); do \
226     ( cd $$dir && $(MAKE) $@ ); \
227     done
228 amb 862
229 amb 1528 test-local:
230    
231 amb 862 ########
232    
233 amb 1343 install: install-local
234     for dir in $(SUBDIRS); do \
235     ( cd $$dir && $(MAKE) $@ ); \
236     done
237    
238 amb 1455 install-local: all-local
239 amb 1523 @[ -d $(DESTDIR)$(bindir) ] || mkdir -p $(DESTDIR)$(bindir)
240     @for file in $(EXE); do \
241 amb 1699 if [ -f $$file ]; then \
242     echo cp $$file $(DESTDIR)$(bindir) ;\
243     cp -f $$file $(DESTDIR)$(bindir) ;\
244     fi ;\
245     if [ -f $$file.exe ]; then \
246     echo cp $$file.exe $(DESTDIR)$(bindir) ;\
247     cp -f $$file.exe $(DESTDIR)$(bindir) ;\
248     fi ;\
249 amb 1523 done
250 amb 476
251     ########
252    
253 amb 1343 clean: clean-local
254     for dir in $(SUBDIRS); do \
255     ( cd $$dir && $(MAKE) $@ ); \
256     done
257    
258     clean-local:
259 amb 1045 rm -f *~
260 amb 2 rm -f *.o
261 amb 1699 rm -f $(EXE) *.exe
262 amb 1715 rm -f $(LIB)
263 amb 1690 rm -f $(D)
264     rm -fr .deps
265 amb 1045 rm -f core
266 amb 859 rm -f *.gcda *.gcno *.gcov gmon.out
267 amb 2
268     ########
269    
270 amb 1528 distclean: distclean-local
271 amb 1343 for dir in $(SUBDIRS); do \
272     ( cd $$dir && $(MAKE) $@ ); \
273     done
274    
275 amb 1528 distclean-local: clean-local
276 amb 2
277     ########
278    
279     include $(D)
280    
281     ########
282    
283 amb 1343 .PHONY:: all test install clean distclean
284    
285 amb 1528 .PHONY:: all-local test-local install-local clean-local distclean-local

Properties

Name Value
cvs:description Makefile.