-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
71 lines (50 loc) · 1.42 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
VERSION = 1.2
SOURCE = src
VPATH = $(SOURCE)
OBJDIR = ./snes
MODDIR = $(SOURCE)
LFLAGS =
FFLAGS = -pedantic \
-std=f95 \
-fmax-errors=1 \
-fcheck=all \
-Wall -Wextra -Werror \
-Wno-error=unused-function
CMP = gfortran
OBJ := $(shell cat ./Objects)
ifeq ($(origin TEST_PROBLEMS), undefined)
TEST_PROBLEMS = $(sort $(wildcard qa/snestp*.in))
endif
TEST_OUTPUTS = $(TEST_PROBLEMS:.in=.outs)
TEST_OUTPUTL = $(TEST_PROBLEMS:.in=.outl)
.SUFFIXES: .f90
.PHONY: tests testl clean cleaner veryclean cleantest cleanertest verycleantest
%.o: %.F90
$(CMP) $(FFLAGS) -c -D$(MACRO) -o $@ $<
%.o: %.f90
$(CMP) $(FFLAGS) -c -o $@ $<
%.outs: %.in snes$(VERSION) qa/jcf nucdata/*
./qa/jcf $(VERSION) "s" $< 2>&1 > $*.logs
%.outl: %.in snel$(VERSION) qa/jcf nucdata/*
./qa/jcf $(VERSION) "l" $< 2>&1 > $*.logl
snes$(VERSION): MACRO=CODETYPE
snes$(VERSION): $(OBJ) Objects
$(CMP) $(FFLAGS) $(LFLAGS) $(OBJ) -o snes$(VERSION)
snel$(VERSION): MACRO=SNEL
snel$(VERSION): $(OBJ) Objects
$(CMP) $(FFLAGS) $(LFLAGS) $(OBJ) -o snel$(VERSION)
tests: $(TEST_OUTPUTS) references
./check "s"
testl: $(TEST_OUTPUTL) referencel
./check "l"
clean:
rm -f *.lst *.o *.mod loadmap
cleaner:
rm -f snes$(VERSION) snel$(VERSION)
veryclean: clean cleaner
cleantest:
rm -rf qa/snestp*.log* qa/tpx*
cleanertest:
rm -rf qa/snestp*.out* qa/snestp*.flx*
verycleantest: cleantest cleanertest
clobber: veryclean verycleantest