Code

Build with OpenMP support
authorAndreas Metzler <ametzler@downhill.at.eu.org>
Sun, 4 Apr 2010 10:54:59 +0000 (12:54 +0200)
committerSebastian Harl <sh@tokkee.org>
Sat, 31 Jul 2010 15:44:46 +0000 (17:44 +0200)
Compile twice with and without OpenMP. OpenMP enabled binaries are
installed as enblend-mp/enfuse-mp.

debian/changelog
debian/enblend.install
debian/enblend.links [new file with mode: 0644]
debian/enfuse.install
debian/enfuse.links [new file with mode: 0644]
debian/rules

index ea67ddb61eb1c4c8f9ee4b3312451d8a9ebee035..f68064e3a977a31057af973e1a66988963670253 100644 (file)
@@ -7,6 +7,8 @@ enblend-enfuse (4.0+dfsg-1) experimental; urgency=low
   * [debian/rules] Don't try to install TODO - no longer shipped upstream.
   * focus-stacking.info is not installed as a separate file anymore.
   * Update build-depends by adding gnuplot transfig tidy ttf-freefont.
+  * Build/ship alternative binaries of enblend and enfuse binaries with OpenMP
+    support. They are installed as enblend-mp and enfuse-mp respectively.
 
   [ Sebastian Harl ]
   * debian/rules:
index 8b18bc9d9172eb7fe0d2aa163fab250ac8584564..5977df914a2d4cb2a0bd43418ca0bfb2e1e777a9 100644 (file)
@@ -1,4 +1,5 @@
 usr/bin/enblend
+usr/bin/enblend-mp
 usr/share/info/enblend.info
 usr/share/man/man1/enblend.1
 
diff --git a/debian/enblend.links b/debian/enblend.links
new file mode 100644 (file)
index 0000000..2b4f0d4
--- /dev/null
@@ -0,0 +1 @@
+usr/share/man/man1/enblend.1.gz usr/share/man/man1/enblend-mp.1.gz
index a693dcacb61536d2918e46ca16864f3f6bc9cc08..5d949a48f31f7f04d736659807664be706a9e5e8 100644 (file)
@@ -1,4 +1,5 @@
 usr/bin/enfuse
+usr/bin/enfuse-mp
 usr/share/info/enfuse.info
 usr/share/man/man1/enfuse.1
 
diff --git a/debian/enfuse.links b/debian/enfuse.links
new file mode 100644 (file)
index 0000000..e270120
--- /dev/null
@@ -0,0 +1 @@
+usr/share/man/man1/enfuse.1.gz usr/share/man/man1/enfuse-mp.1.gz
index 163f44d3ff96fca72d95a226f82f7f435bbce7b4..7c382ef303781acd580077b2401f40577b3571f5 100755 (executable)
@@ -19,28 +19,46 @@ else
        CFLAGS += -O2
 endif
 
+CONFARGS=--host=$(DEB_HOST_GNU_TYPE) \
+               --build=$(DEB_BUILD_GNU_TYPE) \
+               --prefix=/usr --mandir=\$${prefix}/share/man \
+               --enable-gpu-support=yes \
+               --with-boost-filesystem=yes \
+               --with-openexr=yes
+
+#              --disable-openmp \
+#              --enable-image-cache=yes \
+
+
 get-orig-source:
        dh_testdir
        dh_testroot
        chmod 755 debian/bin/uscan_repack.sh
        uscan --verbose --force-download --rename
 
-config.status: configure
+# Hack: Since out of tree building of documentation is broken, make a out-tree
+# build for mp versions and in-tree build for the regular binaries. Out of tree
+# configure fails if in-tree configure run is detected, therefore force correct
+# ordering by making config.status depend on build-tree-mp/config.status.
+config.status: configure build-tree-mp/config.status
        dh_testdir
-       CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
-               --build=$(DEB_BUILD_GNU_TYPE) \
-               --prefix=/usr --mandir=\$${prefix}/share/man \
-               --enable-gpu-support=yes \
+       CFLAGS="$(CFLAGS)" ./configure $(CONFARGS) \
                --disable-openmp \
-               --enable-image-cache=yes \
-               --with-boost-filesystem=yes \
-               --with-openexr=yes
+               --enable-image-cache=yes
+
+build-tree-mp/config.status: configure
+       dh_testdir
+       if ! test -e build-tree-mp ; then mkdir build-tree-mp ; fi
+       cd build-tree-mp && CFLAGS="$(CFLAGS)" ../configure $(CONFARGS) \
+               --enable-openmp \
+               --disable-image-cache
 
 build: build-stamp
 
-build-stamp:  config.status
+build-stamp: config.status build-tree-mp/config.status
        dh_testdir
        
+       cd build-tree-mp && $(MAKE)
        $(MAKE)
        
        touch build-stamp
@@ -52,10 +70,11 @@ clean:
        
        [ ! -f Makefile ] || $(MAKE) distclean
        rm -f doc/*.info
+       rm -rf build-tree-mp
        
        dh_clean
 
-install: build
+install: build-stamp
        dh_testdir
        dh_testroot
        dh_clean -k
@@ -63,6 +82,10 @@ install: build
        
        $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
        rm -f $(CURDIR)/debian/tmp/usr/share/info/dir
+       install -m755  build-tree-mp/src/enblend \
+               $(CURDIR)/debian/tmp/usr/bin/enblend-mp
+       install -m755  build-tree-mp/src/enfuse \
+               $(CURDIR)/debian/tmp/usr/bin/enfuse-mp
 
 binary-indep:
        # nothing to do here