Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino
Annotation of /trunk/src/Makefile
Parent Directory
|
Revision Log
Revision 333 -
(hide annotations)
(download)
Sun Mar 28 15:24:29 2010 UTC (15 years, 1 month ago) by amb
File size: 2755 byte(s)
Sun Mar 28 15:24:29 2010 UTC (15 years, 1 month ago) by amb
File size: 2755 byte(s)
Added the XML subdirectory and xmlparser.c.
1 | amb | 333 | # $Header: /home/amb/CVS/routino/src/Makefile,v 1.27 2010-03-28 15:24:29 amb Exp $ |
2 | amb | 2 | # |
3 | amb | 333 | # Source code Makefile |
4 | amb | 2 | # |
5 | amb | 151 | # Part of the Routino routing software. |
6 | amb | 2 | # |
7 | amb | 333 | # This file Copyright 2008-2010 Andrew M. Bishop |
8 | amb | 151 | # |
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 | amb | 2 | |
23 | # Programs | ||
24 | |||
25 | CC=gcc | ||
26 | LD=gcc | ||
27 | |||
28 | amb | 333 | LEX=flex |
29 | |||
30 | amb | 2 | # Program options |
31 | |||
32 | amb | 240 | CFLAGS=-Wall -Wmissing-prototypes |
33 | #CFLAGS+= -Wextra -pedantic -std=c99 | ||
34 | LDFLAGS=-lm -lc | ||
35 | amb | 2 | |
36 | amb | 240 | CFLAGS+= -O3 |
37 | #CFLAGS+= -O0 -g | ||
38 | #CFLAGS+= -pg | ||
39 | #CFLAGS+= --coverage | ||
40 | |||
41 | LDFLAGS+= | ||
42 | #LDFLAGS+= -pg -static | ||
43 | #LDFLAGS+= --coverage | ||
44 | |||
45 | amb | 333 | LEXFLAGS= |
46 | FLEXFLAGS=-p -B -F -8 -s | ||
47 | |||
48 | amb | 2 | # Compilation targets |
49 | |||
50 | C=$(wildcard *.c) | ||
51 | amb | 91 | D=$(foreach f,$(C),$(addprefix .deps/,$(addsuffix .d,$(basename $f)))) |
52 | amb | 2 | |
53 | amb | 333 | EXE=planetsplitter filedumper router |
54 | |||
55 | amb | 2 | ######## |
56 | |||
57 | all : $(EXE) | ||
58 | amb | 312 | -[ -d ../web/bin ] && cp $(EXE) ../web/bin |
59 | amb | 333 | cd xml && make CC="$(CC)" LD="$(LD)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" |
60 | amb | 2 | |
61 | ######## | ||
62 | |||
63 | amb | 161 | PLANETSPLITTER_OBJ=planetsplitter.o \ |
64 | nodesx.o segmentsx.o waysx.o superx.o \ | ||
65 | ways.o \ | ||
66 | amb | 333 | files.o profiles.o \ |
67 | results.o queue.o sorting.o \ | ||
68 | amb | 240 | osmparser.o |
69 | amb | 2 | |
70 | planetsplitter : $(PLANETSPLITTER_OBJ) | ||
71 | $(LD) $(PLANETSPLITTER_OBJ) -o $@ $(LDFLAGS) | ||
72 | |||
73 | ######## | ||
74 | |||
75 | amb | 161 | FILEDUMPER_OBJ=filedumper.o \ |
76 | amb | 240 | nodes.o segments.o ways.o \ |
77 | amb | 186 | files.o \ |
78 | visualiser.o | ||
79 | amb | 2 | |
80 | filedumper : $(FILEDUMPER_OBJ) | ||
81 | $(LD) $(FILEDUMPER_OBJ) -o $@ $(LDFLAGS) | ||
82 | |||
83 | ######## | ||
84 | |||
85 | amb | 161 | ROUTER_OBJ=router.o \ |
86 | nodes.o segments.o ways.o \ | ||
87 | amb | 333 | files.o profiles.o xmlparse.o \ |
88 | optimiser.o output.o results.o queue.o | ||
89 | amb | 2 | |
90 | router : $(ROUTER_OBJ) | ||
91 | $(LD) $(ROUTER_OBJ) -o $@ $(LDFLAGS) | ||
92 | |||
93 | ######## | ||
94 | |||
95 | amb | 333 | xmlparse.c : xmlparse.l |
96 | [ ! "$(LEX)" = "flex" ] || $(LEX) $(FLEXFLAGS) $< | ||
97 | [ "$(LEX)" = "flex" ] || $(LEX) $(LEXFLAGS) $< | ||
98 | -@mv lex.yy.c xmlparse.c | ||
99 | @echo Created xmlparse.c | ||
100 | |||
101 | ######## | ||
102 | |||
103 | amb | 2 | %.o : %.c |
104 | amb | 91 | $(CC) -c $(CFLAGS) $< -o $@ -MMD -MP -MF $(addprefix .deps/,$(addsuffix .d,$(basename $<))) |
105 | amb | 2 | |
106 | ######## | ||
107 | |||
108 | clean: | ||
109 | rm -f *.o | ||
110 | rm -f *~ | ||
111 | |||
112 | ######## | ||
113 | |||
114 | distclean: clean | ||
115 | amb | 192 | -[ -d ../web/bin ] && cd ../web/bin/ && rm -f $(EXE) |
116 | amb | 2 | -rm -f $(EXE) |
117 | -rm -f $(D) | ||
118 | amb | 153 | -rm -fr .deps |
119 | amb | 2 | |
120 | ######## | ||
121 | |||
122 | amb | 91 | .deps : .FORCE |
123 | amb | 94 | @[ -d .deps ] || mkdir $@ |
124 | amb | 91 | |
125 | amb | 153 | $(D) : .FORCE .deps |
126 | amb | 2 | @touch $@ |
127 | |||
128 | include $(D) | ||
129 | |||
130 | ######## | ||
131 | |||
132 | .FORCE : |
Properties
Name | Value |
---|---|
cvs:description | Makefile. |