Git init
[external/libelf.git] / debian / rules
1 #!/usr/bin/make -f
2 #
3 # Alex Pennace
4
5 DEB_HOST_GNU_TYPE       ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
6 DEB_BUILD_GNU_TYPE      ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
7
8 CFLAGS = -Wall -g -D_REENTRANT
9
10 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
11         CFLAGS += -O0
12 else
13         CFLAGS += -O2
14 endif
15
16 build: build-stamp
17 build-stamp: 
18         dh_testdir
19         mv po/de.gmo po/de.gmo.orig
20         cp po/de.gmo.orig po/de.gmo
21         # --enable-compat per bug 477025
22         ./configure --prefix=/usr --enable-shared \
23         --enable-compat \
24           --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)
25         # I wonder what configure is thinking. Lets find out...
26         -cat ./config.status Makefile lib/Makefile po/Makefile libelf.pc \
27         config.h lib/sys_elf.h
28         make CFLAGS="$(CFLAGS)"
29         touch build-stamp
30
31 clean:
32         dh_testdir
33         dh_testroot
34         -make clean
35         -mv po/de.gmo.orig po/de.gmo
36         -make distclean
37 # distclean misses w32/Makefile; kludge around it.
38         -rm -f w32/Makefile
39         dh_clean build-stamp
40
41 binary: binary-arch binary-indep
42
43 binary-arch: build 
44         dh_testdir
45         dh_testroot
46         dh_clean -k
47         make instroot=`pwd`/debian/tmp install
48         dh_install --sourcedir=debian/tmp --list-missing
49         dh_installchangelogs ChangeLog
50         dh_installdocs README
51         dh_link
52         dh_makeshlibs -V 'libelfg0 (>= 0.8.12)'
53         dh_strip
54         dh_fixperms
55         dh_compress
56         dh_installdeb
57         dh_shlibdeps
58         dh_gencontrol
59         dh_md5sums
60         dh_builddeb
61
62 binary-indep: build
63         true