source: subversion/applications/rendering/gosmore/Makefile @ 18429

Last change on this file since 18429 was 18429, checked in by nic, 10 years ago

Add icons for menu. Art work from openclipart.org
On the fly switching of pak file when bbox test fails.
All ports now use the same options.
Translations once again functional..
WinCE port is once again operational.
Display routing decisions to user with icons.

File size: 5.8 KB
Line 
1# Written by Nic Roets with contributions by Petter Reinholdtsen
2# Placed in the public domain
3
4TODAY := `exec date +%Y%m%d`
5VERSION = 0.0.0.$(TODAY)
6
7DESTDIR=
8prefix = /usr/local
9bindir = $(prefix)/bin
10datarootdir = $(prefix)/share
11
12CFLAGS=-O2 -DRES_DIR=\"$(prefix)/share/gosmore/\"
13WARNFLAGS= -W -Wall
14
15#"------------------------ Compiling with cegcc : ---------------------------
16# tar xzf -C / cygwin-cegcc-mingw32ce-0.51.0-1.tar.gz
17# export PATH="$PATH":/opt/mingw32ce/bin/
18
19WINDRES=        ${ARCH}windres
20
21# enable this to test the experimental route support
22#CFLAGS += -DROUTE_TEST
23
24# enable this to force gosmore into headless mode (gosmore will also
25# be put in headless mode if gtk+-2.0 isn't available)
26#CFLAGS += -DHEADLESS
27
28ifneq (${OS},Windows_NT)
29EXTRA=`pkg-config --cflags --libs gtk+-2.0 || echo -D HEADLESS`
30XMLFLAGS=`pkg-config --cflags libxml-2.0 || echo -I /usr/include/libxml2` \
31  `pkg-config --libs libxml-2.0 || echo -l xml2 -lz -lm`
32ARCH=arm-mingw32ce-
33else
34# To compile with mingw, install MSYS and mingw, and then download
35# the "all-in-one bundle" from http://www.gtk.org/download-windows.html
36# and unzip it to C:\msys\1.0.
37EXTRAC=-mms-bitfields -mno-cygwin -mwindows \
38  `pkg-config --cflags gtk+-2.0 || echo -D NOGTK`
39EXTRAL=`pkg-config --libs gtk+-2.0`
40EXE=.exe
41endif
42
43all: gosmore$(EXE)
44
45# The planet is too big to fit into the address space of a single process on
46# a 32 bit CPUs. So we break it up into pieces (overlapping rectangles and
47# some lowzoom extracts) and then run one process for each piece. The parent
48# task then chooses the most
49# appropriate process and forwards the expose, search or routing request to
50# it. THE CODE IS NOT FINISHED. Linux version looks promising.
51gosmore:        gosmore.cpp libgosm.cpp libgosm.h bboxes.c
52                g++ -DCHILDREN=16 ${CFLAGS} ${WARNFLAGS} ${XMLFLAGS} \
53                  gosmore.cpp libgosm.cpp -o gosmore ${EXTRA}
54
55gosmore16:      gosmore.cpp libgosm.cpp libgosm.h
56                g++ -DGOSMZ=16 ${CFLAGS} ${WARNFLAGS} ${XMLFLAGS} \
57                  gosmore.cpp libgosm.cpp -o gosmore16 ${EXTRA}
58
59$(ARCH)gosmore.exe:     gosmore.cpp libgosm.cpp gosmore.rsc resource.h \
60                    libgosm.h ceglue.h ceglue.c bboxes.c
61                ${ARCH}g++ ${CFLAGS} ${EXTRAC} -c gosmore.cpp
62                ${ARCH}g++ ${CFLAGS} ${EXTRAC} -c libgosm.cpp
63                ${ARCH}gcc ${CFLAGS} ${EXTRAC} -c ConvertUTF.c
64                ${ARCH}gcc ${CFLAGS} ${EXTRAC} -c ceglue.c
65                ${ARCH}g++ ${CFLAGS} ${EXTRAC} -o $@ \
66                  gosmore.o libgosm.o ceglue.o ConvertUTF.o gosmore.rsc
67
68gosmore.rsc:    gosmore.rc icons.bmp icons-mask.bmp gosmore.ico
69                $(WINDRES) $< $@
70
71WIKIPAGE=http://wiki.openstreetmap.org/index.php/Special:Export/Gosmore
72translations.c: extract
73                wget -O - ${WIKIPAGE}/Translations |./extract >translations.c
74
75extract:        extract.c
76                ${CC} ${CFLAGS} ${XMLFLAGS} extract.c -o extract
77
78bboxes.c:       density.c density.txt
79                gcc -lm density.c -o density
80                ./density <density.txt >density.sh
81# wget http://www.openstreetmap.org/api/0.6/changeset/1707270/download -O \
82#   countries.osm
83
84osmunda:        osmunda.cpp libgosm.cpp libgosm.h
85                g++ ${CFLAGS} ${WARNFLAGS} ${XMLFLAGS} \
86                  osmunda.cpp libgosm.cpp -o osmunda
87voices:
88                echo '(voice_rab_diphone)' >/tmp/voice_rab_diphone
89                echo 'At the junction, turn left.' | festival_client \
90                  --prolog /tmp/voice_rab_diphone --output turnleft.wav --ttw
91                echo 'At the junction, turn right.' | festival_client \
92                  --prolog /tmp/voice_rab_diphone --output turnright.wav --ttw
93                echo 'Keep left.' | festival_client \
94                  --prolog /tmp/voice_rab_diphone --output keepleft.wav --ttw
95                echo 'Keep right.' | festival_client \
96                  --prolog /tmp/voice_rab_diphone --output keepright.wav --ttw
97                echo 'If possible make a U turn.' | festival_client \
98                  --prolog /tmp/voice_rab_diphone --output uturn.wav --ttw
99                echo 'You have reached your destination.' | festival_client \
100                  --prolog /tmp/voice_rab_diphone --output stop.wav --ttw
101                echo 'At the roundabout take the first exit.' | \
102  festival_client --prolog /tmp/voice_rab_diphone --output round1.wav --ttw
103                echo 'At the roundabout take the second exit.' | \
104  festival_client --prolog /tmp/voice_rab_diphone --output round2.wav --ttw
105                echo 'At the roundabout take the third exit.' | \
106  festival_client --prolog /tmp/voice_rab_diphone --output round3.wav --ttw
107                echo 'At the roundabout take the fourth exit.' | \
108  festival_client --prolog /tmp/voice_rab_diphone --output round4.wav --ttw
109                echo 'At the roundabout take the fifth exit.' | \
110  festival_client --prolog /tmp/voice_rab_diphone --output round5.wav --ttw
111                echo 'At the roundabout take the sixth exit.' | \
112  festival_client --prolog /tmp/voice_rab_diphone --output round6.wav --ttw
113                echo 'At the roundabout take the seventh exit.' | \
114  festival_client --prolog /tmp/voice_rab_diphone --output round7.wav --ttw
115                echo 'At the roundabout take the eight exit.' | \
116  festival_client --prolog /tmp/voice_rab_diphone --output round8.wav --ttw
117
118#elemstyles.xml:
119#               wget http://josm.openstreetmap.de/svn/trunk/styles/standard/elemstyles.xml
120
121zip:
122        (cd /msys; zip - etc/gtk-2.0/* lib/gtk-2.0/2.10.0/loaders/*) >gosmore.zip
123        zip -j gosmore.zip gosmore.exe icons.xpm /msys/bin/libcairo-2.dll \
124        /msys/bin/lib*.dll /msys/bin/intl*.dll /msys/bin/zlib*.dll
125        zip -j gosm_arm.zip ARMV4Rel/gosm_arm.exe *.wav
126        # scp -P 100 gosm_arm.zip gosmore.zip \
127        #  nroets@nroets.openhost.dk:nroets.openhost.dk/htdocs/
128         
129install: gosmore
130        mkdir -p $(DESTDIR)$(bindir)
131        cp gosmore $(DESTDIR)$(bindir)/.
132        mkdir -p $(DESTDIR)$(datarootdir)/gosmore
133        cp -a elemstyles.xml icons.csv icons.xpm $(DESTDIR)$(datarootdir)/gosmore
134        mkdir -p $(DESTDIR)$(datarootdir)/man/man1
135        gzip <gosmore.1 >$(DESTDIR)$(datarootdir)/man/man1/gosmore.1.gz
136
137dist:
138        mkdir gosmore-$(VERSION)
139        cp gosmore.cpp Makefile elemstyles.xml icons.csv icons.xpm  README \
140          gosmore-$(VERSION)
141        tar zcf gosmore-$(VERSION).tar.gz gosmore-$(VERSION)
142        rm -rf gosmore-$(VERSION)
143
144clean:
145        $(RM) gosmore *.tmp *~ gosmore.zip $(ARCH)gosmore.exe gosmore.rsc \
146          gosmore.aps gosmore.vcl gosmore.vcw extract *.o
Note: See TracBrowser for help on using the repository browser.