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
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1
CPU:=$(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
FC:=$(shell basename $(shell readlink -f /usr/bin/f95))
FMODDIR:= /usr/lib/$(DEB_HOST_MULTIARCH)/fortran/$(FC)
FCFLAGS:= -I$(FMODDIR)
ifeq ($(CPU), amd64)
export FCFLAGS:= $(FCFLAGS) -mcmodel=medium
endif
ifeq ($(CPU), arm64)
export FCFLAGS:= $(FCFLAGS) -mcmodel=large -fno-pie
endif
ifeq ($(CPU), ppc64el)
export FCFLAGS:= $(FCFLAGS) -mcmodel=large
endif
LC_ALL=C
export LC_ALL
# magic debhelper rule
%:
dh $@
override_dh_auto_build:
$(MAKE) -f makefile.gfs_gfortran LDFLAGS="$(LDFLAGS)" FCFLAGS="$(FCFLAGS)"
rm -f *.o *.mod
$(MAKE) -f makefile.ecmwf_gfortran LDFLAGS="$(LDFLAGS)" FCFLAGS="$(FCFLAGS)"
rm -f ./options/SPECIES/spec_overview
find options -type f -exec chmod -x {} \;
override_dh_auto_clean:
$(MAKE) -f makefile.gfs_gfortran clean
$(MAKE) -f makefile.ecmwf_gfortran clean
rm -f *.mod erf.f90.185r.combine flexpart.gfs flexpart.ecmwf
|