File: rules

package info (click to toggle)
openfoam 1812%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 220,284 kB
  • sloc: cpp: 1,038,902; sh: 14,536; ansic: 8,240; lex: 657; xml: 387; python: 300; awk: 212; makefile: 94; sed: 88; csh: 3
file content (85 lines) | stat: -rwxr-xr-x 3,161 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/usr/bin/make -f

DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
VENDOR := $(shell dpkg-vendor --derives-from Ubuntu && echo Ubuntu || echo Debian)

CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# less debug info to avoid running out of address space during build
ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel))
    export DEB_CXXFLAGS_MAINT_APPEND = -g1
endif

%:
	dh $@

export FOAM_APP=$(CURDIR)/applications
export FOAM_SOLVERS=$(CURDIR)/applications/solvers
export FOAM_APPBIN=$(CURDIR)/platforms/linux64Gcc51/bin
export FOAM_EXT_LIBBIN=$(CURDIR)/platforms/linux64Gcc51/lib
export FOAM_LIBBIN=$(CURDIR)/platforms/linux64Gcc51/lib
export FOAM_MPI=openmpi-system
export FOAM_RUN=$(CURDIR)/run
export FOAM_SRC=$(CURDIR)/src
export FOAM_ETC=$(CURDIR)/etc
export FOAM_USER_APPBIN=$(CURDIR)/platforms/linux64Gcc51/bin
export FOAM_USER_LIBBIN=$(CURDIR)/platforms/linux64Gcc51/lib
export MANPATH=$(CURDIR)/platforms/linux64Gcc/openmpi-3.1.3/share/man
export MPI_ARCH_PATH=/usr/include/openmpi
export WM_ARCH=linux64
export WM_ARCH_OPTION=$(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)
export WM_LABEL_SIZE=32
export WM_LABEL_OPTION=Int32
export WM_CC=gcc
export WM_CFLAGS=-fPIC -I/usr/include/openmpi ${CFLAGS}
export WM_COMPILER=Gcc
export WM_COMPILER_LIB_ARCH=64
export WM_COMPILE_OPTION=Opt
export WM_CXX=g++
export WM_CXXFLAGS=-fPIC -I/usr/include/openmpi ${CXXFLAGS}
export WM_DIR=$(CURDIR)/wmake
export WM_LDFLAGS=-I/usr/include/openmpi ${LDFLAGS}
export WM_OSTYPE=POSIX
export WM_OPTIONS=linux64Gcc51
export WM_PRECISION_OPTION=DP
export WM_PROJECT=OpenFOAM
export WM_PROJECT_DIR=$(CURDIR)
export WM_PROJECT_USER_DIR=$(CURDIR)/debian/tmp
export WM_PROJECT_VERSION=1812
export gperftools_install=$(CURDIR)/platforms/linux64Gcc
export WM_MPLIB=SYSTEMOPENMPI
unexport FOAMY_HEX_MESH

NUMJOBS := 1
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    NUMJOBS := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif
# Limit parallel build to 3 processes on Ubuntu amd64, arm64 and ppc64el
ifeq ($(VENDOR),Ubuntu)
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 arm64 ppc64el))
    NUMJOBS := $(shell if test $(NUMJOBS) -gt 3; then echo 3 ; else echo $(NUMJOBS); fi)
endif
endif

export WM_NCOMPPROCS=$(NUMJOBS)

export LD_LIBRARY_PATH:=$(CURDIR)/platforms/linux64Gcc51/lib/openmpi-system:/usr/lib/openmpi/lib:$(CURDIR)/platforms/linux64Gcc51/lib:$(CURDIR)/site/3.0.x/platforms/linux64Gcc51/lib:$(CURDIR)/platforms/linux64Gcc51/lib:$(CURDIR)/platforms/linux64Gcc51/lib/dummy:$(CURDIR)/src/:$(LD_LIBRARY_PATH);

override_dh_clean:
	# OpenFOAM uses .orig as a control file extension
	dh_clean -X "*.orig"

override_dh_auto_build:
	PATH=$(PATH):$(CURDIR)/wmake/:$(CURDIR)/etc ./Allwmake -j$(NUMJOBS)
	if [ -x bin/tools/foamCreateManpage ]; then \
	    bin/tools/foamCreateManpage -gzip -version "1812" || \
		echo "ignore problems generating manpages"; \
	fi

override_dh_missing-arch:
	dh_missing --list-missing