forked from stanfordhpccenter/esp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
53 lines (40 loc) · 1.36 KB
/
makefile
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
42
43
44
45
46
47
48
49
50
51
52
53
INCDIR = ./include
ESPDIR = ./esp
ESPCAMDIR = ./espcam
ESPJANDIR = ./espjan
BINDIR = ./bin
OBJDIR = ./obj
SRCDIR = ./src
ESPNAME = ESP
ESPCAMNAME = ESPCAM
ESPJANNAME = ESPJAN
ESPSETUPFILES = S0.f S1.f S2.f S3.f S4.f S5.f S6.f S7.f S8.f S9.f
ESPJANSETUPFILES = A0.f A1.f A2.f A3.f A4.f A5.f A6.f
INCFILES = ESPJWORK.h INTWRKZZ.h SCKIOZZ.h
CYCLEFILES = C1.f C2.f C3.f C4.f C5.f C6.f C7.f C8.f C9.f C10.f C11.f
DISPLAYFILES = D1.f
MANIFOLDFILES = Y1.f Y2.f Y3.f Y4.f Y5.f Y6.f Y7.f Y8.f Y9.f Y10.f
INTERFACEFILES = Ib.f I1.f I2.f I3.f
CHEMFILES = E1.f E2.f E3.f E4.f E5.f E6.f E7.f
TPFILES = T1.f T2.f
VALVEFILES = V1.f V2.f
ESPFILES = $(ESPSETUPFILES) $(CYCLEFILES) $(DISPLAYFILES) $(MANIFOLDFILES) $(INTERFACEFILES)
ESPJANFILES = $(ESPJANSETUPFILES) $(CHEMFILES) $(INTERFACEFILES) $(TPFILES)
ESPCAMFILES = $(VALVEFILES) $(INTERFACEFILES)
FCC = gfortran
FFLAGS = -I$(INCDIR)
.PHONY: clean all
all: esp espjan espcam
$(OBJDIR)/%.o: $(SRCDIR)/%.f
$(FCC) -c -o $@ $< $(FFLAGS)
esp: $(patsubst %.f,$(OBJDIR)/%.o,$(ESPFILES))
$(FCC) -o $(BINDIR)/$(ESPNAME) $^ $(FFLAGS)
espjan: $(patsubst %.f,$(OBJDIR)/%.o,$(ESPJANFILES))
$(FCC) -o $(BINDIR)/$(ESPJANNAME) $^ $(FFLAGS)
espcam: $(patsubst %.f,$(OBJDIR)/%.o,$(ESPCAMFILES))
$(FCC) -o $(BINDIR)/$(ESPCAMNAME) $^ $(FFLAGS)
clean:
rm -f $(OBJDIR)/*.o
rm -f $(BINDIR)/*
rmdir $(OBJDIR) $(BINDIR)
$(shell mkdir -p $(BINDIR) $(OBJDIR))