Fix off-by-one memory error
[warzone2100:mainline.git] / Makefile.am
1 if BACKEND_QT
2 backend_subdir=lib/qtgame
3 else
4 backend_subdir=lib/sdl
5 endif
6
7 SUBDIRS = \
8         win32 \
9         3rdparty/miniupnpc \
10         3rdparty/quesoglc \
11         lib/framework \
12         lib/exceptionhandler \
13         lib/script \
14         lib/sequence \
15         lib/ivis_opengl \
16         lib/gamelib \
17         lib/sound \
18         lib/netplay \
19         lib/widget \
20         $(backend_subdir) \
21         tools/map \
22         src \
23         data \
24         po \
25         doc \
26         icons \
27         pkg/nsis \
28         tests
29
30 dist_doc_DATA = \
31         AUTHORS \
32         ChangeLog \
33         COPYING \
34         COPYING.NONGPL \
35         COPYING.README
36
37 ACLOCAL_AMFLAGS = -I m4
38
39 EXTRA_DIST= \
40         build_tools/autorevision \
41         autogen.sh \
42         config.rpath \
43         configure.ac \
44         pkg/dpkg \
45         macosx \
46         3rdparty/SDL/mac \
47         3rdparty/glm \
48         tools/image/image.cpp \
49         tools/image/configs \
50         tools/image/Image.xcodeproj \
51         po/custom/mac-infoplist.txt \
52         po/custom/warzone2100.desktop.txt
53
54 # get rid of SVN stuff in the tarball
55 dist-hook:
56         rm -rf `find $(distdir) -type d -name .svn`
57
58 javascript-doc-base:
59         grep $(top_srcdir)/src/qtscript.cpp -e '//==' | sed 's/\/\/==//' > doc/globals.tex
60         grep $(top_srcdir)/src/qtscriptfuncs.cpp -e '//==' | sed 's/\/\/==//' >> doc/globals.tex
61         grep $(top_srcdir)/src/qtscript.cpp -e '//__' | sed 's/\/\/__//' > doc/events.tex
62         grep $(top_srcdir)/src/qtscript.cpp -e '//--' | sed 's/\/\/--//' > doc/functions.tex
63         grep $(top_srcdir)/src/qtscriptfuncs.cpp -e '//--' | sed 's/\/\/--//' >> doc/functions.tex
64         grep $(top_srcdir)/src/qtscriptfuncs.cpp -e '//;;' | sed 's/\/\/;;//' > doc/objects.tex
65         test $(abs_top_srcdir) = $(abs_top_builddir) || cp $(top_srcdir)/doc/javascript.tex doc/
66
67 javascript-doc: javascript-doc-base
68 if PDFLATEX
69         (cd doc ; pdflatex javascript.tex)
70 else
71         echo "You need pdflatex installed!"
72 endif
73
74 javascript-doc-html: javascript-doc-base
75 if HEVEA
76         (cd doc; hevea javascript.tex; hevea javascript.tex)
77 if HACHA
78         (cd doc; hacha -o javascript-index.html javascript.html)
79 endif
80 else
81         echo "You need hevea installed!"
82 endif