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 1680 - (show annotations) (download)
Tue May 26 17:28:56 2015 UTC (9 years, 10 months ago) by amb
File size: 5024 byte(s)
Merge branch 'MSVC' back into the trunk.

1 # Source code Makefile
2 #
3 # Part of the Routino routing software.
4 #
5 # This file Copyright 2008-2015 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 # All configuration is in the top-level Makefile.conf
22
23 include ../Makefile.conf
24
25 # Debugging options
26
27 #CFLAGS+=-O0 -g
28 #CFLAGS+=-pg
29 #CFLAGS+=-fprofile-arcs -ftest-coverage
30
31 #LDFLAGS+=-pg -static
32 #LDFLAGS+=-fprofile-arcs -ftest-coverage
33
34 # Sub-directories and sub-makefiles
35
36 SUBFILES=$(wildcard */Makefile)
37 SUBDIRS=$(foreach f,$(SUBFILES),$(dir $f))
38
39 # Compilation targets
40
41 C=$(wildcard *.c)
42 D=$(wildcard .deps/*.d)
43
44 EXE=planetsplitter planetsplitter-slim router router-slim filedumperx filedumper filedumper-slim
45
46 ########
47
48 all: all-local
49 for dir in $(SUBDIRS); do \
50 ( cd $$dir && $(MAKE) $@ ); \
51 done
52
53 all-local: $(EXE)
54
55 ########
56
57 PLANETSPLITTER_OBJ=planetsplitter.o \
58 nodesx.o segmentsx.o waysx.o relationsx.o superx.o prunex.o \
59 ways.o types.o \
60 files.o logging.o logerror.o errorlogx.o \
61 results.o queue.o sorting.o \
62 xmlparse.o tagging.o \
63 uncompress.o osmxmlparse.o osmpbfparse.o osmo5mparse.o osmparser.o
64
65 planetsplitter : $(PLANETSPLITTER_OBJ)
66 $(LD) $(PLANETSPLITTER_OBJ) -o $@ $(LDFLAGS)
67
68 ########
69
70 PLANETSPLITTER_SLIM_OBJ=planetsplitter-slim.o \
71 nodesx-slim.o segmentsx-slim.o waysx-slim.o relationsx-slim.o superx-slim.o prunex-slim.o \
72 ways.o types.o \
73 files.o logging.o logerror-slim.o errorlogx-slim.o \
74 results.o queue.o sorting.o \
75 xmlparse.o tagging.o \
76 uncompress.o osmxmlparse.o osmpbfparse.o osmo5mparse.o osmparser.o
77
78 planetsplitter-slim : $(PLANETSPLITTER_SLIM_OBJ)
79 $(LD) $(PLANETSPLITTER_SLIM_OBJ) -o $@ $(LDFLAGS)
80
81 ########
82
83 ROUTER_OBJ=router.o \
84 nodes.o segments.o ways.o relations.o types.o fakes.o \
85 optimiser.o output.o \
86 files.o logging.o profiles.o xmlparse.o \
87 results.o queue.o translations.o
88
89 router : $(ROUTER_OBJ)
90 $(LD) $(ROUTER_OBJ) -o $@ $(LDFLAGS)
91
92 ########
93
94 ROUTER_SLIM_OBJ=router-slim.o \
95 nodes-slim.o segments-slim.o ways-slim.o relations-slim.o types.o fakes-slim.o \
96 optimiser-slim.o output-slim.o \
97 files.o logging.o profiles.o xmlparse.o \
98 results.o queue.o translations.o
99
100 router-slim : $(ROUTER_SLIM_OBJ)
101 $(LD) $(ROUTER_SLIM_OBJ) -o $@ $(LDFLAGS)
102
103 ########
104
105 FILEDUMPERX_OBJ=filedumperx.o \
106 files.o logging.o
107
108 filedumperx : $(FILEDUMPERX_OBJ)
109 $(LD) $(FILEDUMPERX_OBJ) -o $@ $(LDFLAGS)
110
111 ########
112
113 FILEDUMPER_OBJ=filedumper.o \
114 nodes.o segments.o ways.o relations.o types.o fakes.o errorlog.o \
115 visualiser.o \
116 files.o logging.o xmlparse.o
117
118 filedumper : $(FILEDUMPER_OBJ)
119 $(LD) $(FILEDUMPER_OBJ) -o $@ $(LDFLAGS)
120
121 ########
122
123 FILEDUMPER_SLIM_OBJ=filedumper-slim.o \
124 nodes-slim.o segments-slim.o ways-slim.o relations-slim.o types.o fakes-slim.o errorlog-slim.o \
125 visualiser-slim.o \
126 files.o logging.o xmlparse.o
127
128 filedumper-slim : $(FILEDUMPER_SLIM_OBJ)
129 $(LD) $(FILEDUMPER_SLIM_OBJ) -o $@ $(LDFLAGS)
130
131 ########
132
133 %.o : %.c
134 @[ -d .deps ] || mkdir .deps
135 $(CC) -c $(CFLAGS) -DSLIM=0 -DROUTINO_DATADIR=\"$(datadir)\" $< -o $@ -MMD -MP -MF $(addprefix .deps/,$(addsuffix .d,$(basename $@)))
136
137 %-slim.o : %.c
138 @[ -d .deps ] || mkdir .deps
139 $(CC) -c $(CFLAGS) -DSLIM=1 -DROUTINO_DATADIR=\"$(datadir)\" $< -o $@ -MMD -MP -MF $(addprefix .deps/,$(addsuffix .d,$(basename $@)))
140
141 ########
142
143 test: test-local
144 for dir in $(SUBDIRS); do \
145 ( cd $$dir && $(MAKE) $@ ); \
146 done
147
148 test-local:
149
150 ########
151
152 install: install-local
153 for dir in $(SUBDIRS); do \
154 ( cd $$dir && $(MAKE) $@ ); \
155 done
156
157 install-local: all-local
158 @[ -d $(DESTDIR)$(bindir) ] || mkdir -p $(DESTDIR)$(bindir)
159 @for file in $(EXE); do \
160 echo cp $$file $(DESTDIR)$(bindir) ;\
161 cp -f $$file $(DESTDIR)$(bindir) ;\
162 done
163
164 ########
165
166 clean: clean-local
167 for dir in $(SUBDIRS); do \
168 ( cd $$dir && $(MAKE) $@ ); \
169 done
170
171 clean-local:
172 rm -f *~
173 rm -f *.o
174 rm -f core
175 rm -f *.gcda *.gcno *.gcov gmon.out
176
177 ########
178
179 distclean: distclean-local
180 for dir in $(SUBDIRS); do \
181 ( cd $$dir && $(MAKE) $@ ); \
182 done
183
184 distclean-local: clean-local
185 -rm -f $(EXE)
186 -rm -f $(D)
187 -rm -fr .deps
188
189 ########
190
191 include $(D)
192
193 ########
194
195 .PHONY:: all test install clean distclean
196
197 .PHONY:: all-local test-local install-local clean-local distclean-local

Properties

Name Value
cvs:description Makefile.