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 153 -
(show annotations)
(download)
Wed Apr 8 18:46:52 2009 UTC (16 years ago) by amb
File size: 2171 byte(s)
Wed Apr 8 18:46:52 2009 UTC (16 years ago) by amb
File size: 2171 byte(s)
Fix dependency file generation.
1 | # $Header: /home/amb/CVS/routino/src/Makefile,v 1.18 2009-04-08 18:46:52 amb Exp $ |
2 | # |
3 | # Makefile |
4 | # |
5 | # Part of the Routino routing software. |
6 | # |
7 | # This file Copyright 2008,2009 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 | # Program options |
29 | |
30 | CFLAGS=-O3 -Wall -Wmissing-prototypes |
31 | #CFLAGS=-pg -g -O0 -Wall -Wmissing-prototypes |
32 | #CFLAGS=-pg --coverage -g -O0 -Wall -Wmissing-prototypes |
33 | LDFLAGS=-lm |
34 | #LDFLAGS=-pg -static -lm -lc |
35 | #LDFLAGS=-pg --coverage -static -lm -lc |
36 | |
37 | # Compilation targets |
38 | |
39 | C=$(wildcard *.c) |
40 | D=$(foreach f,$(C),$(addprefix .deps/,$(addsuffix .d,$(basename $f)))) |
41 | |
42 | ######## |
43 | |
44 | EXE=planetsplitter filedumper router |
45 | |
46 | all : $(EXE) |
47 | |
48 | ######## |
49 | |
50 | PLANETSPLITTER_OBJ=planetsplitter.o files.o nodesx.o segmentsx.o waysx.o superx.o profiles.o results.o osmparser.o ways.o |
51 | |
52 | planetsplitter : $(PLANETSPLITTER_OBJ) |
53 | $(LD) $(PLANETSPLITTER_OBJ) -o $@ $(LDFLAGS) |
54 | |
55 | ######## |
56 | |
57 | FILEDUMPER_OBJ=filedumper.o files.o nodes.o segments.o ways.o results.o |
58 | |
59 | filedumper : $(FILEDUMPER_OBJ) |
60 | $(LD) $(FILEDUMPER_OBJ) -o $@ $(LDFLAGS) |
61 | |
62 | ######## |
63 | |
64 | ROUTER_OBJ=router.o files.o nodes.o segments.o ways.o profiles.o optimiser.o results.o |
65 | |
66 | router : $(ROUTER_OBJ) |
67 | $(LD) $(ROUTER_OBJ) -o $@ $(LDFLAGS) |
68 | |
69 | ######## |
70 | |
71 | %.o : %.c |
72 | $(CC) -c $(CFLAGS) $< -o $@ -MMD -MP -MF $(addprefix .deps/,$(addsuffix .d,$(basename $<))) |
73 | |
74 | ######## |
75 | |
76 | clean: |
77 | rm -f *.o |
78 | rm -f *~ |
79 | |
80 | ######## |
81 | |
82 | distclean: clean |
83 | -rm -f $(EXE) |
84 | -rm -f $(D) |
85 | -rm -fr .deps |
86 | |
87 | ######## |
88 | |
89 | .deps : .FORCE |
90 | @[ -d .deps ] || mkdir $@ |
91 | |
92 | $(D) : .FORCE .deps |
93 | @touch $@ |
94 | |
95 | include $(D) |
96 | |
97 | ######## |
98 | |
99 | .FORCE : |
Properties
Name | Value |
---|---|
cvs:description | Makefile. |