-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (22 loc) · 783 Bytes
/
Makefile
File metadata and controls
29 lines (22 loc) · 783 Bytes
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
# Tell make to make one .out file for each .f90 file found in the current directory
H5PFC = ~/data/hdf5/bin/h5pfc
SHELL = /bin/bash
all:
@echo run \'. ./load-modules run\' first
@echo build with \'make build\'
@echo run with \'make run\'
@echo clean with \'make clean\'
@echo $(H5PFC)
build: $(patsubst %.f90, %.out, $(wildcard *.f90))
# Rule how to create arbitary .out files.
# First state what is needed for them e.g. additional headers, .f90 files in an
# include folder... Then the command to create the .out file, probably you want
# to add further options to the fc call.
run:
for i in $(shell ls *.out); do echo running $$i ...; ./$$i; done
%.out: %.f90 Makefile
$(H5PFC) $< -o $@
@if [ -f $(H5PFC) ]; then echo yes; fi
@echo
clean:
rm -f *.out *.h5 *.o