forked from CEMPD/filesetapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakeit
executable file
·52 lines (37 loc) · 911 Bytes
/
Makeit
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
#!/bin/csh -f
# Extract "debug" from arguments, if needed
# Set number of iterations
set iter = $#argv
source Setup
# Loop through arguments
# Make all code for argument list
if ( $iter > 0 ) then
set i = 0
while ( $i < $iter )
@ i = $i + 1
# Determine if this is a debug executable to build or not
echo $argv[$i] | grep debug
if ( ! $status ) then
set testval = debug
else
set testval = optimized
endif
# Change compiler flags depending on debug or not
switch( $testval )
# Compile for debug case
case debug:
set fsav = ( $FFLAGS )
setenv FFLAGS "$DBGFLAGS"
make $argv[$i]
setenv FFLAGS "$fsav"
breaksw
# Compile for optimized case
default:
make $argv[$i]
breaksw
endsw
end
# Make all optimized code
else
make all
endif