File: rules

package info (click to toggle)
esys-particle 2.3.4%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 13,036 kB
  • ctags: 10,805
  • sloc: cpp: 80,009; python: 5,872; makefile: 1,243; sh: 313; perl: 225
file content (42 lines) | stat: -rwxr-xr-x 1,767 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/make -f

include /usr/share/dpkg/default.mk

%:
	dh $@ --parallel --with autoreconf

export OMPI_MCA_plm_rsh_agent=/bin/false                #workaround to start MPI-applications in chroot
disable_auto_test_archs_mpi = hurd-i386 mips mipsel s390 s390x ia64

export LD_LIBRARY_PATH :=  $(CURDIR)/debian/esys-particle/usr/lib/${DEB_HOST_MULTIARCH}/:$(CURDIR)/debian/esys-particle/usr/lib/python2.7/dist-packages/esys/lsm/util/:$(CURDIR)/debian/esys-particle/usr/lib/python2.7/dist-packages/esys/lsm/:$(LD_LIBRARY_PATH);

export PYTHONPATH := $(CURDIR)/debian/esys-particle/usr/lib/python2.7/dist-packages/:$(PYTHONPATH);

export NO_PNG_PKG_MANGLE := 1

CFLAGS := -Wall $(shell dpkg-buildflags --get CFLAGS)
CXXFLAGS := -Wall $(shell dpkg-buildflags --get CXXFLAGS)
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
LDFLAGS := -lboost_python -lboost_system -lpython2.7 $(shell dpkg-buildflags --get LDFLAGS)

extra_flags += CC=mpicc CXX=mpicxx CFLAGS='$(CFLAGS)' CXXFLAGS='$(CXXFLAGS)' CPPFLAGS='$(CPPFLAGS)'\
 LDFLAGS='$(LDFLAGS)' --with-epydoc --with-vtk --with-latex --enable-vtk

override_dh_auto_configure:
	dh_auto_configure -- $(extra_flags) --with-boost-libdir=/usr/lib/$(DEB_HOST_MULTIARCH)

override_dh_auto_build:
	dh_auto_build --parallel
	doxygen

override_dh_pysupport:

override_dh_auto_install:
	dh_auto_install
ifeq (,$(filter $(DEB_HOST_ARCH),$(disable_auto_test_archs_mpi)))	
	cd $(CURDIR)/debian/test; python box.py 15.0
#cd $(CURDIR)/debian/test; mpirun --allow-run-as-root -np 3 $(CURDIR)/debian/esys-particle/usr/bin/esysparticle compression.py; cat nbons.dat; cat ekin.dat; cat epot.dat
endif
	find . -name '*.pyc' -print0 | xargs -0 rm -f
	find . -name '*.pyo' -print0 | xargs -0 rm -f
	find . -name '*.la' -print0 | xargs -0 rm -f