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