blob: 5cdd1ce10069d5f174d31939d4aac0e4ae73e2a4 (
plain)
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
|
RM = rm -f
CC = CC
# Find a suitable compiler:
FC := $(shell which f95 || which f90 || which f77)
ifeq ($(FC),)
$(error Fortran compiler not found; please fix $$FC in Makefile)
endif
CFLAGS = -C
INCLUDES =
LIBS =
.SUFFIXES : .o .f
# rule to create .o files from .f files
.f.o:
$(RM) $*.o
$(FC) -c $(CFLAGS) $(INCLUDES) $*.f
# rule to create executables from .o files
.o:
$(RM) $@
$(FC) $(CFLAGS) $(INCLUDES) -o $@ $< $(LIBS)
all: htdp
htdp.o: htdp.f
initvl.o: initvl.f
initeq.o: initeq.f
initbd.o: initbd.f
initps.o: initps.f
htdp: htdp.o initvl.o initeq.o initbd.o initps.o
$(FC) $(CFLAGS) $(INCLUDES) -o $@ $^ $(LIBS)
|