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

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

Prepare for Debian packaging
Abort on pak file version mismatch
Rendering of icons less cluttered

File size: 2.1 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# enable this to test the experimental route support
16#CFLAGS += -DROUTE_TEST
17
18ifneq (${OS},Windows_NT)
19EXTRA=`pkg-config --cflags --libs gtk+-2.0 || echo -D HEADLESS`
20XMLFLAGS=`pkg-config --cflags libxml-2.0 || echo -I /usr/include/libxml2` \
21  `pkg-config --libs libxml-2.0 || echo -l xml2 -lz -lm`
22else
23EXTRA=-mms-bitfields -mno-cygwin -I/usr/include/mingw/gtk-2.0 \
24  -I/usr/include/mingw/cairo     -I/usr/include/mingw/glib-2.0 \
25  -I/usr/include/mingw/pango-1.0 -I/usr/include/mingw/atk-1.0 \
26  -I/usr/lib/glib-2.0/include    -I/usr/lib/gtk-2.0/include \
27  -lgtk-win32-2.0 -lgdk-win32-2.0 -lglib-2.0 -lgobject-2.0 -lcairo
28endif
29
30all: gosmore
31
32gosmore:        gosmore.cpp
33                g++ ${CFLAGS} ${WARNFLAGS} ${XMLFLAGS} \
34                  -D RES_DIR='"$(prefix)/usr/share/"' \
35                  gosmore.cpp -o gosmore ${EXTRA}
36
37#elemstyles.xml:
38#               wget http://josm.openstreetmap.de/svn/trunk/styles/standard/elemstyles.xml
39
40zip:
41        rm -f gosmore.zip
42        zip -j gosmore.zip gosmore.exe icons.xpm /bin/libcairo-2.dll \
43        /bin/libgtk-win32-2.0-0.dll /bin/libgdk* /bin/libglib-2.0-0.dll \
44        /bin/libgobject-2.0-0.dll /bin/libatk-1.0-0.dll /bin/libpango* \
45        /bin/libpng13.dll /bin/libgmodule-2.0-0.dll w32/zlib1.dll \
46        w32/iconv.dll w32/intl.dll
47        zip gosmore.zip /etc/gtk-2.0/* /lib/gtk-2.0/2.10.0/loaders/*
48        scp gosmore.zip ARMV4Rel/gosm_arm.exe \
49          sabiepark@www.rational.co.za:www/gosmore/
50
51install: gosmore
52        mkdir -p $(DESTDIR)$(bindir)
53        cp gosmore $(DESTDIR)$(bindir)/.
54        mkdir -p $(DESTDIR)$(prefix)/share/gosmore
55        cp -a elemstyles.xml icons.csv icons.xpm $(DESTDIR)$(prefix)/share/gosmore
56
57dist:
58        mkdir gosmore-$(VERSION)
59        cp gosmore.cpp Makefile elemstyles.xml icons.csv icons.xpm  README \
60          gosmore-$(VERSION)
61        tar zcf gosmore-$(VERSION).tar.gz gosmore-$(VERSION)
62        rm -rf gosmore-$(VERSION)
63
64clean:
65        $(RM) gosmore *.tmp *~ gosmore.zip gosmore.exe \
66          gosmore.aps gosmore.vcl gosmore.vcw
Note: See TracBrowser for help on using the repository browser.