Skip to content

Commit 81606ce

Browse files
committed
Update makefile
Added conditions to set FFLAGS for GNU Fortran (gfortran) and Intel Fortran (ifort). Moved installation of docs to a separate make rule (install-docs).
1 parent 7db7180 commit 81606ce

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
PREFIX ?= /usr/local
22

33
FC ?= gfortran
4+
5+
ifeq ($(FC),"gfortran")
46
FFLAGS ?= -O3 -g -fbacktrace -fPIC
7+
endif
8+
ifeq ($(FC),"ifort")
9+
FFLAGS ?= -O3 -g -traceback -fPIC
10+
endif
511

6-
.PHONY: all clean cleanall install test
12+
.PHONY: all clean cleanall install install-docs test
713

814
all: strings.mod libfstrings.a libfstrings.so
915

@@ -30,6 +36,8 @@ install:
3036
-install -v -m 755 strings.mod $(PREFIX)/include/strings.mod
3137
-install -v -m 755 libfstrings.a $(PREFIX)/lib/libfstrings.a
3238
-install -v -m 755 libfstrings.so $(PREFIX)/lib/libfstrings.so
39+
40+
install-docs:
3341
-install -v -m 755 docs/man/man3/strings.3 $(PREFIX)/share/man/man3/strings.3
3442

3543
clean:

0 commit comments

Comments
 (0)