File: rules

package info (click to toggle)
openfoam 1912.200626-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 238,940 kB
  • sloc: cpp: 1,159,638; sh: 15,902; ansic: 5,195; lex: 660; xml: 387; python: 282; awk: 212; makefile: 103; sed: 88; csh: 3
file content (87 lines) | stat: -rwxr-xr-x 2,969 bytes parent folder | download | duplicates (2)
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
86
87
#!/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/linux64Gcc/bin
export FOAM_LIBBIN=$(CURDIR)/platforms/linux64Gcc/lib
export FOAM_EXT_LIBBIN=$(CURDIR)/platforms/linux64Gcc/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/linux64Gcc/bin
export FOAM_USER_LIBBIN=$(CURDIR)/platforms/linux64Gcc/lib
export MPI_ARCH_PATH=/usr/include/openmpi
export WM_ARCH=linux64
export WM_LABEL_SIZE=32
export WM_LABEL_OPTION=Int32
export WM_COMPILER=Gcc
export WM_COMPILER_LIB_ARCH=64
export WM_COMPILE_OPTION=Opt
export WM_DIR=$(CURDIR)/wmake
export WM_OPTIONS=linux64Gcc
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="$(bin/foamEtcFile -show-api)"
export gperftools_install=$(CURDIR)/platforms/linux64Gcc
export WM_MPLIB=SYSTEMOPENMPI
unexport FOAMY_HEX_MESH
unexport MAKEFLAGS

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

export WM_NCOMPPROCS=$(NUMJOBS)

export LD_LIBRARY_PATH:=$(CURDIR)/platforms/linux64Gcc/lib/openmpi-system:/usr/lib/openmpi/lib:$(CURDIR)/platforms/linux64Gcc/lib:$(CURDIR)/platforms/linux64Gcc/lib:$(CURDIR)/platforms/linux64Gcc/lib/dummy:$(LD_LIBRARY_PATH);

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

override_dh_auto_configure:
	if [ -x bin/tools/foamConfigurePaths ]; then \
	    bin/tools/foamConfigurePaths \
	        -boost boost-system \
	        -cgal  cgal-system \
	        -fftw  fftw-system \
	        -kahip kahip-none \
	        -scotch scotch-system \
	        ; \
	fi

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

override_dh_missing-arch:
	dh_missing --list-missing