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 1528 - (show annotations) (download)
Sat Mar 22 12:04:51 2014 UTC (11 years ago) by amb
File size: 5199 byte(s)
Another iteration through the Makefiles with some small changes.

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: $(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 ########
82
83 FIXME_FINDER_OBJ=fixme-finder.o osmparser.o \
84 $(ROUTINO_SRC)/nodesx.o $(ROUTINO_SRC)/segmentsx.o $(ROUTINO_SRC)/waysx.o $(ROUTINO_SRC)/relationsx.o \
85 $(ROUTINO_SRC)/ways.o $(ROUTINO_SRC)/types.o \
86 $(ROUTINO_SRC)/files.o $(ROUTINO_SRC)/logging.o $(ROUTINO_SRC)/logerror.o $(ROUTINO_SRC)/errorlogx.o \
87 $(ROUTINO_SRC)/sorting.o \
88 $(ROUTINO_SRC)/xmlparse.o $(ROUTINO_SRC)/tagging.o \
89 $(ROUTINO_SRC)/uncompress.o $(ROUTINO_SRC)/osmxmlparse.o $(ROUTINO_SRC)/osmpbfparse.o $(ROUTINO_SRC)/osmo5mparse.o
90
91 fixme-finder : $(FIXME_FINDER_OBJ)
92 $(LD) $(FIXME_FINDER_OBJ) -o $@ $(LDFLAGS)
93
94 ########
95
96 FIXME_FINDER_SLIM_OBJ=fixme-finder-slim.o osmparser.o \
97 $(ROUTINO_SRC)/nodesx-slim.o $(ROUTINO_SRC)/segmentsx-slim.o $(ROUTINO_SRC)/waysx-slim.o $(ROUTINO_SRC)/relationsx-slim.o \
98 $(ROUTINO_SRC)/ways.o $(ROUTINO_SRC)/types.o \
99 $(ROUTINO_SRC)/files.o $(ROUTINO_SRC)/logging.o $(ROUTINO_SRC)/logerror-slim.o $(ROUTINO_SRC)/errorlogx-slim.o \
100 $(ROUTINO_SRC)/sorting.o \
101 $(ROUTINO_SRC)/xmlparse.o $(ROUTINO_SRC)/tagging.o \
102 $(ROUTINO_SRC)/uncompress.o $(ROUTINO_SRC)/osmxmlparse.o $(ROUTINO_SRC)/osmpbfparse.o $(ROUTINO_SRC)/osmo5mparse.o
103
104 fixme-finder-slim : $(FIXME_FINDER_SLIM_OBJ)
105 $(LD) $(FIXME_FINDER_SLIM_OBJ) -o $@ $(LDFLAGS)
106
107 ########
108
109 FIXME_DUMPER_OBJ=fixme-dumper.o \
110 $(ROUTINO_SRC)/errorlog.o \
111 $(ROUTINO_SRC)/files.o $(ROUTINO_SRC)/logging.o $(ROUTINO_SRC)/xmlparse.o
112
113 fixme-dumper : $(FIXME_DUMPER_OBJ)
114 $(LD) $(FIXME_DUMPER_OBJ) -o $@ $(LDFLAGS)
115
116 ########
117
118 FIXME_DUMPER_SLIM_OBJ=fixme-dumper-slim.o \
119 $(ROUTINO_SRC)/errorlog-slim.o \
120 $(ROUTINO_SRC)/files.o $(ROUTINO_SRC)/logging.o $(ROUTINO_SRC)/xmlparse.o
121
122 fixme-dumper-slim : $(FIXME_DUMPER_SLIM_OBJ)
123 $(LD) $(FIXME_DUMPER_SLIM_OBJ) -o $@ $(LDFLAGS)
124
125 ########
126
127 $(ROUTINO_SRC)/%.o :
128 cd $(ROUTINO_SRC) && $(MAKE) $(notdir $@)
129
130 $(ROUTINO_SRC)/%-slim.o :
131 cd $(ROUTINO_SRC) && $(MAKE) $(notdir $@)
132
133 %.o : %.c
134 @[ -d .deps ] || mkdir .deps
135 $(CC) -c $(CFLAGS) -DSLIM=0 -I$(ROUTINO_SRC) $< -o $@ -MMD -MP -MF $(addprefix .deps/,$(addsuffix .d,$(basename $@)))
136
137 %-slim.o : %.c
138 @[ -d .deps ] || mkdir .deps
139 $(CC) -c $(CFLAGS) -DSLIM=1 -I$(ROUTINO_SRC) $< -o $@ -MMD -MP -MF $(addprefix .deps/,$(addsuffix .d,$(basename $@)))
140
141 ########
142
143 test:
144
145 ########
146
147 install:
148
149 ########
150
151 clean:
152 rm -f *~
153 rm -f *.o
154 rm -f core
155
156 ########
157
158 distclean: clean
159 -cd $(WEBBINDIR) && rm -f $(EXE)
160 -cd $(WEBDATADIR) && rm -f $(DATA)
161 -cd $(WEBWWWDIR) && rm -f $(WWW_COPY)
162 -cd $(WEBWWWDIR) && rm -f $(DOC_COPY)
163 -rm -f $(EXE)
164 -rm -f $(D)
165 -rm -fr .deps
166
167 ########
168
169 include $(D)
170
171 ########
172
173 .PHONY:: all test install clean distclean
174
175 .PHONY:: all-bin all-data all-www