Code

Build with OpenMP support
[pkg-enblend.git] / debian / rules
1 #!/usr/bin/make -f
2 # debian/rules for enblend-enfuse
3 #
4 # Written by Sebastian Harl <sh@tokkee.org>.
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
9 # These are used for cross-compiling and for saving the configure script
10 # from having to guess our platform (since we know it already)
11 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
14 CFLAGS = -Wall -g
16 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
17         CFLAGS += -O0
18 else
19         CFLAGS += -O2
20 endif
22 CONFARGS=--host=$(DEB_HOST_GNU_TYPE) \
23                 --build=$(DEB_BUILD_GNU_TYPE) \
24                 --prefix=/usr --mandir=\$${prefix}/share/man \
25                 --enable-gpu-support=yes \
26                 --with-boost-filesystem=yes \
27                 --with-openexr=yes
29 #               --disable-openmp \
30 #               --enable-image-cache=yes \
33 get-orig-source:
34         dh_testdir
35         dh_testroot
36         chmod 755 debian/bin/uscan_repack.sh
37         uscan --verbose --force-download --rename
39 # Hack: Since out of tree building of documentation is broken, make a out-tree
40 # build for mp versions and in-tree build for the regular binaries. Out of tree
41 # configure fails if in-tree configure run is detected, therefore force correct
42 # ordering by making config.status depend on build-tree-mp/config.status.
43 config.status: configure build-tree-mp/config.status
44         dh_testdir
45         CFLAGS="$(CFLAGS)" ./configure $(CONFARGS) \
46                 --disable-openmp \
47                 --enable-image-cache=yes
49 build-tree-mp/config.status: configure
50         dh_testdir
51         if ! test -e build-tree-mp ; then mkdir build-tree-mp ; fi
52         cd build-tree-mp && CFLAGS="$(CFLAGS)" ../configure $(CONFARGS) \
53                 --enable-openmp \
54                 --disable-image-cache
56 build: build-stamp
58 build-stamp: config.status build-tree-mp/config.status
59         dh_testdir
60         
61         cd build-tree-mp && $(MAKE)
62         $(MAKE)
63         
64         touch build-stamp
66 clean:
67         dh_testdir
68         dh_testroot
69         rm -f build-stamp
70         
71         [ ! -f Makefile ] || $(MAKE) distclean
72         rm -f doc/*.info
73         rm -rf build-tree-mp
74         
75         dh_clean
77 install: build-stamp
78         dh_testdir
79         dh_testroot
80         dh_clean -k
81         dh_installdirs
82         
83         $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
84         rm -f $(CURDIR)/debian/tmp/usr/share/info/dir
85         install -m755  build-tree-mp/src/enblend \
86                 $(CURDIR)/debian/tmp/usr/bin/enblend-mp
87         install -m755  build-tree-mp/src/enfuse \
88                 $(CURDIR)/debian/tmp/usr/bin/enfuse-mp
90 binary-indep:
91         # nothing to do here
93 binary-arch: build install
94         dh_testdir
95         dh_testroot
96         dh_installchangelogs -a ChangeLog
97         dh_installdocs -A -a NEWS AUTHORS
98         dh_installexamples -a
99         dh_install -a --sourcedir=debian/tmp --fail-missing
100         dh_installman -a
101         dh_installinfo -penblend doc/enblend.info
102         dh_installinfo -penfuse doc/enfuse*.info
103         dh_link -a
104         dh_strip -a
105         dh_compress -a
106         dh_fixperms -a
107         dh_installdeb -a
108         dh_shlibdeps -a
109         dh_gencontrol -a
110         dh_md5sums -a
111         dh_builddeb -a
113 binary: binary-indep binary-arch
114 .PHONY: get-orig-source build clean binary-indep binary-arch binary install