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