pcsxr-1.9.92
[pcsx_rearmed.git] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 #export DH_VERBOSE=1
5
6 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
7 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
8 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
9
10 CFLAGS = -Wall -g
11
12 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
13         CFLAGS += -O0
14 else
15         CFLAGS += -O2 -fomit-frame-pointer
16 endif
17
18 CONFIGURE_PARAM = \
19         --host=$(DEB_HOST_GNU_TYPE) \
20         --build=$(DEB_BUILD_GNU_TYPE) \
21         --prefix=/usr \
22         --bindir=/usr/games \
23         --mandir=\$${prefix}/share/man \
24         --infodir=\$${prefix}/share/info \
25         --enable-opengl
26
27 config.status: configure
28         dh_testdir
29         CFLAGS="$(CFLAGS)" ./configure $(CONFIGURE_PARAM)
30
31 build: build-stamp
32
33 build-stamp: config.status
34         dh_testdir
35         $(MAKE)
36         touch build-stamp
37
38 clean:
39         dh_testdir
40         dh_testroot
41         rm -f build-stamp
42
43         [ ! -f Makefile ] || make distclean
44
45         dh_clean config.status config.log po/stamp-po
46
47 install: build
48         dh_testdir
49         dh_testroot
50         dh_installdirs
51         $(MAKE) install DESTDIR=$(CURDIR)/debian/pcsxr
52         # Remove useless files
53         rm -f $(CURDIR)/debian/pcsxr/usr/lib/games/psemu/*.la
54
55 binary-indep: build install
56
57 binary-arch: build install
58         dh_testdir
59         dh_testroot
60         dh_installchangelogs ChangeLog
61         dh_installdocs
62         dh_installmenu
63         dh_link
64         dh_strip
65         dh_compress
66         dh_fixperms
67         dh_installdeb
68         dh_makeshlibs
69         dh_shlibdeps
70         dh_gencontrol
71         dh_md5sums
72         dh_builddeb
73
74 binary: binary-indep binary-arch
75 .PHONY: build clean binary-indep binary-arch binary install