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 1523 - (show annotations) (download)
Tue Mar 11 19:25:07 2014 UTC (11 years ago) by amb
File size: 5305 byte(s)
Update the Makefiles by creating one in the web directory and moving parts from
the src, doc and xml Makefiles into it.

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