1 # $Header: /home/amb/routino/src/RCS/Makefile,v 1.36 2010/07/09 17:43:00 amb Exp $
5 # Part of the Routino routing software.
7 # This file Copyright 2008-2010 Andrew M. Bishop
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.
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.
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/>.
32 CFLAGS=-Wall -Wmissing-prototypes
33 #CFLAGS+= -Wextra -pedantic -std=c99
42 #LDFLAGS+= -pg -static
47 # Required to use stdio with files > 2GiB on 32-bit system.
49 FLAGS64=-D_FILE_OFFSET_BITS=64
54 D=$(foreach f,$(C),$(addprefix .deps/,$(addsuffix .d,$(basename $f))))
56 EXE=planetsplitter router filedumper tagmodifier
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) ;\
70 @cd xml && $(MAKE) CC="$(CC)" LD="$(LD)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
74 PLANETSPLITTER_OBJ=planetsplitter.o \
75 nodesx.o segmentsx.o waysx.o superx.o \
78 results.o queue.o sorting.o \
79 xmlparse.o tagging.o osmparser.o
81 planetsplitter : $(PLANETSPLITTER_OBJ)
82 $(LD) $(PLANETSPLITTER_OBJ) -o $@ $(LDFLAGS)
87 nodes.o segments.o ways.o types.o \
88 files.o profiles.o xmlparse.o \
89 optimiser.o output.o results.o queue.o translations.o
91 router : $(ROUTER_OBJ)
92 $(LD) $(ROUTER_OBJ) -o $@ $(LDFLAGS)
96 FILEDUMPER_OBJ=filedumper.o \
97 nodes.o segments.o ways.o types.o \
101 filedumper : $(FILEDUMPER_OBJ)
102 $(LD) $(FILEDUMPER_OBJ) -o $@ $(LDFLAGS)
106 TAGMODIFIER_OBJ=tagmodifier.o \
110 tagmodifier : $(TAGMODIFIER_OBJ)
111 $(LD) $(TAGMODIFIER_OBJ) -o $@ $(LDFLAGS)
115 xmlparse.c : xmlparse.l
116 $(LEX) $(LEXFLAGS) $<
117 -@mv lex.yy.c xmlparse.c
118 @echo Created xmlparse.c
123 $(CC) -c $(CFLAGS) $(FLAGS64) $< -o $@ -MMD -MP -MF $(addprefix .deps/,$(addsuffix .d,$(basename $<)))
131 cd xml && $(MAKE) clean
136 -[ -d ../web/bin ] && cd ../web/bin/ && rm -f $(EXE)
140 cd xml && $(MAKE) distclean
145 @[ -d .deps ] || mkdir $@