summaryrefslogtreecommitdiff
path: root/academic/xfoil/Makefile_patches/Makefile.xfoil.patch
blob: e8e0b413e3e5ab0bc320ed9a0da68b0bebb22624 (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
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
--- bin/Makefile	2013-11-19 00:23:37.000000000 -0500
+++ bin/Makefile.xfoil	2016-09-12 22:42:05.000000000 -0400
@@ -4,10 +4,7 @@
 # M.Drela
 #*********************************************************
 
-
-SHELL = sh
-BINDIR = /home/codes/bin/
-#BINDIR = .
+BINDIR = $(DESTDIR)/usr/bin
 
 PROGS = xfoil pplot pxplot
 
@@ -33,104 +30,39 @@
 OSOBJ = frplot.o ntcalc.o osmap.o getosfile.o
 
 ##----------------------------------------------------
-PLTOBJ = ../plotlib/libPlt.a 
+PLTOBJ = ../plotlib/libPlt_gDP.a 
 
 # Use this if you have a copy of the plotlib as a system library
 #PLTOBJ = -lPlt 
 
 # The extra location arg here is for Linux which places X libs in /usr/X11R6
-PLTLIB = -L/usr/X11R6/lib -lX11
+PLTLIB = -lX11
 
 ###================================================
 ###  Default compilers and flags
 ###  FFLOPT used for xsolve.f
-FC = f77
-FFLAGS  = -O 
-FFLOPT  = -O
-INSTALLCMD = install -s
-
-CC = cc
-CFLAGS = -O -DUNDERSCORE
-
-##--------------------------
 
-# Uncomment flags for desired machine...
+CC = gcc
+CFLAGS = -O2 -DUNDERSCORE
 
 ##--------------------------
-### DEC Alpha with OSF and DEC f77/f90 compiler
-#FC = f77
-#FFLAGS = -fast -O4 -tune host
-#FFLOPT = -fast -O4 -tune host
-#FFLOPT = -fast -O5 -tune host -unroll 3
-# Debug flags
-#FFLAGS = -O0 -g
-#FFLOPT = -fast -O4 -tune host
-##--------------------------
-### SGI setup
-#FC = f77
-#FFLAGS = -O2 -static
-#FFLOPT = -O2 -static
-##--------------------------
-##  Uncomment for RS/6000
-#FFLAGS = -O -qextname
-#FFLOPT = -O -qextname
-##--------------------------
-##  Uncomment for HP-9000
-#FFLAGS = -O +ppu
-#FFLOPT = -O +ppu
-#FTNLIB = -U77
-##--------------------------
-### Absoft Linux f77
-#FC = f77
-#FFLAGS = -O -f -s -W -B108 -N34
-#FFLOPT = -O -f -s -W -B108 -N34
-##--------------------------
-### f2c/gcc compiler driver 
-#FC = fort77
-#FFLAGS = -O2 -fomit-frame-pointer
-#FFLOPT = -O2 -fomit-frame-pointer
-##--------------------------
-### GNU g77
-#FC = g77
-#FFLAGS = -O3 -fomit-frame-pointer
-#FFLOPT = -O3 -fomit-frame-pointer
-# Debug flags (symbols, array bounds)
-#FC = g77
-#FFLAGS = -g -O0 -C
-##--------------------------
-### GNU gfortran
-#FC = gfortran
-#FFLAGS = -O3 -fomit-frame-pointer
-#FFLOPT = -O3 -fomit-frame-pointer
-# Debug flags (symbols, array bounds)
-#FFLAGS = -g -O0 -fbounds-check
-#FFLOPT = -g -O0 -fbounds-check
-#
-### Double precision option
-#FFLAGS = -O3 -fdefault-real-8
-#FFLOPT = -O3 -fdefault-real-8
-#FFLAGS = -O3 -fdefault-real-8 -fbounds-check
-#FFLOPT = -O3 -fdefault-real-8 -fbounds-check
-# Debug flags (symbols, array bounds)
-#FFLAGS = -g -O0 -C
-##--------------------------
 ### Gfortran
 FC = gfortran
 CHK = 
-CHK = -fbounds-check -finit-real=inf -ffpe-trap=invalid,zero
+#CHK = -fbounds-check -finit-real=inf -ffpe-trap=invalid,zero,denormal
 DBL = -fdefault-real-8
-FFLAGS = -O $(CHK) $(DBL)
-FFLOPT = -O $(CHK) $(DBL)
+FFLAGS = -O2 $(CHK) $(DBL)
+FFLOPT = -O2 $(CHK) $(DBL)
 FTNLIB =
 
 PLTOBJ = ../plotlib/libPlt_gDP.a 
 
 
-
 all:	 $(PROGS)
 
 install: 
-	$(INSTALLCMD) $(PROGS) $(BINDIR)
+	install -d -m 0755 $(BINDIR)
+	install -m 0755 $(PROGS) $(BINDIR)
 
 clean:
 	-/bin/rm $(PROGS)
@@ -141,20 +73,15 @@
 
 xfoil: $(XFOILOBJ) $(XUTILOBJ) $(OSOBJ)
 	$(FC) -o xfoil $(XFOILOBJ) $(XUTILOBJ) $(OSOBJ) $(PLTOBJ) $(PLTLIB) $(FTNLIB)
-	$(INSTALLCMD) xfoil $(BINDIR)
 
 pxplot:	$(PXPLOTOBJ) $(XUTILOBJ)
 	$(FC) -o pxplot $(PXPLOTOBJ) $(XUTILOBJ) $(PLTOBJ) $(PLTLIB) $(FTNLIB)
-	$(INSTALLCMD) pxplot $(BINDIR)
 
 pplot:	$(PPLOTOBJ) $(XUTILOBJ)
 	$(FC) -o pplot $(PPLOTOBJ) $(XUTILOBJ)  $(PLTOBJ) $(PLTLIB) $(FTNLIB)
-	$(INSTALLCMD) pplot $(BINDIR)
 
 blu: blu.o profil.o
 	$(FC) -o blu blu.o profil.o
-	$(INSTALLCMD) blu $(BINDIR)
-
 
 blu.o: $(SRC)/blu.f
 	$(FC) -c $(FFLAGS) $(SRC)/blu.f