Annotation of OpenXM_contrib/gnuplot/makefile.win, Revision 1.1.1.3
1.1 maekawa 1: # make file for Borland C++ 3.1 Windows version
1.1.1.3 ! ohara 2: # and Win32 using Borland C++ 4.52, or 5.5 (the free download version)
! 3: # and Borland C++ Builder 1 (newer versions may work as well)
1.1.1.2 maekawa 4: #
5: # This makefile may need some editing before it can be used. Check
6: # BCC installation path, the WIN32 and RUNTIME_LIB flags, in particular.
7: #
1.1 maekawa 8: # The compile and link includes debug flags. Take them out if you
9: # do not want them included (-y -v -M, /m /s /v /l)
1.1.1.2 maekawa 10: #
11: # New 991003: WIN32=1 build makes the helpers (doc2rtf, bf_test) as Win32
12: # console applications, instead of plain DOS programs. This
13: # way, it also works with those compilers missing a DOS option.
1.1.1.3 ! ohara 14: # New 20020311: Now also works with the free BC++ 5.5 command line tools.
! 15: # Un-comment the -DHAVE_SLEEP flag at the end of CFLAGS,
! 16: # choose the non-multithreading RUNTIME_LIB, and make with
! 17: # -DWIN32=1
1.1 maekawa 18:
19: # where to place wgnuplot.hlp helpfile
20: HELPFILE = wgnuplot.hlp
1.1.1.2 maekawa 21:
1.1 maekawa 22: # location of Borland C compiler
1.1.1.2 maekawa 23: TC = d:\bc31
24:
25: # location of TLINK.EXE and BCC.EXE
26: BIN = $(TC)\bin\\
27:
28: #The full path name of the help compiler. For BC++:
29: HC = $(BIN)\hc
30: # this comes with C++ Builder 1.0 (but doesn't seem to work):
31: #HC = $(TC)\help\tools\hcw /c /e
32: # or you can use the 'help workshop' available directly from MS:
33: #HC = h:\mssdk\bin\hcw /c/e
34:
1.1 maekawa 35: # WIN32=1 for Win32s or Win32 (--> '95 or NT)
36: # new: allow '-DWIN32=1' on make command line to take effect:
37: !if "$(WIN32)"==""
38: WIN32=0
39: !endif
40:
1.1.1.2 maekawa 41: # Uncomment _this_ for BC++ 4.52 (or others that give linker errors for
42: # the 'errno' variable)... :
43: RUNTIME_LIBRARY=cw32.lib
44:
45: # ... or this for more modern ones (like C++Builder 1.0) -- it's the
46: # properly multithreading one:
47: #RUNTIME_LIBRARY=cw32mt.lib
48:
1.1.1.3 ! ohara 49: # Choose which linker to use: traditional TurboLink or the newer Incremental
! 50: # linker.
! 51: LINK32=tlink32 # used by older compilers
! 52: #LINK32=ilink32 # this may be the only one you have...
1.1 maekawa 53: !if $(WIN32)
1.1.1.2 maekawa 54:
55: # 32bit Windows compilation.
1.1 maekawa 56: CC = bcc32
57: PROCESSOR_OPT =
1.1.1.2 maekawa 58: DEFINE_HELPFILE = -DHELPFILE=\"$(HELPFILE)\"
59:
60: # For BC++ 4.52, you may try this version with Pentium scheduling
61: # optimization. NB: bcc32a in 4.52 increased in bugginess quite
62: # a bit more than in program speed :-(
63: #CC = bcc32a
64: #PROCESSOR_OPT = -5
65:
1.1 maekawa 66: !else
1.1.1.2 maekawa 67:
68: # 16bit compilation:
1.1 maekawa 69: CC = bcc
1.1.1.2 maekawa 70: DEFINE_HELPFILE = -DHELPFILE="$(HELPFILE)"
71:
1.1 maekawa 72: !endif
73:
74: # -c means don't link
75: # -ml means use large model (large code, large data)
76: # -M means produce link map
77: # -y means include line numbers for debugger
78: # -v means include debug info
79: # -w- means ignore warnings and do not report them
80: # -w-rvl ignore function must return a value error
81: # -Ff=128 means make data object > 128 FAR
82: # -W means window application
83: # -DREADLINE to use the history/line editing capability. If you want this
84: # capability add -DREADLINE to CFLAGS then add 'readline' to the /o
85: # section of the linker call.
86: !if $(WIN32)
1.1.1.3 ! ohara 87: CFLAGS = -c -W -M -G -y -v -w-rvl -w-use -w-par -w-aus -w-pro $(PROCESSOR_OPT) -I$(TC)\include -Iwin -DREADLINE=1 -DHAVE_STRNICMP -DWIN32 -DHAVE_STRERROR -DNO_GIH -DNOGAMMA -DWIN32_LEAN_AND_MEAN -DANSI_C -DHAVE_GETCWD # -DHAVE_SLEEP
1.1.1.2 maekawa 88: CAUXFLAGS = -tWC -w-par -w-use -w-aus -f -N -M -y -v -d -I$(TC)\include -DWIN32 -DWINDOWS_NO_GUI -DHAVE_STRNICMP -DANSI_C
1.1 maekawa 89: !else
1.1.1.3 ! ohara 90: CFLAGS = -c -O1 -W -ml -w-par -w-use -w-aus -f -h -N -M -y -v -d -Ff=8 -I$(TC)\include -Iwin -DREADLINE=1 -zEGPFAR_DATA -DHAVE_STRNICMP -DMSDOS=1 -DNO_GIH -DANSI_C -DHAVE_GETCWD -DNDEBUG -Dlint
1.1 maekawa 91: CAUXFLAGS = -ml -w-par -w-use -w-aus -f -N -M -y -v -d -I$(TC)\include -DMSDOS=1 -DHAVE_STRNICMP -DANSI_C
92: !endif
93:
94: OBJS = bitmap.obj command.obj contour.obj eval.obj graphics.obj graph3d.obj \
95: internal.obj misc.obj parse.obj plot.obj plot2d.obj plot3d.obj \
96: readline.obj scanner.obj set.obj show.obj specfun.obj standard.obj \
97: stdfn.obj term.obj util.obj version.obj binary.obj winmain.obj \
98: interpol.obj fit.obj matrix.obj datafile.obj alloc.obj util3d.obj \
99: hidden3d.obj time.obj help.obj
100:
101: DLLOBJS = wgnuplib.obj wtext.obj wmenu.obj wpause.obj wgraph.obj wprinter.obj
102:
103: CSOURCE5 = term\aed.trm term\cgi.trm term\cgm.trm term\debug.trm \
1.1.1.3 ! ohara 104: term\dumb.trm term\dxy.trm term\eepic.trm term\emf.trm \
! 105: term\emxvga.trm term\epslatex.trm term\epson.trm term\excl.trm \
! 106: term\fg.trm term\fig.trm term\ggi.trm term\hp26.trm \
1.1 maekawa 107: term\hp2648.trm term\hpgl.trm term\hpljii.trm
108: CSOURCE6 = term\impcodes.h term\imagen.trm term\object.h \
1.1.1.3 ! ohara 109: term\iris4d.trm term\kyo.trm term\latex.trm term\pbm.trm term\pdf.trm term\win.trm
! 110: CSOURCE7 = term\post.trm term\qms.trm term\regis.trm term\sun.trm term\svg.trm \
1.1 maekawa 111: term\t410x.trm term\tek.trm term\unixpc.trm term\unixplot.trm \
112: term\v384.trm term\x11.trm
113: CSOURCE8 = contour.c specfun.c binary.c interpol.obj
114: WINDOWS = makefile.win makefile.msw README.win win\wcommon.h \
115: win\wgnuplib.c win\wgnuplib.def win\wgnuplib.h win\wgnuplib.rc\
116: win\wgnuplot.def win\wgnuplot.hpj win\wgnuplot.mnu win\wgnuplot.rc \
117: win\wgraph.c win\winmain.c win\wmenu.c win\wpause.c \
118: win\wprinter.c win\wresourc.h win\wtext.c win\wtext.h \
119: win\geticon.c docs\doc2rtf.c term\win.trm win\wgnupl32.def
120:
121: !if $(WIN32)
122: all: wgnupl32.exe $(HELPFILE) wgnuplot.mnu demo\bf_test.exe
123: !else
124: all: wgnuplot.exe wgnuplot.dll $(HELPFILE) wgnuplot.mnu demo\bf_test.exe
125: !endif
126:
127: wgnuplot.exe: $(OBJS) win\wgnuplot.def win\wgnuplot.rc winmain.obj wgnuplot.lib
128: # $(BIN)tlink /Twe /c @&&!
129: $(BIN)tlink /Twe /c /s /v /l @&&!
130: $(TC)\lib\C0Wl +
131: bitmap command eval graphics graph3d help internal misc parse +
132: plot plot2d plot3d scanner set show specfun standard stdfn term util version contour +
133: binary interpol +
134: winmain +
135: readline +
136: fit matrix datafile alloc util3d hidden3d time +
137: ,wgnuplot,wgnuplot, +
138: wgnuplot.lib +
139: $(TC)\lib\import +
140: $(TC)\lib\mathwl +
141: $(TC)\lib\cwl, +
142: win\wgnuplot.def
143: !
144: $(BIN)brc -30 -k -i$(TC)\include win\wgnuplot.rc wgnuplot.exe
145:
146: # gnuplot.opt contains a list of the 'core' files, in case that's of
147: # any use...
148:
149: wgnupl32.exe: $(OBJS) $(DLLOBJS) win\wgnupl32.def wgnupl32.res winmain.obj
1.1.1.3 ! ohara 150: # $(BIN)$(LINK32) /Tpe /c @&&!
! 151: $(BIN)$(LINK32) /Tpe /c /m /s /v @&&!
1.1 maekawa 152: $(TC)\lib\C0W32 +
153: bitmap command eval graphics graph3d help internal misc parse +
154: plot plot2d plot3d scanner set show specfun standard stdfn term util version contour +
155: wgnuplib wtext wmenu wpause wgraph wprinter +
156: binary interpol +
157: winmain +
158: readline +
159: fit matrix datafile alloc util3d hidden3d time +
160: ,wgnupl32,wgnupl32, +
161: $(TC)\lib\import32 +
1.1.1.2 maekawa 162: $(TC)\lib\$(RUNTIME_LIBRARY), +
1.1 maekawa 163: win\wgnupl32.def, wgnupl32.res
164: !
165:
166: wgnupl32.res: win\wgnuplot.rc win\wgnuplib.rc
167: $(BIN)brcc32 -DWIN32 -i$(TC)\include -r -fowgnupl32 win\wgnuplot.rc
168:
169: # default rules
170:
171: .c.obj:
172: $(BIN)$(CC) @&&!
173: $(CFLAGS)
174: ! $<
175:
176: # rules
177:
178: bitmap.obj: bitmap.c bitmap.h plot.h
179:
180: command.obj: command.c plot.h setshow.h fit.h
1.1.1.2 maekawa 181: $(BIN)$(CC) $(DEFINE_HELPFILE) @&&!
1.1 maekawa 182: $(CFLAGS)
183: ! command.c
184:
185: contour.obj: contour.c plot.h
186:
187: eval.obj: eval.c plot.h
188:
189: graphics.obj: graphics.c plot.h setshow.h
190:
191: graph3d.obj: graphics.c plot.h setshow.h
192:
193: fit.obj: fit.c fit.h matrix.h plot.h
194:
195: matrix.obj: matrix.c matrix.h fit.h
196:
197: internal.obj: internal.c plot.h
198:
199: misc.obj: misc.c plot.h setshow.h
200:
201: parse.obj: parse.c plot.h
202: $(BIN)$(CC) @&&!
203: $(CFLAGS)
204: ! parse.c
205:
206: plot.obj: plot.c plot.h setshow.h
207: $(BIN)$(CC) @&&!
208: $(CFLAGS)
209: ! plot.c
210:
211: hidden3d.obj: hidden3d.c plot.h setshow.h
212:
213: plot3d.obj: plot3d.c plot.h setshow.h
214:
215: plot2d.obj: plot2d.c plot.h setshow.h
216:
217: readline.obj: readline.c plot.h
218:
219: scanner.obj: scanner.c plot.h
220:
221: set.obj: set.c plot.h setshow.h
222:
223: show.obj: show.c plot.h setshow.h
1.1.1.2 maekawa 224: $(BIN)$(CC) $(DEFINE_HELPFILE) @&&!
1.1 maekawa 225: $(CFLAGS)
226: ! show.c
227:
228: specfun.obj: specfun.c
229:
230: standard.obj: standard.c plot.h
231:
232: stdfn.obj: stdfn.c stdfn.h
233:
234: interpol.obj: interpol.c plot.h setshow.h
235:
236: term.obj: term.c term.h plot.h set.c show.c bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7) win\wgnuplib.h
237: $(BIN)$(CC) @&&!
238: $(CFLAGS)
239: ! $(TERMFLAGS) -Iterm -I. term.c
240:
241: util.obj: util.c plot.h
242:
243: util3d.obj: util3d.c plot.h setshow.h
244:
245: version.obj: version.c
246:
247: winmain.obj: win\winmain.c win\wgnuplib.h win\wtext.h plot.h
1.1.1.2 maekawa 248: $(BIN)$(CC) $(DEFINE_HELPFILE) @&&!
1.1 maekawa 249: $(CFLAGS)
250: ! win\winmain.c
251:
252: wgnuplot.mnu: win\wgnuplot.mnu
253: copy win\wgnuplot.mnu wgnuplot.mnu
254:
255:
256: # different compiler options for DLL's */
257: !if $(WIN32)
258: DLLCC = $(BIN)$(CC) -DWIN32 -c -M -y -v -WE -I$(TC)\include -Iwin
259: !else
260: DLLCC = $(BIN)$(CC) -c -WD -ms! -w-par -f -M -y -v -w -N -I$(TC)\include -Iwin
261: !endif
262:
263: wgnuplot.lib: wgnuplot.dll
264: $(BIN)implib wgnuplot.lib wgnuplot.dll
265:
266: wgnuplot.dll: $(DLLOBJS) win/wgnuplib.def win/wgnuplib.rc
267: $(BIN)tlink /c /n /Twd /L$(TC)\lib /m /s /v /l @&&!
268: c0ds +
269: wgnuplib wtext wmenu wpause wgraph wprinter, +
270: wgnuplot.dll, +
271: wgnuplib.map, +
272: import mathws cws, +
273: win\wgnuplib.def
274: !
275: $(BIN)brc -30 -i$(TC)\include -t win\wgnuplib.rc wgnuplot.dll
276:
277: wgnuplib.obj: win/wgnuplib.c win/wgnuplib.h win/wcommon.h win/wresourc.h
278: $(DLLCC) win/wgnuplib.c
1.1.1.3 ! ohara 279:
1.1 maekawa 280: wmenu.obj: win/wmenu.c win/wgnuplib.h win/wcommon.h win/wresourc.h
281: $(DLLCC) win/wmenu.c
282:
283: wtext.obj: win/wtext.c win/wgnuplib.h win/wcommon.h win/wresourc.h
284: $(DLLCC) win/wtext.c
1.1.1.3 ! ohara 285:
1.1 maekawa 286: wpause.obj: win/wpause.c win/wgnuplib.h win/wcommon.h win/wresourc.h
287: $(DLLCC) win/wpause.c
1.1.1.3 ! ohara 288:
1.1 maekawa 289: wprinter.obj: win/wprinter.c win/wgnuplib.h win/wcommon.h win/wresourc.h
290: $(DLLCC) win/wprinter.c
1.1.1.3 ! ohara 291:
1.1 maekawa 292: wgraph.obj: win/wgraph.c win/wgnuplib.h win/wcommon.h win/wresourc.h
293: $(DLLCC) win/wgraph.c
1.1.1.3 ! ohara 294:
1.1 maekawa 295: # convert gnuplot.doc to gnuplot.rtf
296: $(HELPFILE): win\gnuplot.rtf
1.1.1.2 maekawa 297: $(HC) win\wgnuplot.hpj
1.1 maekawa 298:
299: win\gnuplot.rtf: doc2rtf.exe docs\gnuplot.doc win\wgnuplot.hpj
300: doc2rtf docs\gnuplot.doc win\gnuplot.rtf
301:
302: doc2rtf.exe: docs\doc2rtf.c docs\termdoc.c docs\xref.c $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
1.1.1.2 maekawa 303: $(BIN)$(CC) -edoc2rtf.exe @&&!
1.1 maekawa 304: -D_Windows
305: -w-pro
306: $(CAUXFLAGS)
307: -I. -Iterm -Idocs
308: ! docs\doc2rtf.c docs\termdoc.c docs\xref.c
309:
310: # make binary demo files
311: demo\bf_test.exe: bf_test.c dbinary.obj dalloc.obj
1.1.1.2 maekawa 312: $(BIN)$(CC) -edemo\bf_test.exe @&&!
1.1 maekawa 313: $(CAUXFLAGS)
314: -L$(TC)\lib
315: ! bf_test.c dbinary.obj dalloc.obj
316: cd demo
317: bf_test
318: cd ..
319:
320: dalloc.obj: alloc.c
1.1.1.2 maekawa 321: $(BIN)$(CC) -c @&&!
1.1 maekawa 322: $(CAUXFLAGS)
323: ! -odalloc.obj alloc.c
324:
325: dbinary.obj: binary.c
1.1.1.2 maekawa 326: $(BIN)$(CC) -c @&&!
1.1 maekawa 327: $(CAUXFLAGS)
328: ! -odbinary.obj binary.c
329:
330: # clean up temporary files
331: clean:
332: del *.obj
1.1.1.2 maekawa 333: del win\*.obj
1.1 maekawa 334: del wgnuplot.map
335: del win\wgnuplot.res
336: del wgnupl32.map
337: del wgnupl32.res
338: del win\gnuplot.rtf
339: del doc2rtf.map
340: del doc2rtf.exe
341: del win\wgnuplib.res
342: del wgnuplib.map
343: del wgnuplot.lib
1.1.1.2 maekawa 344: del bf_test.map
345: del demo\bf_test.map
1.1 maekawa 346: del demo\bf_test.exe
1.1.1.3 ! ohara 347:
1.1 maekawa 348: realclean: veryclean
349:
350: veryclean: clean
351: del wgnuplot.exe
352: del wgnuplot.hlp
1.1.1.2 maekawa 353: del win\wgnuplot.hlp
1.1 maekawa 354: -attrib -h wgnuplot.gid
355: del wgnuplot.gid
356: del wgnuplot.mnu
357: del wgnuplot.dll
358: del wgnupl32.exe
359: del demo\binary1
360: del demo\binary2
361: del demo\binary3
1.1.1.2 maekawa 362: del demo\fit.log
363: del demo\soundfit.par
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>