File: gmtsuppl.bat

package info (click to toggle)
gmt 3.3.3-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 3,288 kB
  • ctags: 2,962
  • sloc: ansic: 50,470; sh: 1,760; makefile: 284; asm: 38
file content (164 lines) | stat: -rw-r--r-- 5,752 bytes parent folder | download
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
ECHO OFF
REM ----------------------------------------------------
REM
REM	@(#)gmtsuppl.bat	1.17  09/22/99
REM
REM
REM	Copyright (c) 1991-1999 by P. Wessel and W. H. F. Smith
REM	See COPYING file for copying and redistribution conditions.
REM
REM	This program is free software; you can redistribute it and/or modify
REM	it under the terms of the GNU General Public License as published by
REM	the Free Software Foundation; version 2 of the License.
REM
REM	This program is distributed in the hope that it will be useful,
REM	but WITHOUT ANY WARRANTY; without even the implied warranty of
REM	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
REM	GNU General Public License for more details.
REM
REM	Contact info: www.soest.hawaii.edu/gmt
REM --------------------------------------------------------------------
REM This extremely lame DOS batch file will compile
REM the GMT 3.3.x supplemental programs under WIN32 using
REM Microsoft Visual C/C++ tools.  Not yet set up for mex.
REM
REM Author: Paul Wessel, 20-SEP-1999
REM ----------------------------------------------------
REM
REM How to make and install GMT under Win95/98/NT:
REM
REM STEP a: Install GMT using instructions in gmtinstall.bat
REM
REM STEP b: If you DID NOT install netcdf as a DLL you must
REM	    change the setting to "no" here:
REM
SET DLLCDF="yes"
REM SET DLLCDF="no"
REM
REM STEP c: Change BINDIR if necessary
REM
SET BINDIR="..\..\bin"
REM
REM STEP d: If you built GMT using dynamic libraries,
REM	    change CHOICE to "dynamic" here:
REM
REM SET CHOICE="dynamic"
SET CHOICE="static"
REM ----------------------------------------------------
REM STOP HERE - THE REST IS AUTOMATIC
REM ----------------------------------------------------
SET DLL_NETCDF="/DDLL_NETCDF"
IF %DLLCDF%=="no" SET DLL_NETCDF=
SET COPT=/I.. /DWIN32 /W3 /O2 /nologo %DLL_NETCDF% /DDLL_PSL /DDLL_GMT
IF %CHOICE%=="static" SET COPT=/I.. /DWIN32 /W3 /O2 /nologo %DLL_NETCDF%
SET LOPT=/nologo /dll /incremental:no
set LIBS=%BINDIR%\gmt.lib %BINDIR%\psl.lib netcdf.lib
REM ----------------------------------------------------
ECHO STEP 1: Make cps
REM ----------------------------------------------------
cd cps
CL %COPT% cpsencode.c %LIBS%
CL %COPT% cpsdecode.c %LIBS%
del *.obj
move *.exe %BINDIR%
cd ..
REM ----------------------------------------------------
ECHO STEP 2: Make dbase
REM ----------------------------------------------------
cd dbase
CL %COPT% grdraster.c %LIBS%
del *.obj
move *.exe %BINDIR%
cd ..
REM ----------------------------------------------------
ECHO STEP 3: Make imgsrc
REM ----------------------------------------------------
cd imgsrc
CL %COPT% img2mercgrd.c gmt_imgsubs.c %LIBS%
del *.obj
move *.exe %BINDIR%
cd ..
REM ----------------------------------------------------
ECHO STEP 4: Make meca
REM ----------------------------------------------------
cd meca
CL %COPT% /c nrutil.c distaz.c utilmeca.c utilstrain.c submeca.c utilvelo.c
CL %COPT% pscoupe.c utilmeca.obj submeca.obj distaz.obj nrutil.obj %LIBS%
CL %COPT% psmeca.c utilmeca.obj nrutil.obj %LIBS%
CL %COPT% pspolar.c utilmeca.obj submeca.obj distaz.obj nrutil.obj %LIBS%
CL %COPT% psvelo.c utilvelo.obj utilstrain.obj %LIBS%
del *.obj
move *.exe %BINDIR%
cd ..
REM ----------------------------------------------------
ECHO STEP 5: Make mex
REM ----------------------------------------------------
echo Matlab interface not ported to WIN32 - anyone interested?
REM ----------------------------------------------------
ECHO STEP 6: Make mgg
REM ----------------------------------------------------
cd mgg
IF %CHOICE%=="dynamic" CL %COPT% %DLL_NETCDF% /FD /ML /DDLL_EXPORT /c gmt_mgg.c
IF %CHOICE%=="dynamic" LINK %LOPT% /out:gmt_mgg.dll /implib:gmt_mgg.lib gmt_mgg.obj %LIBS%
IF %CHOICE%=="static"  CL %COPT% %DLL_NETCDF% /DDLL_EXPORT /c gmt_mgg.c
IF %CHOICE%=="static"  lib /out:gmt_mgg.lib gmt_mgg.obj
CL %COPT% binlegs.c    gmt_mgg.lib %LIBS%
CL %COPT% gmt2bin.c    gmt_mgg.lib %LIBS%
CL %COPT% gmt2dat.c    gmt_mgg.lib %LIBS%
CL %COPT% dat2gmt.c    gmt_mgg.lib %LIBS%
CL %COPT% gmtinfo.c    gmt_mgg.lib %LIBS%
CL %COPT% gmtlegs.c    gmt_mgg.lib %LIBS%
CL %COPT% gmtlist.c    gmt_mgg.lib %LIBS%
CL %COPT% gmtpath.c    gmt_mgg.lib %LIBS%
CL %COPT% gmttrack.c   gmt_mgg.lib %LIBS%
CL %COPT% mgd77togmt.c gmt_mgg.lib %LIBS%
del *.obj
move gmt_mgg.lib %BINDIR%
IF %CHOICE%=="dynamic" move gmt_mgg.dll %BINDIR%
move *.exe %BINDIR%
cd ..
REM ----------------------------------------------------
ECHO STEP 7: Make misc
REM ----------------------------------------------------
cd misc
CL %COPT% psmegaplot.c %LIBS%
CL %COPT% makepattern.c %LIBS%
del *.obj
move *.exe %BINDIR%
cd ..
REM ----------------------------------------------------
ECHO STEP 8: Make segyprogs
REM ----------------------------------------------------
cd segyprogs
CL %COPT% /c segy_io.c
LIB /OUT:segy_io.lib segy_io.obj
CL %COPT% pssegy.c  segy_io.lib %LIBS%
CL %COPT% pssegyz.c segy_io.lib %LIBS%
del *.obj
move segy_io.lib %BINDIR%
move *.exe %BINDIR%
cd ..
REM ----------------------------------------------------
ECHO STEP 9: Make spotter
REM ----------------------------------------------------
cd spotter
CL %COPT% /c libspotter.c
LIB /OUT:spotter.lib libspotter.obj
CL %COPT% backtracker.c spotter.lib %LIBS%
CL %COPT% hotspotter.c  spotter.lib %LIBS%
del *.obj
move spotter.lib %BINDIR%
move *.exe %BINDIR%
cd ..
REM ----------------------------------------------------
ECHO STEP 10: Make x2sys
REM ----------------------------------------------------
cd x2sys
CL %COPT% /I..\mgg /c x2sys.c
LIB /OUT:x2sys.lib x2sys.obj
CL %COPT% /I..\mgg x2sys_cross.c x2sys.lib %BINDIR%\gmt_mgg.lib %LIBS%
CL %COPT% /I..\mgg x2sys_datalist.c  x2sys.lib %BINDIR%\gmt_mgg.lib %LIBS%
del *.obj
move x2sys.lib %BINDIR%
move *.exe %BINDIR%
cd ..