Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino
Contents of /trunk/src/Makefile
Parent Directory
|
Revision Log
Revision 453 -
(show annotations)
(download)
Thu Jul 15 18:04:29 2010 UTC (14 years, 8 months ago) by amb
File size: 4424 byte(s)
Thu Jul 15 18:04:29 2010 UTC (14 years, 8 months ago) by amb
File size: 4424 byte(s)
Added a slim mode to the router (just for nodes to start with).
1 | # $Header: /home/amb/CVS/routino/src/Makefile,v 1.38 2010-07-15 18:04:29 amb Exp $ |
2 | # |
3 | # Source code Makefile |
4 | # |
5 | # Part of the Routino routing software. |
6 | # |
7 | # This file Copyright 2008-2010 Andrew M. Bishop |
8 | # |
9 | # This program is free software: you can redistribute it and/or modify |
10 | # it under the terms of the GNU Affero General Public License as published by |
11 | # the Free Software Foundation, either version 3 of the License, or |
12 | # (at your option) any later version. |
13 | # |
14 | # This program is distributed in the hope that it will be useful, |
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | # GNU Affero General Public License for more details. |
18 | # |
19 | # You should have received a copy of the GNU Affero General Public License |
20 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
21 | # |
22 | |
23 | # Programs |
24 | |
25 | CC=gcc |
26 | LD=gcc |
27 | |
28 | LEX=flex |
29 | |
30 | # Program options |
31 | |
32 | CFLAGS=-Wall -Wmissing-prototypes |
33 | #CFLAGS+= -Wextra -pedantic -std=c99 |
34 | LDFLAGS=-lm -lc |
35 | |
36 | CFLAGS+= -O3 |
37 | #CFLAGS+= -O0 -g |
38 | #CFLAGS+= -pg |
39 | #CFLAGS+= --coverage |
40 | |
41 | LDFLAGS+= |
42 | #LDFLAGS+= -pg -static |
43 | #LDFLAGS+= --coverage |
44 | |
45 | LEXFLAGS= |
46 | |
47 | # Required to use stdio with files > 2GiB on 32-bit system. |
48 | |
49 | FLAGS64=-D_FILE_OFFSET_BITS=64 |
50 | |
51 | # Compilation targets |
52 | |
53 | C=$(wildcard *.c) |
54 | D=$(foreach f,$(C),$(addprefix .deps/,$(addsuffix .d,$(basename $f)))) |
55 | |
56 | EXE=planetsplitter planetsplitter-slim router router-slim filedumper filedumper-slim tagmodifier |
57 | |
58 | WEBDIR=../web/bin |
59 | |
60 | ######## |
61 | |
62 | all : $(EXE) |
63 | -@[ -d $(WEBDIR) ] && \ |
64 | for file in $(EXE); do \ |
65 | if [ ! -f $(WEBDIR)/$$file ] || [ $$file -nt $(WEBDIR)/$$file ]; then \ |
66 | echo cp $$file $(WEBDIR) ;\ |
67 | cp -f $$file $(WEBDIR) ;\ |
68 | fi ;\ |
69 | done |
70 | @cd xml && $(MAKE) CC="$(CC)" LD="$(LD)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" |
71 | |
72 | ######## |
73 | |
74 | PLANETSPLITTER_OBJ=planetsplitter.o \ |
75 | nodesx.o segmentsx.o waysx.o superx.o \ |
76 | ways.o types.o \ |
77 | files.o \ |
78 | results.o queue.o sorting.o \ |
79 | xmlparse.o tagging.o osmparser.o |
80 | |
81 | planetsplitter : $(PLANETSPLITTER_OBJ) |
82 | $(LD) $(PLANETSPLITTER_OBJ) -o $@ $(LDFLAGS) |
83 | |
84 | ######## |
85 | |
86 | PLANETSPLITTER_SLIM_OBJ=planetsplitter-slim.o \ |
87 | nodesx-slim.o segmentsx-slim.o waysx-slim.o superx-slim.o \ |
88 | ways.o types.o \ |
89 | files.o \ |
90 | results.o queue.o sorting.o \ |
91 | xmlparse.o tagging.o osmparser.o |
92 | |
93 | planetsplitter-slim : $(PLANETSPLITTER_SLIM_OBJ) |
94 | $(LD) $(PLANETSPLITTER_SLIM_OBJ) -o $@ $(LDFLAGS) |
95 | |
96 | ######## |
97 | |
98 | ROUTER_OBJ=router.o \ |
99 | nodes.o segments.o ways.o types.o \ |
100 | optimiser.o output.o \ |
101 | files.o profiles.o xmlparse.o \ |
102 | results.o queue.o translations.o |
103 | |
104 | router : $(ROUTER_OBJ) |
105 | $(LD) $(ROUTER_OBJ) -o $@ $(LDFLAGS) |
106 | |
107 | ######## |
108 | |
109 | ROUTER_SLIM_OBJ=router-slim.o \ |
110 | nodes-slim.o segments-slim.o ways-slim.o types.o \ |
111 | optimiser-slim.o output-slim.o \ |
112 | files.o profiles.o xmlparse.o \ |
113 | results.o queue.o translations.o |
114 | |
115 | router-slim : $(ROUTER_SLIM_OBJ) |
116 | $(LD) $(ROUTER_SLIM_OBJ) -o $@ $(LDFLAGS) |
117 | |
118 | ######## |
119 | |
120 | FILEDUMPER_OBJ=filedumper.o \ |
121 | nodes.o segments.o ways.o types.o \ |
122 | visualiser.o \ |
123 | files.o xmlparse.o |
124 | |
125 | filedumper : $(FILEDUMPER_OBJ) |
126 | $(LD) $(FILEDUMPER_OBJ) -o $@ $(LDFLAGS) |
127 | |
128 | ######## |
129 | |
130 | FILEDUMPER_SLIM_OBJ=filedumper-slim.o \ |
131 | nodes-slim.o segments-slim.o ways-slim.o types.o \ |
132 | visualiser-slim.o \ |
133 | files.o xmlparse.o |
134 | |
135 | filedumper-slim : $(FILEDUMPER_SLIM_OBJ) |
136 | $(LD) $(FILEDUMPER_SLIM_OBJ) -o $@ $(LDFLAGS) |
137 | |
138 | ######## |
139 | |
140 | TAGMODIFIER_OBJ=tagmodifier.o \ |
141 | files.o \ |
142 | xmlparse.o tagging.o |
143 | |
144 | tagmodifier : $(TAGMODIFIER_OBJ) |
145 | $(LD) $(TAGMODIFIER_OBJ) -o $@ $(LDFLAGS) |
146 | |
147 | ######## |
148 | |
149 | xmlparse.c : xmlparse.l |
150 | $(LEX) $(LEXFLAGS) $< |
151 | -@mv lex.yy.c xmlparse.c |
152 | @echo Created xmlparse.c |
153 | |
154 | ######## |
155 | |
156 | %.o : %.c |
157 | $(CC) -c $(CFLAGS) $(FLAGS64) -DSLIM=0 $< -o $@ -MMD -MP -MF $(addprefix .deps/,$(addsuffix .d,$(basename $<))) |
158 | |
159 | %-slim.o : %.c |
160 | $(CC) -c $(CFLAGS) $(FLAGS64) -DSLIM=1 $< -o $@ -MMD -MP -MF $(addprefix .deps/,$(addsuffix .d,$(basename $<))) |
161 | |
162 | ######## |
163 | |
164 | clean: |
165 | rm -f *.o |
166 | rm -f *~ |
167 | rm -f xmlparse.c |
168 | cd xml && $(MAKE) clean |
169 | |
170 | ######## |
171 | |
172 | distclean: clean |
173 | -[ -d ../web/bin ] && cd ../web/bin/ && rm -f $(EXE) |
174 | -rm -f $(EXE) |
175 | -rm -f $(D) |
176 | -rm -fr .deps |
177 | cd xml && $(MAKE) distclean |
178 | |
179 | ######## |
180 | |
181 | .deps : .FORCE |
182 | @[ -d .deps ] || mkdir $@ |
183 | |
184 | $(D) : .deps |
185 | @touch $@ |
186 | |
187 | include $(D) |
188 | |
189 | ######## |
190 | |
191 | .FORCE : |
Properties
Name | Value |
---|---|
cvs:description | Makefile. |