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 384 -
(hide annotations)
(download)
Wed Apr 28 17:26:23 2010 UTC (15 years ago) by amb
File size: 2833 byte(s)
Wed Apr 28 17:26:23 2010 UTC (15 years ago) by amb
File size: 2833 byte(s)
Compile with _FILE_OFFSET_BITS=64 to get 64-bit fopen() and stat().
1 | amb | 384 | # $Header: /home/amb/CVS/routino/src/Makefile,v 1.32 2010-04-28 17:26:23 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 | amb | 359 | CFLAGS+= -O0 -g |
38 | amb | 240 | #CFLAGS+= -pg |
39 | #CFLAGS+= --coverage | ||
40 | |||
41 | LDFLAGS+= | ||
42 | #LDFLAGS+= -pg -static | ||
43 | #LDFLAGS+= --coverage | ||
44 | |||
45 | amb | 333 | LEXFLAGS= |
46 | |||
47 | amb | 384 | # Required to use stdio with files > 2GiB on 32-bit system. |
48 | |||
49 | FLAGS64=-D_FILE_OFFSET_BITS=64 | ||
50 | |||
51 | amb | 2 | # Compilation targets |
52 | |||
53 | C=$(wildcard *.c) | ||
54 | amb | 91 | D=$(foreach f,$(C),$(addprefix .deps/,$(addsuffix .d,$(basename $f)))) |
55 | amb | 2 | |
56 | amb | 333 | EXE=planetsplitter filedumper router |
57 | |||
58 | amb | 2 | ######## |
59 | |||
60 | all : $(EXE) | ||
61 | amb | 312 | -[ -d ../web/bin ] && cp $(EXE) ../web/bin |
62 | amb | 340 | cd xml && $(MAKE) CC="$(CC)" LD="$(LD)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" |
63 | amb | 2 | |
64 | ######## | ||
65 | |||
66 | amb | 161 | PLANETSPLITTER_OBJ=planetsplitter.o \ |
67 | nodesx.o segmentsx.o waysx.o superx.o \ | ||
68 | amb | 365 | ways.o types.o \ |
69 | amb | 353 | files.o \ |
70 | amb | 333 | results.o queue.o sorting.o \ |
71 | amb | 240 | osmparser.o |
72 | amb | 2 | |
73 | planetsplitter : $(PLANETSPLITTER_OBJ) | ||
74 | $(LD) $(PLANETSPLITTER_OBJ) -o $@ $(LDFLAGS) | ||
75 | |||
76 | ######## | ||
77 | |||
78 | amb | 161 | FILEDUMPER_OBJ=filedumper.o \ |
79 | amb | 365 | nodes.o segments.o ways.o types.o \ |
80 | amb | 186 | files.o \ |
81 | visualiser.o | ||
82 | amb | 2 | |
83 | filedumper : $(FILEDUMPER_OBJ) | ||
84 | $(LD) $(FILEDUMPER_OBJ) -o $@ $(LDFLAGS) | ||
85 | |||
86 | ######## | ||
87 | |||
88 | amb | 161 | ROUTER_OBJ=router.o \ |
89 | amb | 365 | nodes.o segments.o ways.o types.o \ |
90 | amb | 333 | files.o profiles.o xmlparse.o \ |
91 | amb | 359 | optimiser.o output.o results.o queue.o translations.o |
92 | amb | 2 | |
93 | router : $(ROUTER_OBJ) | ||
94 | $(LD) $(ROUTER_OBJ) -o $@ $(LDFLAGS) | ||
95 | |||
96 | ######## | ||
97 | |||
98 | amb | 333 | xmlparse.c : xmlparse.l |
99 | amb | 353 | $(LEX) $(LEXFLAGS) $< |
100 | amb | 333 | -@mv lex.yy.c xmlparse.c |
101 | @echo Created xmlparse.c | ||
102 | |||
103 | ######## | ||
104 | |||
105 | amb | 2 | %.o : %.c |
106 | amb | 384 | $(CC) -c $(CFLAGS) $(FLAGS64) $< -o $@ -MMD -MP -MF $(addprefix .deps/,$(addsuffix .d,$(basename $<))) |
107 | amb | 2 | |
108 | ######## | ||
109 | |||
110 | clean: | ||
111 | rm -f *.o | ||
112 | rm -f *~ | ||
113 | amb | 340 | cd xml && $(MAKE) clean |
114 | amb | 2 | |
115 | ######## | ||
116 | |||
117 | distclean: clean | ||
118 | amb | 192 | -[ -d ../web/bin ] && cd ../web/bin/ && rm -f $(EXE) |
119 | amb | 2 | -rm -f $(EXE) |
120 | -rm -f $(D) | ||
121 | amb | 153 | -rm -fr .deps |
122 | amb | 340 | cd xml && $(MAKE) distclean |
123 | amb | 2 | |
124 | ######## | ||
125 | |||
126 | amb | 91 | .deps : .FORCE |
127 | amb | 94 | @[ -d .deps ] || mkdir $@ |
128 | amb | 91 | |
129 | amb | 353 | $(D) : .deps |
130 | amb | 2 | @touch $@ |
131 | |||
132 | include $(D) | ||
133 | |||
134 | ######## | ||
135 | |||
136 | .FORCE : |
Properties
Name | Value |
---|---|
cvs:description | Makefile. |