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

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

Added man page.

File size: 5.0 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/
18ARCH=           arm-wince-mingw32ce
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`
32else
33# To compile with mingw, install MSYS and mingw, and then download
34# the "all-in-one bundle" from http://www.gtk.org/download-windows.html
35# and unzip it to C:\msys\1.0.
36EXTRA=-mms-bitfields -mno-cygwin `pkg-config --cflags --libs gtk+-2.0`
37endif
38
39all: gosmore
40
41gosmore:        gosmore.cpp libgosm.cpp libgosm.h
42                g++ ${CFLAGS} ${WARNFLAGS} ${XMLFLAGS} \
43                  gosmore.cpp libgosm.cpp -o gosmore ${EXTRA}
44
45gosm_arm.exe:   gosmore.cpp libgosm.cpp gosmore.rsc resource.h translations.c \
46                    libgosm.h ceglue.h ceglue.c
47                ${ARCH}-g++ ${CFLAGS} -c gosmore.cpp
48                ${ARCH}-g++ ${CFLAGS} -c libgosm.cpp
49                ${ARCH}-gcc ${CFLAGS} -c ConvertUTF.c
50                ${ARCH}-gcc ${CFLAGS} -c ceglue.c
51                ${ARCH}-gcc ${CFLAGS} -o $@ \
52                  gosmore.o libgosm.o ceglue.o ConvertUTF.o gosmore.rsc
53
54gosmore.rsc:    gosmore.rc icons.bmp icons-mask.bmp gosmore.ico
55                ${WINDRES} $< $@
56
57WIKIPAGE=http://wiki.openstreetmap.org/index.php/Special:Export/Gosmore
58translations.c: extract
59                wget -O - ${WIKIPAGE}/Translations |./extract >translations.c
60
61extract:        extract.c
62                ${CC} ${CFLAGS} ${XMLFLAGS} extract.c -o extract
63
64osmunda:        osmunda.cpp libgosm.cpp libgosm.h
65                g++ ${CFLAGS} ${WARNFLAGS} ${XMLFLAGS} \
66                  osmunda.cpp libgosm.cpp -o osmunda
67voices:
68                echo '(voice_rab_diphone)' >/tmp/voice_rab_diphone
69                echo 'At the junction, turn left.' | festival_client \
70                  --prolog /tmp/voice_rab_diphone --output turnleft.wav --ttw
71                echo 'At the junction, turn right.' | festival_client \
72                  --prolog /tmp/voice_rab_diphone --output turnright.wav --ttw
73                echo 'Keep left.' | festival_client \
74                  --prolog /tmp/voice_rab_diphone --output keepleft.wav --ttw
75                echo 'Keep right.' | festival_client \
76                  --prolog /tmp/voice_rab_diphone --output keepright.wav --ttw
77                echo 'If possible make a U turn.' | festival_client \
78                  --prolog /tmp/voice_rab_diphone --output uturn.wav --ttw
79                echo 'You have reached your destination.' | festival_client \
80                  --prolog /tmp/voice_rab_diphone --output stop.wav --ttw
81                echo 'At the roundabout take the first exit.' | \
82  festival_client --prolog /tmp/voice_rab_diphone --output round1.wav --ttw
83                echo 'At the roundabout take the second exit.' | \
84  festival_client --prolog /tmp/voice_rab_diphone --output round2.wav --ttw
85                echo 'At the roundabout take the third exit.' | \
86  festival_client --prolog /tmp/voice_rab_diphone --output round3.wav --ttw
87                echo 'At the roundabout take the fourth exit.' | \
88  festival_client --prolog /tmp/voice_rab_diphone --output round4.wav --ttw
89                echo 'At the roundabout take the fifth exit.' | \
90  festival_client --prolog /tmp/voice_rab_diphone --output round5.wav --ttw
91                echo 'At the roundabout take the sixth exit.' | \
92  festival_client --prolog /tmp/voice_rab_diphone --output round6.wav --ttw
93                echo 'At the roundabout take the seventh exit.' | \
94  festival_client --prolog /tmp/voice_rab_diphone --output round7.wav --ttw
95                echo 'At the roundabout take the eight exit.' | \
96  festival_client --prolog /tmp/voice_rab_diphone --output round8.wav --ttw
97
98#elemstyles.xml:
99#               wget http://josm.openstreetmap.de/svn/trunk/styles/standard/elemstyles.xml
100
101zip:
102        (cd /msys; zip - etc/gtk-2.0/* lib/gtk-2.0/2.10.0/loaders/*) >gosmore.zip
103        zip -j gosmore.zip gosmore.exe icons.xpm /msys/bin/libcairo-2.dll \
104        /msys/bin/lib*.dll /msys/bin/intl*.dll /msys/bin/zlib*.dll
105        zip -j gosm_arm.zip ARMV4Rel/gosm_arm.exe *.wav
106        # scp -P 100 gosm_arm.zip gosmore.zip \
107        #  nroets@nroets.openhost.dk:nroets.openhost.dk/htdocs/
108         
109install: gosmore
110        mkdir -p $(DESTDIR)$(bindir)
111        cp gosmore $(DESTDIR)$(bindir)/.
112        mkdir -p $(DESTDIR)$(datarootdir)/gosmore
113        cp -a elemstyles.xml icons.csv icons.xpm $(DESTDIR)$(datarootdir)/gosmore
114        mkdir -p $(DESTDIR)$(datarootdir)/man/man1
115        gzip <gosmore.1 >$(DESTDIR)$(datarootdir)/man/man1/gosmore.1.gz
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.