/
Makefile
73 lines (61 loc) · 1.56 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
72
73
##
## GNU Fortran (GCC)
##
# fc=gfortran
# FFLAGS=
## (in case of MacPorts it could be called 'gfortran-mp-4.6' or alike)
##
## GNU g77
##
# fc=g77
# FFLAGS=
##
## GNU g95
##
# fc=g95
# FFLAGS=-Wl,-macosx_version_min -Wl,10.6
##
## XLF
##
# fc=xlf
# FFLAGS=-U -qextname
##
## Absoft f77
##
# fc=f77
# FFLAGS=-N15
# If you frameworks are somewhere else than under /Library/Frameworks:
# FRAMEWORKS_DIR=/opt/local/Library/Frameworks
ifneq ($(strip $(FRAMEWORKS_DIR)),)
FRAMEWORK_FLAGS=-F$(FRAMEWORKS_DIR)
endif
all: fcsel demo eventdemo1 done
fcsel:
ifndef fc
@echo ""
@echo "************************************************************"
@echo "*"
@echo "* To compile these examples, uncomment a compiler option "
@echo "* in the Makefile (or add your own option). You can also "
@echo "* specify fc and FFLAGS on the make line, e.g. "
@echo "*"
@echo "* make fc=g95 FFLAGS= "
@echo "*"
@echo "* If AquaTerm.framework is not in /Library/Frameworks, you "
@echo "* might also want to set FRAMEWORKS_DIR=/path/to/Frameworks"
@echo "*"
@echo "************************************************************"
@echo ""
@exit 1;
endif
demo: demo.f f2aquaterm.o
$(fc) -o demo $(FFLAGS) demo.f f2aquaterm.o $(FRAMEWORK_FLAGS) -framework AquaTerm
eventdemo1: eventdemo1.f f2aquaterm.o
$(fc) -o eventdemo1 $(FFLAGS) eventdemo1.f f2aquaterm.o $(FRAMEWORK_FLAGS) -framework AquaTerm
f2aquaterm.o: f2aquaterm.m
$(CC) -c f2aquaterm.m $(CFLAGS) $(FRAMEWORK_FLAGS)
done:
@echo "Done."
@echo ""
clean:
$(RM) demo eventdemo1 *.o