0df75f7a2edfbbb73157257db82ec98b34d1f5ec
[adaptation/xorg/driver/xserver-xorg-input-evdev-multitouch.git] / debian / rules
1 #!/usr/bin/make -f
2 # debian/rules for the Debian xserver-xorg-input-evdev-multitouch package.
3 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>
4 # Copyright © 2005 Daniel Stone <daniel@fooishbar.org>
5 # Copyright © 2005 David Nusinow <dnusinow@debian.org>
6
7 # Uncomment this to turn on verbose mode.
8 #export DH_VERBOSE=1
9
10 include debian/xsfbs/xsfbs.mk
11
12 CFLAGS = -Wall -g -D_F_IGNORE_TSP_RESOLUTION_
13 CFLAGS += -D_F_GESTURE_EXTENSION_
14 #CFLAGS += -D_DEBUG_MT_SEQUENCE_
15 LDFLAGS +=  -Wl,--hash-style=both -Wl,--as-needed
16 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
17         CFLAGS += -O0
18 else
19         CFLAGS += -O2
20 endif
21 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
22         NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
23         MAKEFLAGS += -j$(NUMJOBS)
24 endif
25
26 DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
27 DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
28 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
29 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
30         confflags += --build=$(DEB_HOST_GNU_TYPE)
31 else
32         confflags += --build=$(DEB_HOST_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
33 #       confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
34 endif
35
36 # kbd_drv.a isn't phenomenally useful; kbd_drv.so more so
37 confflags += --disable-static
38
39 #configure: $(STAMP_DIR)/patch
40 configure:
41         autoreconf -vfi
42         #./autogen.sh
43
44 obj-$(DEB_BUILD_GNU_TYPE)/config.status: configure
45         mkdir -p obj-$(DEB_BUILD_GNU_TYPE)
46         cd obj-$(DEB_BUILD_GNU_TYPE) && \
47         ../configure --prefix=/usr --mandir=\$${prefix}/share/man \
48                      --infodir=\$${prefix}/share/info $(confflags) \
49                      CFLAGS="$(CFLAGS)" \
50                      LDFLAGS="$(LDFLAGS)" 
51
52 build: build-stamp
53 build-stamp: obj-$(DEB_BUILD_GNU_TYPE)/config.status
54         dh_testdir
55         cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE)
56         >$@
57
58 clean: xsfclean
59         dh_testdir
60         dh_testroot
61         rm -f build-stamp
62
63         rm -f config.cache config.log config.status
64         rm -f */config.cache */config.log */config.status
65         rm -f conftest* */conftest*
66         rm -rf autom4te.cache */autom4te.cache
67         rm -rf obj-*
68         rm -f $$(find -name Makefile.in)
69         rm -f compile config.guess config.sub configure depcomp install-sh
70         rm -f ltmain.sh missing INSTALL aclocal.m4 ylwrap mkinstalldirs config.h.in
71
72         dh_clean
73
74 install: build
75         dh_testdir
76         dh_testroot
77         dh_clean -k
78         dh_installdirs
79
80         cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
81
82 # Build architecture-dependent files here.
83 binary-arch: build install serverabi
84         dh_testdir
85         dh_testroot
86
87         dh_installdocs
88         dh_installchangelogs ChangeLog
89         dh_install --sourcedir=debian/tmp --list-missing  --exclude=usr/share/man/man4
90         #dh_install --sourcedir=debian/tmp --list-missing --exclude=evdev_drv.la --exclude=usr/share/man/man4
91 #       install -d debian/xserver-xorg-input-evdev/usr/share/hal/fdi/policy/20thirdparty
92 #       install -m 644 debian/local/10-x11-evdev.fdi debian/xserver-xorg-input-evdev/usr/share/hal/fdi/policy/20thirdparty/
93         dh_installman
94         dh_link
95         dh_strip --dbg-package=xserver-xorg-input-evdev-multitouch-dbg
96         dh_compress
97         dh_fixperms
98         dh_installdeb
99 #       dh_shlibdeps -- --warnings=6
100         dh_shlibdeps --
101         dh_gencontrol
102         dh_md5sums
103         dh_builddeb
104
105 # Build architecture-independent files here.
106 binary-indep: build install
107 # Nothing to do
108
109 binary: binary-indep binary-arch
110 .PHONY: build clean binary-indep binary-arch binary install