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

Last change on this file since 10088 was 10088, checked in by nic, 11 years ago

Added osmunda. Checking OSM data for routing problem by reading GPX files.

File size: 4.9 KB
Line 
1# Written by Nic Roets with contributions by Petter Reinholdtsen
2# Placed in the public domain
3# Don't run mkicons.sh until my patched pnmmontage is part of debian-netpbm
4
5TODAY := `exec date +%Y%m%d`
6VERSION = 0.0.0.$(TODAY)
7
8DESTDIR=
9prefix = /usr/local
10bindir = $(prefix)/bin
11
12CFLAGS=-O2
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/
18ARCH=           arm-wince-mingw32ce
19WINDRES=        ${ARCH}-windres
20
21# enable this to test the experimental route support
22#CFLAGS += -DROUTE_TEST
23
24ifneq (${OS},Windows_NT)
25EXTRA=`pkg-config --cflags --libs gtk+-2.0 || echo -D HEADLESS`
26XMLFLAGS=`pkg-config --cflags libxml-2.0 || echo -I /usr/include/libxml2` \
27  `pkg-config --libs libxml-2.0 || echo -l xml2 -lz -lm`
28else
29EXTRA=-mms-bitfields -mno-cygwin -I/usr/include/mingw/gtk-2.0 \
30  -I/usr/include/mingw/cairo     -I/usr/include/mingw/glib-2.0 \
31  -I/usr/include/mingw/pango-1.0 -I/usr/include/mingw/atk-1.0 \
32  -I/usr/lib/glib-2.0/include    -I/usr/lib/gtk-2.0/include \
33  -lgtk-win32-2.0 -lgdk-win32-2.0 -lglib-2.0 -lgobject-2.0 -lcairo
34endif
35
36all: gosmore
37
38gosmore:        gosmore.cpp libgosm.cpp
39                g++ ${CFLAGS} ${WARNFLAGS} ${XMLFLAGS} \
40                  -D RES_DIR='"$(prefix)/usr/share/"' \
41                  gosmore.cpp libgosm.cpp -o gosmore ${EXTRA}
42
43gosm_arm.exe:   gosmore.cpp libgosm.cpp gosmore.rsc resource.h translations.c \
44                    libgosm.h
45                ${ARCH}-g++ ${CFLAGS} -c gosmore.cpp
46                ${ARCH}-g++ ${CFLAGS} -c libgosm.cpp
47                ${ARCH}-gcc ${CFLAGS} -c ConvertUTF.c
48                ${ARCH}-gcc ${CFLAGS} -c ceglue.c
49                ${ARCH}-gcc ${CFLAGS} -o $@ \
50                  gosmore.o libgosm.o ceglue.o ConvertUTF.o gosmore.rsc
51
52gosmore.rsc:    gosmore.rc
53                ${WINDRES} $? $@
54               
55WIKIPAGE=http://wiki.openstreetmap.org/index.php/Special:Export/Gosmore
56translations.c: extract
57                wget -O - ${WIKIPAGE}/Translations |./extract >translations.c
58
59extract:        extract.c
60                ${CC} ${CFLAGS} ${XMLFLAGS} extract.c -o extract
61
62osmunda:        osmunda.cpp libgosm.cpp libgosm.h
63                g++ ${CFLAGS} ${WARNFLAGS} ${XMLFLAGS} \
64                  osmunda.cpp libgosm.cpp -o osmunda
65voices:
66                echo '(voice_rab_diphone)' >/tmp/voice_rab_diphone
67                echo 'At the junction, turn left.' | festival_client \
68                  --prolog /tmp/voice_rab_diphone --output turnleft.wav --ttw
69                echo 'At the junction, turn right.' | festival_client \
70                  --prolog /tmp/voice_rab_diphone --output turnright.wav --ttw
71                echo 'Keep left.' | festival_client \
72                  --prolog /tmp/voice_rab_diphone --output keepleft.wav --ttw
73                echo 'Keep right.' | festival_client \
74                  --prolog /tmp/voice_rab_diphone --output keepright.wav --ttw
75                echo 'If possible make a U turn.' | festival_client \
76                  --prolog /tmp/voice_rab_diphone --output uturn.wav --ttw
77                echo 'You have reached your destination.' | festival_client \
78                  --prolog /tmp/voice_rab_diphone --output stop.wav --ttw
79                echo 'At the roundabout take the first exit.' | \
80  festival_client --prolog /tmp/voice_rab_diphone --output round1.wav --ttw
81                echo 'At the roundabout take the second exit.' | \
82  festival_client --prolog /tmp/voice_rab_diphone --output round2.wav --ttw
83                echo 'At the roundabout take the third exit.' | \
84  festival_client --prolog /tmp/voice_rab_diphone --output round3.wav --ttw
85                echo 'At the roundabout take the fourth exit.' | \
86  festival_client --prolog /tmp/voice_rab_diphone --output round4.wav --ttw
87                echo 'At the roundabout take the fifth exit.' | \
88  festival_client --prolog /tmp/voice_rab_diphone --output round5.wav --ttw
89                echo 'At the roundabout take the sixth exit.' | \
90  festival_client --prolog /tmp/voice_rab_diphone --output round6.wav --ttw
91                echo 'At the roundabout take the seventh exit.' | \
92  festival_client --prolog /tmp/voice_rab_diphone --output round7.wav --ttw
93                echo 'At the roundabout take the eight exit.' | \
94  festival_client --prolog /tmp/voice_rab_diphone --output round8.wav --ttw
95
96#elemstyles.xml:
97#               wget http://josm.openstreetmap.de/svn/trunk/styles/standard/elemstyles.xml
98
99zip:
100        rm -f gosmore.zip
101        zip -j gosmore.zip gosmore.exe icons.xpm /bin/libcairo-2.dll \
102        /bin/libgtk-win32-2.0-0.dll /bin/libgdk* /bin/libglib-2.0-0.dll \
103        /bin/libgobject-2.0-0.dll /bin/libatk-1.0-0.dll /bin/libpango* \
104        /bin/libpng13.dll /bin/libgmodule-2.0-0.dll w32/zlib1.dll \
105        w32/iconv.dll w32/intl.dll
106        zip gosmore.zip /etc/gtk-2.0/* /lib/gtk-2.0/2.10.0/loaders/*
107        zip -j gosm_arm.zip ARMV4Rel/gosm_arm.exe *.wav
108        scp -P 100 gosm_arm.zip gosmore.zip \
109          nroets@nroets.openhost.dk:nroets.openhost.dk/htdocs/
110         
111install: gosmore
112        mkdir -p $(DESTDIR)$(bindir)
113        cp gosmore $(DESTDIR)$(bindir)/.
114        mkdir -p $(DESTDIR)$(prefix)/share/gosmore
115        cp -a elemstyles.xml icons.csv icons.xpm $(DESTDIR)$(prefix)/share/gosmore
116
117dist:
118        mkdir gosmore-$(VERSION)
119        cp gosmore.cpp Makefile elemstyles.xml icons.csv icons.xpm  README \
120          gosmore-$(VERSION)
121        tar zcf gosmore-$(VERSION).tar.gz gosmore-$(VERSION)
122        rm -rf gosmore-$(VERSION)
123
124clean:
125        $(RM) gosmore *.tmp *~ gosmore.zip gosmore.exe \
126          gosmore.aps gosmore.vcl gosmore.vcw extract *.o gosm_arm.exe
Note: See TracBrowser for help on using the repository browser.