Routino SVN Repository Browser

Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino

ViewVC logotype

Contents of /trunk/extras/find-fixme/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1367 - (show annotations) (download)
Sat Jun 1 18:56:25 2013 UTC (11 years, 9 months ago) by amb
File size: 4652 byte(s)
A tool to search an OSM file for "fixme" tags to create a database and display
them on an interactive map.

1 # find-fixme Makefile
2 #
3 # Part of the Routino routing software.
4 #
5 # This file Copyright 2013 Andrew M. Bishop
6 #
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU Affero General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU Affero General Public License for more details.
16 #
17 # You should have received a copy of the GNU Affero General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #
20
21 # All configuration is in the top-level Makefile.conf
22
23 include ../../Makefile.conf
24
25 # Web file paths
26
27 WEBBINDIR=web/bin
28 WEBDATADIR=web/data
29 WEBWWWDIR=web/www
30
31 # Compilation targets
32
33 C=$(wildcard *.c)
34 D=$(wildcard .deps/*.d)
35
36 ROUTINO=../../src
37
38 EXE=fixme-finder fixme-finder-slim fixme-dumper fixme-dumper-slim
39 DATA=fixme.xml
40 WWW_COPY=$(notdir $(wildcard ../../$(webwwwdir)/maplayout*.css)) $(notdir $(wildcard ../../$(webwwwdir)/page-elements.*)) mapprops.js
41
42 ########
43
44 all: $(EXE)
45 -@[ -d $(WEBBINDIR) ] && \
46 for file in $(EXE); do \
47 if [ ! -f $(WEBBINDIR)/$$file ] || [ $$file -nt $(WEBBINDIR)/$$file ]; then \
48 echo cp $$file $(WEBBINDIR) ;\
49 cp -f $$file $(WEBBINDIR) ;\
50 fi ;\
51 done
52 -@[ -d $(WEBDATADIR) ] && \
53 for file in $(DATA); do \
54 if [ ! -f $(WEBDATADIR)/$$file ] || [ $$file -nt $(WEBDATADIR)/$$file ]; then \
55 echo cp $$file $(WEBDATADIR) ;\
56 cp -f $$file $(WEBDATADIR) ;\
57 fi ;\
58 done
59 -@[ -d $(WEBWWWDIR) ] && \
60 for file in $(WWW_COPY); do \
61 if [ ! -f $(WEBWWWDIR)/$$file ] || [ ../../$(webwwwdir)/$$file -nt $(WEBWWWDIR)/$$file ]; then \
62 echo cp ../../$(webwwwdir)/$$file $(WEBWWWDIR) ;\
63 cp -f ../../$(webwwwdir)/$$file $(WEBWWWDIR) ;\
64 fi ;\
65 done
66
67 $(EXE) : all-routino
68
69 all-routino:
70 cd $(ROUTINO) && $(MAKE) all
71
72 ########
73
74 FIXME_FINDER_OBJ=fixme-finder.o osmparser.o \
75 $(ROUTINO)/nodesx.o $(ROUTINO)/segmentsx.o $(ROUTINO)/waysx.o $(ROUTINO)/relationsx.o \
76 $(ROUTINO)/ways.o $(ROUTINO)/types.o \
77 $(ROUTINO)/files.o $(ROUTINO)/logging.o $(ROUTINO)/logerror.o $(ROUTINO)/errorlogx.o \
78 $(ROUTINO)/sorting.o \
79 $(ROUTINO)/xmlparse.o $(ROUTINO)/tagging.o \
80 $(ROUTINO)/uncompress.o $(ROUTINO)/osmxmlparse.o $(ROUTINO)/osmpbfparse.o $(ROUTINO)/osmo5mparse.o
81
82 fixme-finder : $(FIXME_FINDER_OBJ)
83 $(LD) $(FIXME_FINDER_OBJ) -o $@ $(LDFLAGS)
84
85 ########
86
87 FIXME_FINDER_SLIM_OBJ=fixme-finder-slim.o osmparser.o \
88 $(ROUTINO)/nodesx-slim.o $(ROUTINO)/segmentsx-slim.o $(ROUTINO)/waysx-slim.o $(ROUTINO)/relationsx-slim.o \
89 $(ROUTINO)/ways.o $(ROUTINO)/types.o \
90 $(ROUTINO)/files.o $(ROUTINO)/logging.o $(ROUTINO)/logerror-slim.o $(ROUTINO)/errorlogx-slim.o \
91 $(ROUTINO)/sorting.o \
92 $(ROUTINO)/xmlparse.o $(ROUTINO)/tagging.o \
93 $(ROUTINO)/uncompress.o $(ROUTINO)/osmxmlparse.o $(ROUTINO)/osmpbfparse.o $(ROUTINO)/osmo5mparse.o
94
95 fixme-finder-slim : $(FIXME_FINDER_SLIM_OBJ)
96 $(LD) $(FIXME_FINDER_SLIM_OBJ) -o $@ $(LDFLAGS)
97
98 ########
99
100 FIXME_DUMPER_OBJ=fixme-dumper.o \
101 $(ROUTINO)/errorlog.o \
102 $(ROUTINO)/files.o $(ROUTINO)/logging.o $(ROUTINO)/xmlparse.o
103
104 fixme-dumper : $(FIXME_DUMPER_OBJ)
105 $(LD) $(FIXME_DUMPER_OBJ) -o $@ $(LDFLAGS)
106
107 ########
108
109 FIXME_DUMPER_SLIM_OBJ=fixme-dumper-slim.o \
110 $(ROUTINO)/errorlog-slim.o \
111 $(ROUTINO)/files.o $(ROUTINO)/logging.o $(ROUTINO)/xmlparse.o
112
113 fixme-dumper-slim : $(FIXME_DUMPER_SLIM_OBJ)
114 $(LD) $(FIXME_DUMPER_SLIM_OBJ) -o $@ $(LDFLAGS)
115
116 ########
117
118 $(ROUTINO)/%.o :
119 cd $(ROUTINO) && $(MAKE) $(notdir $@)
120
121 $(ROUTINO)/%-slim.o :
122 cd $(ROUTINO) && $(MAKE) $(notdir $@)
123
124 %.o : %.c
125 @[ -d .deps ] || mkdir .deps
126 $(CC) -c $(CFLAGS) -DSLIM=0 -I$(ROUTINO) $< -o $@ -MMD -MP -MF $(addprefix .deps/,$(addsuffix .d,$(basename $@)))
127
128 %-slim.o : %.c
129 @[ -d .deps ] || mkdir .deps
130 $(CC) -c $(CFLAGS) -DSLIM=1 -I$(ROUTINO) $< -o $@ -MMD -MP -MF $(addprefix .deps/,$(addsuffix .d,$(basename $@)))
131
132 ########
133
134 test:
135 @true
136
137 ########
138
139 install: all
140 @true
141
142 ########
143
144 clean:
145 rm -f *~
146 rm -f *.o
147 rm -f core
148
149 ########
150
151 distclean: clean
152 -cd $(WEBBINDIR) && rm -f $(EXE)
153 -cd $(WEBDATADIR) && rm -f $(DATA)
154 -cd $(WEBWWWDIR) && rm -f $(WWW_COPY)
155 -rm -f $(EXE)
156 -rm -f $(D)
157 -rm -fr .deps
158
159 ########
160
161 include $(D)
162
163 ########
164
165 .PHONY:: all test install clean distclean