Routino SVN Repository Browser

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

ViewVC logotype

Contents of /trunk/src/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1313 - (show annotations) (download)
Sat May 11 18:14:38 2013 UTC (11 years, 10 months ago) by amb
File size: 5688 byte(s)
Create a binary log file that contains the node, way and relation id and a link
to the error message for easy parsing.

1 # Source code Makefile
2 #
3 # Part of the Routino routing software.
4 #
5 # This file Copyright 2008-2013 Andrew M. Bishop
6 #
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
21 # Web file paths
22
23 WEBDIR=../web/bin
24
25 # Compilation programs
26
27 CC=gcc
28 LD=gcc
29
30 # Compilation program options
31
32 CFLAGS=-Wall -Wmissing-prototypes -std=c99
33 CFLAGS+=-Wextra -Wno-unused-parameter
34 #CFLAGS+=-pedantic
35
36 LDFLAGS=-lm
37
38 CFLAGS+=-O3
39 #CFLAGS+=-O0 -g
40 #CFLAGS+=-pg
41 #CFLAGS+=-fprofile-arcs -ftest-coverage
42
43 #LDFLAGS+=-pg -static
44 #LDFLAGS+=-fprofile-arcs -ftest-coverage
45
46 # Required for multi-threaded support
47 CFLAGS+=-pthread -DUSE_PTHREADS
48 LDFLAGS+=-pthread -lpthread
49
50 # Required for bzip2 support
51 CFLAGS+=-DUSE_BZIP2
52 LDFLAGS+=-lbz2
53
54 # Required for gzip support
55 CFLAGS+=-DUSE_GZIP
56 LDFLAGS+=-lz
57
58 # Required to use stdio with files > 2GiB on 32-bit system.
59 CFLAGS+=-D_FILE_OFFSET_BITS=64
60
61 # Required to compile on Linux without a warning about pread() and pwrite() functions.
62 CFLAGS+=-D_POSIX_C_SOURCE=200809L
63
64 # Compilation targets
65
66 C=$(wildcard *.c)
67 D=$(wildcard .deps/*.d)
68
69 EXE=planetsplitter planetsplitter-slim router router-slim filedumperx filedumper filedumper-slim tagmodifier
70
71 ########
72
73 all: $(EXE)
74 -@[ -d $(WEBDIR) ] && \
75 for file in $(EXE); do \
76 if [ ! -f $(WEBDIR)/$$file ] || [ $$file -nt $(WEBDIR)/$$file ]; then \
77 echo cp $$file $(WEBDIR) ;\
78 cp -f $$file $(WEBDIR) ;\
79 fi ;\
80 done
81 @cd xml && $(MAKE) CC="$(CC)" LD="$(LD)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
82 @cd test && $(MAKE) CC="$(CC)" LD="$(LD)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
83
84 ########
85
86 PLANETSPLITTER_OBJ=planetsplitter.o \
87 nodesx.o segmentsx.o waysx.o relationsx.o superx.o prunex.o \
88 ways.o types.o \
89 files.o logging.o logerror.o \
90 results.o queue.o sorting.o \
91 xmlparse.o tagging.o \
92 uncompress.o osmxmlparse.o osmpbfparse.o osmo5mparse.o osmparser.o
93
94 planetsplitter : $(PLANETSPLITTER_OBJ)
95 $(LD) $(PLANETSPLITTER_OBJ) -o $@ $(LDFLAGS)
96
97 ########
98
99 PLANETSPLITTER_SLIM_OBJ=planetsplitter-slim.o \
100 nodesx-slim.o segmentsx-slim.o waysx-slim.o relationsx-slim.o superx-slim.o prunex-slim.o \
101 ways.o types.o \
102 files.o logging.o logerror-slim.o \
103 results.o queue.o sorting.o \
104 xmlparse.o tagging.o \
105 uncompress.o osmxmlparse.o osmpbfparse.o osmo5mparse.o osmparser.o
106
107 planetsplitter-slim : $(PLANETSPLITTER_SLIM_OBJ)
108 $(LD) $(PLANETSPLITTER_SLIM_OBJ) -o $@ $(LDFLAGS)
109
110 ########
111
112 ROUTER_OBJ=router.o \
113 nodes.o segments.o ways.o relations.o types.o fakes.o \
114 optimiser.o output.o \
115 files.o logging.o profiles.o xmlparse.o \
116 results.o queue.o translations.o
117
118 router : $(ROUTER_OBJ)
119 $(LD) $(ROUTER_OBJ) -o $@ $(LDFLAGS)
120
121 ########
122
123 ROUTER_SLIM_OBJ=router-slim.o \
124 nodes-slim.o segments-slim.o ways-slim.o relations-slim.o types.o fakes-slim.o \
125 optimiser-slim.o output-slim.o \
126 files.o logging.o profiles.o xmlparse.o \
127 results.o queue.o translations.o
128
129 router-slim : $(ROUTER_SLIM_OBJ)
130 $(LD) $(ROUTER_SLIM_OBJ) -o $@ $(LDFLAGS)
131
132 ########
133
134 FILEDUMPERX_OBJ=filedumperx.o \
135 files.o logging.o
136
137 filedumperx : $(FILEDUMPERX_OBJ)
138 $(LD) $(FILEDUMPERX_OBJ) -o $@ $(LDFLAGS)
139
140 ########
141
142 FILEDUMPER_OBJ=filedumper.o \
143 nodes.o segments.o ways.o relations.o types.o fakes.o \
144 visualiser.o \
145 files.o logging.o xmlparse.o
146
147 filedumper : $(FILEDUMPER_OBJ)
148 $(LD) $(FILEDUMPER_OBJ) -o $@ $(LDFLAGS)
149
150 ########
151
152 FILEDUMPER_SLIM_OBJ=filedumper-slim.o \
153 nodes-slim.o segments-slim.o ways-slim.o relations-slim.o types.o fakes-slim.o \
154 visualiser-slim.o \
155 files.o logging.o xmlparse.o
156
157 filedumper-slim : $(FILEDUMPER_SLIM_OBJ)
158 $(LD) $(FILEDUMPER_SLIM_OBJ) -o $@ $(LDFLAGS)
159
160 ########
161
162 TAGMODIFIER_OBJ=tagmodifier.o \
163 files.o logging.o logerror.o \
164 uncompress.o xmlparse.o tagging.o
165
166 tagmodifier : $(TAGMODIFIER_OBJ)
167 $(LD) $(TAGMODIFIER_OBJ) -o $@ $(LDFLAGS)
168
169 ########
170
171 %.o : %.c
172 @[ -d .deps ] || mkdir .deps
173 $(CC) -c $(CFLAGS) -DSLIM=0 -DDATADIR=\"$(datadir)\" $< -o $@ -MMD -MP -MF $(addprefix .deps/,$(addsuffix .d,$(basename $@)))
174
175 %-slim.o : %.c
176 @[ -d .deps ] || mkdir .deps
177 $(CC) -c $(CFLAGS) -DSLIM=1 -DDATADIR=\"$(datadir)\" $< -o $@ -MMD -MP -MF $(addprefix .deps/,$(addsuffix .d,$(basename $@)))
178
179 ########
180
181 test:
182 cd xml && $(MAKE) test
183 cd test && $(MAKE) test
184
185 ########
186
187 install: all
188 -[ -d $(DESTDIR)$(bindir) ] || mkdir -p $(DESTDIR)$(bindir)
189 @[ -d $(DESTDIR)$(bindir) ] && \
190 for file in $(EXE); do \
191 echo cp $$file $(DESTDIR)$(bindir) ;\
192 cp -f $$file $(DESTDIR)$(bindir) ;\
193 done
194
195 ########
196
197 clean:
198 rm -f *~
199 rm -f *.o
200 rm -f core
201 rm -f *.gcda *.gcno *.gcov gmon.out
202 cd xml && $(MAKE) clean
203 cd test && $(MAKE) clean
204
205 ########
206
207 distclean: clean
208 -[ -d ../web/bin ] && cd ../web/bin/ && rm -f $(EXE)
209 -rm -f $(EXE)
210 -rm -f $(D)
211 -rm -fr .deps
212 cd xml && $(MAKE) distclean
213 cd test && $(MAKE) distclean
214
215 ########
216
217 include $(D)
218
219 ########
220
221 top=-top
222 include ../Makefile

Properties

Name Value
cvs:description Makefile.