Routino SVN Repository Browser

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

ViewVC logotype

Contents of /branches/destination-access/extras/find-fixme/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1829 - (show annotations) (download)
Sat Oct 17 14:17:17 2015 UTC (9 years, 5 months ago) by amb
File size: 5520 byte(s)
Merge trunk back into routino-destination branch after completing the
loop and reverse changes.

1 # find-fixme Makefile
2 #
3 # Part of the Routino routing software.
4 #
5 # This file Copyright 2013-2015 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 DEPDIR=.deps
34
35 C=$(wildcard *.c)
36 D=$(wildcard $(DEPDIR)/*.d)
37
38 ROUTINO_SRC=../../src
39 ROUTINO_WEBWWWDIR=../../web/www/routino
40 ROUTINO_DOCDIR=../../doc/html
41
42 EXE=fixme-finder$(.EXE) fixme-finder-slim$(.EXE) fixme-dumper$(.EXE) fixme-dumper-slim$(.EXE)
43 DATA=fixme.xml
44 WWW_COPY=page-elements.css page-elements.js maplayout.css mapprops.js maploader.js
45 DOC_COPY=style.css
46
47 ########
48
49 all: all-bin all-data all-www
50
51 all-bin: $(EXE)
52 @[ -d $(WEBBINDIR) ] || mkdir -p $(WEBBINDIR)
53 @for file in $(EXE); do \
54 if [ ! -f $(WEBBINDIR)/$$file ] || [ $$file -nt $(WEBBINDIR)/$$file ]; then \
55 echo cp $$file $(WEBBINDIR) ;\
56 cp -f $$file $(WEBBINDIR) ;\
57 fi ;\
58 done
59
60 all-data:
61 @[ -d $(WEBDATADIR) ] || mkdir -p $(WEBDATADIR)
62 @for file in $(DATA); do \
63 if [ ! -f $(WEBDATADIR)/$$file ] || [ $$file -nt $(WEBDATADIR)/$$file ]; then \
64 echo cp $$file $(WEBDATADIR) ;\
65 cp -f $$file $(WEBDATADIR) ;\
66 fi ;\
67 done
68
69 all-www:
70 @for file in $(WWW_COPY); do \
71 if [ ! -f $(WEBWWWDIR)/$$file ] || [ $(ROUTINO_WEBWWWDIR)/$$file -nt $(WEBWWWDIR)/$$file ]; then \
72 echo cp $(ROUTINO_WEBWWWDIR)/$$file $(WEBWWWDIR) ;\
73 cp -f $(ROUTINO_WEBWWWDIR)/$$file $(WEBWWWDIR) ;\
74 fi ;\
75 done
76 @for file in $(DOC_COPY); do \
77 if [ ! -f $(WEBWWWDIR)/$$file ] || [ $(ROUTINO_DOCDIR)/$$file -nt $(WEBWWWDIR)/$$file ]; then \
78 echo cp $(ROUTINO_DOCDIR)/$$file $(WEBWWWDIR) ;\
79 cp -f $(ROUTINO_DOCDIR)/$$file $(WEBWWWDIR) ;\
80 fi ;\
81 done
82
83 ########
84
85 FIXME_FINDER_OBJ=fixme-finder.o osmparser.o \
86 $(ROUTINO_SRC)/nodesx.o $(ROUTINO_SRC)/segmentsx.o $(ROUTINO_SRC)/waysx.o $(ROUTINO_SRC)/relationsx.o \
87 $(ROUTINO_SRC)/ways.o $(ROUTINO_SRC)/types.o \
88 $(ROUTINO_SRC)/files.o $(ROUTINO_SRC)/logging.o $(ROUTINO_SRC)/logerror.o $(ROUTINO_SRC)/errorlogx.o \
89 $(ROUTINO_SRC)/sorting.o \
90 $(ROUTINO_SRC)/xmlparse.o $(ROUTINO_SRC)/tagging.o \
91 $(ROUTINO_SRC)/uncompress.o $(ROUTINO_SRC)/osmxmlparse.o $(ROUTINO_SRC)/osmpbfparse.o $(ROUTINO_SRC)/osmo5mparse.o
92
93 ifeq ($(HOST),MINGW)
94 FIXME_FINDER_OBJ+=$(ROUTINO_SRC)/mman-win32.o
95 endif
96
97 fixme-finder$(.EXE) : $(FIXME_FINDER_OBJ)
98 $(LD) $^ -o $@ $(LDFLAGS)
99
100 ########
101
102 FIXME_FINDER_SLIM_OBJ=fixme-finder-slim.o osmparser.o \
103 $(ROUTINO_SRC)/nodesx-slim.o $(ROUTINO_SRC)/segmentsx-slim.o $(ROUTINO_SRC)/waysx-slim.o $(ROUTINO_SRC)/relationsx-slim.o \
104 $(ROUTINO_SRC)/ways.o $(ROUTINO_SRC)/types.o \
105 $(ROUTINO_SRC)/files.o $(ROUTINO_SRC)/logging.o $(ROUTINO_SRC)/logerror-slim.o $(ROUTINO_SRC)/errorlogx-slim.o \
106 $(ROUTINO_SRC)/sorting.o \
107 $(ROUTINO_SRC)/xmlparse.o $(ROUTINO_SRC)/tagging.o \
108 $(ROUTINO_SRC)/uncompress.o $(ROUTINO_SRC)/osmxmlparse.o $(ROUTINO_SRC)/osmpbfparse.o $(ROUTINO_SRC)/osmo5mparse.o
109
110 ifeq ($(HOST),MINGW)
111 FIXME_FINDER_SLIM_OBJ+=$(ROUTINO_SRC)/mman-win32.o
112 endif
113
114 fixme-finder-slim$(.EXE) : $(FIXME_FINDER_SLIM_OBJ)
115 $(LD) $^ -o $@ $(LDFLAGS)
116
117 ########
118
119 FIXME_DUMPER_OBJ=fixme-dumper.o \
120 $(ROUTINO_SRC)/errorlog.o \
121 $(ROUTINO_SRC)/files.o $(ROUTINO_SRC)/logging.o $(ROUTINO_SRC)/xmlparse.o
122
123 ifeq ($(HOST),MINGW)
124 FIXME_DUMPER_OBJ+=$(ROUTINO_SRC)/mman-win32.o
125 endif
126
127 fixme-dumper$(.EXE) : $(FIXME_DUMPER_OBJ)
128 $(LD) $^ -o $@ $(LDFLAGS)
129
130 ########
131
132 FIXME_DUMPER_SLIM_OBJ=fixme-dumper-slim.o \
133 $(ROUTINO_SRC)/errorlog-slim.o \
134 $(ROUTINO_SRC)/files.o $(ROUTINO_SRC)/logging.o $(ROUTINO_SRC)/xmlparse.o
135
136 ifeq ($(HOST),MINGW)
137 FIXME_DUMPER_SLIM_OBJ+=$(ROUTINO_SRC)/mman-win32.o
138 endif
139
140 fixme-dumper-slim$(.EXE) : $(FIXME_DUMPER_SLIM_OBJ)
141 $(LD) $^ -o $@ $(LDFLAGS)
142
143 ########
144
145 $(ROUTINO_SRC)/%.o :
146 cd $(ROUTINO_SRC) && $(MAKE) $(notdir $@)
147
148 $(ROUTINO_SRC)/%-slim.o :
149 cd $(ROUTINO_SRC) && $(MAKE) $(notdir $@)
150
151 %.o : %.c
152 -@[ -d $(DEPDIR) ] || mkdir $(DEPDIR)
153 $(CC) -c $(CFLAGS) -DSLIM=0 -I$(ROUTINO_SRC) $< -o $@ -MMD -MP -MF $(addprefix $(DEPDIR)/,$(addsuffix .d,$(basename $@)))
154
155 %-slim.o : %.c
156 -@[ -d $(DEPDIR) ] || mkdir $(DEPDIR)
157 $(CC) -c $(CFLAGS) -DSLIM=1 -I$(ROUTINO_SRC) $< -o $@ -MMD -MP -MF $(addprefix $(DEPDIR)/,$(addsuffix .d,$(basename $@)))
158
159 ########
160
161 test:
162
163 ########
164
165 install:
166
167 ########
168
169 clean:
170 rm -f *~
171 rm -f *.o
172 cd $(WEBBINDIR) && rm -f $(EXE)
173 cd $(WEBDATADIR) && rm -f $(DATA)
174 cd $(WEBWWWDIR) && rm -f $(WWW_COPY)
175 cd $(WEBWWWDIR) && rm -f $(DOC_COPY)
176 rm -f $(EXE)
177 rm -f $(D)
178 rm -fr .deps
179 rm -f core
180
181 ########
182
183 distclean: clean
184
185 ########
186
187 include $(D)
188
189 ########
190
191 .PHONY:: all test install clean distclean
192
193 .PHONY:: all-bin all-data all-www