File: rules

package info (click to toggle)
flextra 5.0-18
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 928 kB
  • sloc: fortran: 7,018; makefile: 61; sh: 17
file content (33 lines) | stat: -rwxr-xr-x 770 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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

# Hack until gfortran updated
FMODDIR:= $(shell dh_fortran get_fmoddir)
FLIBDIR:=$(shell dh_fortran get_flibdir)
FCFLAGS:= -I$(FMODDIR)

CFLAGS=$(shell dpkg-buildflags --get CFLAGS) -g
LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS) -L $(FLIBDIR)
CFLAGS+=$(HARDENING_CFLAGS)
LDFLAGS+=$(HARDENING_LDFLAGS)

LC_ALL=C
export LC_ALL

# magic debhelper rule
%:
	dh $@

override_dh_auto_build:
	$(MAKE) -f makefile.ecmwf LDFLAGS="$(LDFLAGS)" FCFLAGS="$(FCFLAGS)" FC=$(FC)
	rm *.o
	$(MAKE) -f makefile.gfs  LDFLAGS="$(LDFLAGS)" FCFLAGS="$(FCFLAGS)" FC=$(FC)


override_dh_auto_clean:
	rm -f *.o flextra.ecmwf flextra.gfs