upload tizen1.0 source
[adaptation/xorg/driver/xserver-xorg-video-emulfb.git] / debian / rules
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5
6 include debian/xsfbs/xsfbs.mk
7
8 CFLAGS = -Wall -Werror -g
9 LDFLAGS +=  -Wl,--hash-style=both -Wl,--as-needed
10 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
11         CFLAGS += -O0
12 else
13         CFLAGS += -O2
14 endif
15 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
16         NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
17         MAKEFLAGS += -j$(NUMJOBS)
18 endif
19
20 DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
21 DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
22 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
23 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
24         confflags += --build=$(DEB_HOST_GNU_TYPE)
25 else
26         confflags += --build=$(DEB_HOST_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
27 #       confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
28 endif
29
30 ifeq (armel, $(DEB_HOST_ARCH))
31    confflags += --disable-v4l2
32    confflags += --enable-arm
33 endif
34
35 # kbd_drv.a isn't phenomenally useful; kbd_drv.so more so
36 confflags += --disable-static
37
38 configure: $(STAMP_DIR)/patch
39         dh_testdir
40         autoreconf -vfi
41
42 build: build-stamp
43 build-stamp: configure
44         dh_testdir
45
46         test -d obj-$(DEB_BUILD_GNU_TYPE) || mkdir obj-$(DEB_BUILD_GNU_TYPE)
47         cd obj-$(DEB_BUILD_GNU_TYPE) && \
48         ../configure --prefix=/usr --mandir=\$${prefix}/share/man \
49                      --infodir=\$${prefix}/share/info $(confflags) \
50                      CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
51         cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE)
52         >$@
53
54 install: build
55         dh_testdir
56         dh_testroot
57         dh_clean -k
58         dh_installdirs
59
60         cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
61
62 # Build architecture-dependent files here.
63 binary: build install
64         dh_testdir
65         dh_testroot
66         dh_installdocs
67         dh_installchangelogs ChangeLog
68         dh_install --sourcedir=debian/tmp --list-missing
69         dh_link
70         dh_strip --dbg-package=xserver-xorg-video-emulfb-dbg
71         dh_compress
72         dh_fixperms
73         dh_installdeb
74         dh_shlibdeps --
75         #dh_shlibdeps -- --warnings=6
76         dh_gencontrol
77         dh_md5sums
78         dh_builddeb
79
80
81
82 clean: xsfclean
83         dh_testdir
84         dh_testroot
85         rm -f build-stamp
86
87         rm -f config.cache config.log config.status
88         rm -f */config.cache */config.log */config.status
89         rm -f conftest* */conftest*
90         rm -rf autom4te.cache */autom4te.cache
91         rm -rf obj-*
92         rm -f aclocal.m4 config.guess config.sub config.h.in configure
93         rm -f depcomp install-sh ltmain.sh missing mkinstalldirs
94         rm -f $$(find -name Makefile.in)
95         rm -f build-stamp-*
96         dh_clean
97
98
99 binary-arch: binary
100
101 binary: binary-indep binary-arch
102 .PHONY: build clean binary-indep binary-arch binary install