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

Last change on this file since 9280 was 9264, checked in by nic, 12 years ago

WinCE : Better fullscreen
Experimental verbal commands

File size: 2.6 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
39                g++ ${CFLAGS} ${WARNFLAGS} ${XMLFLAGS} \
40                  -D RES_DIR='"$(prefix)/usr/share/"' \
41                  gosmore.cpp -o gosmore ${EXTRA}
42
43gosm_arm.exe:   gosmore.cpp ConvertUTF.c ConvertUTF.h gosmore.rsc resource.h
44                ${ARCH}-g++ ${CFLAGS} -c gosmore.cpp
45                ${ARCH}-gcc ${CFLAGS} -c ConvertUTF.c
46                ${ARCH}-gcc ${CFLAGS} -c ceglue.c
47                ${ARCH}-gcc ${CFLAGS} -o $@ \
48                  gosmore.o ConvertUTF.o gosmore.rsc
49
50gosmore.rsc:    gosmore.rc
51                ${WINDRES} $? $@
52               
53
54#elemstyles.xml:
55#               wget http://josm.openstreetmap.de/svn/trunk/styles/standard/elemstyles.xml
56
57zip:
58        rm -f gosmore.zip
59        zip -j gosmore.zip gosmore.exe icons.xpm /bin/libcairo-2.dll \
60        /bin/libgtk-win32-2.0-0.dll /bin/libgdk* /bin/libglib-2.0-0.dll \
61        /bin/libgobject-2.0-0.dll /bin/libatk-1.0-0.dll /bin/libpango* \
62        /bin/libpng13.dll /bin/libgmodule-2.0-0.dll w32/zlib1.dll \
63        w32/iconv.dll w32/intl.dll
64        zip gosmore.zip /etc/gtk-2.0/* /lib/gtk-2.0/2.10.0/loaders/*
65        scp gosmore.zip ARMV4Rel/gosm_arm.exe \
66          sabiepark@www.rational.co.za:www/gosmore/
67
68install: gosmore
69        mkdir -p $(DESTDIR)$(bindir)
70        cp gosmore $(DESTDIR)$(bindir)/.
71        mkdir -p $(DESTDIR)$(prefix)/share/gosmore
72        cp -a elemstyles.xml icons.csv icons.xpm $(DESTDIR)$(prefix)/share/gosmore
73
74dist:
75        mkdir gosmore-$(VERSION)
76        cp gosmore.cpp Makefile elemstyles.xml icons.csv icons.xpm  README \
77          gosmore-$(VERSION)
78        tar zcf gosmore-$(VERSION).tar.gz gosmore-$(VERSION)
79        rm -rf gosmore-$(VERSION)
80
81clean:
82        $(RM) gosmore *.tmp *~ gosmore.zip gosmore.exe \
83          gosmore.aps gosmore.vcl gosmore.vcw
Note: See TracBrowser for help on using the repository browser.