Initialize Tizen 2.3
[external/ragel.git] / debian / rules
1 #!/usr/bin/make -f
2
3 CFLAGS = -g -Wall
4 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
5         CFLAGS += -O0
6 else
7         CFLAGS += -O2
8 endif
9 export CFLAGS
10
11 # for the m68k hack
12 DEB_BUILD_ARCH?=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
13 export DEB_BUILD_ARCH
14
15 configure:
16         ./autogen.sh
17
18 config.status: configure
19         dh_testdir
20         ./configure --prefix=/usr
21
22 build: build-stamp
23
24 build-stamp:  config.status
25         dh_testdir
26         $(MAKE) SUBDIRS=ragel
27         touch build-stamp
28
29 clean:
30         dh_testdir
31         dh_testroot
32         rm -f build-stamp 
33         [ ! -f Makefile ] || $(MAKE) distclean
34         [ ! -f test/Makefile ] || $(MAKE) -C test distclean
35         dh_clean
36
37 install: build
38         dh_testdir
39         dh_testroot
40         dh_prep
41         dh_installdirs
42         $(MAKE) install SUBDIRS=ragel DESTDIR=$(CURDIR)/debian/ragel
43
44 binary-indep: build install
45
46 binary-arch: build install
47         dh_testdir
48         dh_testroot
49         dh_link
50         dh_strip
51         dh_fixperms
52         dh_installdeb
53         dh_shlibdeps
54         dh_gencontrol
55         dh_md5sums
56         dh_builddeb
57
58 binary: binary-indep binary-arch
59 .PHONY: build clean binary-indep binary-arch binary install