Routino SVN Repository Browser

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

ViewVC logotype

Contents of /branches/libroutino/extras/find-fixme/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1371 - (show annotations) (download)
Mon Jun 3 17:52:50 2013 UTC (11 years, 9 months ago) by amb
Original Path: trunk/extras/find-fixme/Makefile
File size: 4654 byte(s)
Compile all of src directory before starting here.

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