Enable global structs for mine saving functions
[btb/d2x.git] / debian / rules
1 #!/usr/bin/make -f
2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
4
5 # Uncomment this to turn on verbose mode.
6 #export DH_VERBOSE=1
7
8 # This is the debhelper compatability version to use.
9 export DH_COMPAT=4
10
11 configure: configure-stamp configure-gl-stamp
12 configure-stamp:
13         dh_testdir
14         # Add here commands to configure the package.
15         mkdir -p build_d2x-sdl
16         cd build_d2x-sdl && ../configure --disable-debug --enable-release \
17                 --prefix=/usr --bindir=\$${prefix}/games
18
19         touch configure-stamp
20
21 configure-gl-stamp:
22         dh_testdir
23         # Add here commands to configure the package.
24         mkdir -p build_d2x-gl
25         cd build_d2x-gl && ../configure --disable-debug --enable-release --with-opengl \
26                 --prefix=/usr --bindir=\$${prefix}/games
27
28         touch configure-gl-stamp
29
30 build: build-stamp build-gl-stamp
31
32 build-stamp: configure-stamp 
33         dh_testdir
34
35         # Add here commands to compile the package.
36         cd build_d2x-sdl && $(MAKE)
37         cd build_d2x-sdl/libmve && $(MAKE) mveplayer
38         cd build_d2x-sdl/utilities && $(MAKE) utils
39
40         touch build-stamp
41
42 build-gl-stamp: configure-gl-stamp 
43         dh_testdir
44
45         # Add here commands to compile the package.
46         cd build_d2x-gl && $(MAKE)
47
48         touch build-stamp
49
50 clean:
51         dh_testdir
52         dh_testroot
53         rm -f build-stamp configure-stamp
54
55         # Add here commands to clean up after the build process.
56         rm -rf build_d2x-sdl build_d2x-gl
57
58         dh_clean
59
60 install: build
61         dh_testdir
62         dh_testroot
63         dh_clean -k
64         dh_installdirs
65
66         # Add here commands to install the package into debian/d2x.
67         cd build_d2x-sdl && $(MAKE) install DESTDIR=$(CURDIR)/debian/d2x-sdl
68         cd build_d2x-gl && $(MAKE) install DESTDIR=$(CURDIR)/debian/d2x-gl
69
70
71 # Build architecture-independent files here.
72 binary-indep: build install
73 # We have nothing to do by default.
74
75 # Build architecture-dependent files here.
76 binary-arch: build install
77         dh_testdir
78         dh_testroot
79 #       dh_installdebconf       
80         dh_installdocs -A NEWS
81         dh_installexamples
82         dh_install
83         dh_installmenu
84 #       dh_installlogrotate
85 #       dh_installemacsen
86 #       dh_installpam
87 #       dh_installmime
88 #       dh_installinit
89         dh_installcron
90         dh_installman
91         dh_installinfo
92         dh_undocumented -pd2x-sdl d2x-sdl.6
93         dh_undocumented -pd2x-gl d2x-gl.6
94         dh_installchangelogs
95         dh_link
96         dh_strip
97         dh_compress
98         dh_fixperms
99 #       dh_makeshlibs
100         dh_installdeb
101 #       dh_perl
102         dh_shlibdeps
103         dh_gencontrol
104         dh_md5sums
105         dh_builddeb
106
107 binary: binary-indep binary-arch
108 .PHONY: build clean binary-indep binary-arch binary install configure