Git init
[framework/uifw/xorg/proto/x11proto-xext.git] / debian / rules
1 #!/usr/bin/make -f
2 # debian/rules for the Debian x11proto-xext-dev 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 PACKAGE = x11proto-xext-dev
11
12 include debian/xsfbs/xsfbs.mk
13
14 CFLAGS = -Wall -g
15 CFLAGS += -D_F_ENABLE_XI2_SENDEVENT_
16
17 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
18         CFLAGS += -O0
19 else
20         CFLAGS += -O2
21 endif
22 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
23         NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
24         MAKEFLAGS += -j$(NUMJOBS)
25 endif
26
27 DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
28 DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
29 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
30 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
31         confflags += --build=$(DEB_HOST_GNU_TYPE)
32 else
33         confflags += --build=$(DEB_HOST_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
34 #       confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
35 endif
36
37 configure:
38         autoreconf -vfi
39
40 obj-$(DEB_BUILD_GNU_TYPE)/config.status: configure
41         mkdir -p obj-$(DEB_BUILD_GNU_TYPE)
42         cd obj-$(DEB_BUILD_GNU_TYPE) && \
43         ../configure --prefix=/usr --mandir=\$${prefix}/share/man \
44                      --infodir=\$${prefix}/share/info --disable-shared \
45                      $(confflags) CFLAGS="$(CFLAGS)" 
46
47 build: build-stamp
48 build-stamp: obj-$(DEB_BUILD_GNU_TYPE)/config.status
49         dh_testdir
50         cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE)
51         touch build-stamp
52
53 clean:
54         dh_testdir
55         dh_testroot
56         rm -f build-stamp
57
58         rm -f config.cache config.log config.status config.guess config.sub
59         rm -f */config.cache */config.log */config.status */config.guess */config.sub
60         rm -f conftest* */conftest*
61         rm -rf autom4te.cache */autom4te.cache
62         rm -rf obj-*
63         rm -f $$(find -name Makefile.in)
64         rm -f aclocal.m4 configure install-sh missing mkinstalldirs
65
66         dh_clean
67
68 install: build
69         dh_testdir
70         dh_testroot
71         dh_clean -k
72         dh_installdirs
73
74         cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
75
76 # Build architecture-independent files here.
77 binary-indep: build install
78         dh_testdir
79         dh_testroot
80
81 #       dh_installdocs
82 #       dh_installman
83         dh_install --sourcedir=debian/tmp --list-missing
84 #       dh_installchangelogs
85         dh_link
86         dh_strip
87         dh_compress
88         dh_fixperms
89         dh_installdeb
90         dh_shlibdeps
91         dh_gencontrol
92         dh_md5sums
93         dh_builddeb
94
95 # Build architecture-dependent files here.
96 binary-arch: build install
97 # Nothing to do
98
99 binary: binary-indep binary-arch
100 .PHONY: build clean binary-indep binary-arch binary install