2 # $Id: makefile.tc,v 1.8 2002/03/07 16:20:15 lhecking Exp $
4 # GNUPLOT Makefile for Borland C++ 3.x
6 # copy this file to the 'src' directory, cd into there, and
9 # uses Borland proprietary overlay manager
10 # Modified from the TurboC makefile by Maurice Castro
11 # The compile and link includes debug flags. Take them out if you
12 # do not want them included (-y -v -M, /m /s /v /l)
14 # the makefile no longer depends on a linker options file.
15 # this file will be created as needed. (AL 07/17/92)
17 # The compiler commands lines have become too long so I
18 # modified the make file to use an options file to store $(CFLAGS)
21 # You will need to edit term.h to not include some of the
22 # terminal types which you are not going to use, otherwise you will get a
23 # message about too much global data defined in term.c. A working example
24 # is 'config/term_pc.h'.
27 # directory names, like for use with makefile.all:
33 # where to place gnuplot.gih helpfile
34 HELPFILE = gnuplot.gih
35 # location of Turbo C compiler
41 # location of TLINK.EXE and TCC.EXE or BCC.EXE
44 # location of BGI files,
45 # change this line if not in TC directory, i.e. $(TC)\bgi
47 # location of bgiobj.exe tool - convertion of BGI to a linkable OBJ file.
48 BGIOBJ = $(TC)\bgi\bgiobj
50 # location of the system libraries
52 # Super VGA support: name and location of the SuperVGA driver
53 SVGA_BGI = d:\bc\bgi\svga256.bgi
54 # the memory model to use (l = large code, large data; h = huge)
57 # -c means don't link, -f means emulate 8087 if not present
58 # -m? says which model to use
59 # -M means produce link map
60 # -y means include line numbers for debugger
61 # -v means include debug info
62 # -w- means ignore warnings and do not report them
63 # -DREADLINE to use the history/line editing capability. If you want this
64 # capability add -DREADLINE to CFLAGS
65 # -DLITE means no hiddenline removal to conserve memory
66 # -Z -2 -3 -G -O are optimization flags (-2 produces 286 only code)
67 #CFLAGS1 = -Ff=256 -c -f -m$(MODEL) -w- -Z -2 -G -O -n.
68 # HBB: specialise on '386 or higher, and take '-c' out, so
69 # the flags can be used for doc2xxx and bf_test as well:
70 CFLAGS1 = -Ff=256 -f -m$(MODEL) -w- -Z -3 -f287 -d -G -n. -v -y
71 #CFLAGS2 = -I$(TC)\include -DLITE -DMSDOS -DPC -DREADLINE -DHAVE_STRNICMP
72 # HBB: try without -DLITE, to activate hidden-lining (for trying)
73 CFLAGS2 = -I$(TC)\include -DMSDOS=1 -DPC -DPROTOTYPES -DREADLINE=1 -DHAVE_GETCWD -DHAVE_STRNICMP -DHAVE_STRINGIZE
74 CFLAGS3 = -DHAVE_SLEEP -DEXTERN_ERRNO -DHAVE_STRING_H -DHAVE_VALUES_H
76 # separate set of FLAGS (both CFLAGS and LDFLAGS for the doc2xxx tools:
77 DOC2XXX_FLAGS = -I$(D) -I$(T) @cflags.tc -ml -L$(TC)\lib
81 # With Overlay Support
84 OVERLIB = $(LIB)overlay
87 # Without Overlay Support
94 OBJ1 = alloc.obj binary.obj bitmap.obj command.obj contour.obj datafile.obj
95 OBJ2 = dynarray.obj eval.obj fit.obj graph3d.obj graphics.obj help.obj time.obj
96 OBJ3 = hidden3d.obj internal.obj interpol.obj matrix.obj misc.obj parse.obj
97 OBJ4 = plot.obj plot2d.obj plot3d.obj readline.obj save.obj scanner.obj
98 OBJ5 = set.obj show.obj specfun.obj standard.obj stdfn.obj tables.obj term.obj
99 OBJ6 = history.obj unset.obj util.obj util3d.obj variable.obj version.obj
101 # uncomment svgaf.obj if you wish to include Super VGA support
102 OBJBGI= cgaf.obj egavgaf.obj hercf.obj attf.obj pc3270f.obj svgaf.obj
104 OBJS = $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6) $(OBJBGI)
106 CSOURCE5 = $(T)aed.trm $(T)cgi.trm $(T)dumb.trm $(T)dxy.trm \
107 $(T)eepic.trm $(T)epson.trm $(T)fig.trm $(T)hp26.trm \
108 $(T)hp2648.trm $(T)hpgl.trm $(T)hpljii.trm
109 CSOURCE6 = $(T)impcodes.h $(T)imagen.trm $(T)object.h \
110 $(T)iris4d.trm $(T)kyo.trm $(T)latex.trm $(T)pc.trm
111 CSOURCE7 = $(T)post.trm $(T)qms.trm $(T)regis.trm $(T)sun.trm \
112 $(T)t410x.trm $(T)tek.trm $(T)unixpc.trm $(T)unixplot.trm \
113 $(T)v384.trm $(T)x11.trm
114 CSOURCE8 = contour.c specfun.c binary.c interpol.c
116 all: cflags.tc gnuplot.exe $(HELPFILE) $(M)bf_test.exe
118 # use linkopt.tc and cflags.tc to avoid command-line overflow
120 gnuplot.exe: $(OBJS) linkopt.tc cflags.tc
121 # With or without debug information (select one)
122 $(BIN)tlink /m /s /v /l @linkopt.tc
123 # $(BIN)tlink @linkopt.tc
125 # create linker options file
126 # note that when you change the model or switch overlaying,
127 # you will have to execute 'make clean'
129 linkopt.tc: makefile.tc
130 echo >linkopt.tc $(LIB)C0$(MODEL) +
131 echo >>linkopt.tc $(SLASHO) $(OBJ1) +
132 echo >>linkopt.tc $(OBJ2) +
133 echo >>linkopt.tc $(OBJ3) +
134 echo >>linkopt.tc $(OBJ4) +
135 echo >>linkopt.tc $(OBJ5) +
136 echo >>linkopt.tc $(ODASH) $(OBJBGI) +
137 echo >>linkopt.tc ,gnuplot,gnuplot, +
138 echo >>linkopt.tc $(OVERLIB) +
139 echo >>linkopt.tc $(LIB)emu +
140 echo >>linkopt.tc $(LIB)math$(MODEL) +
141 echo >>linkopt.tc $(LIB)c$(MODEL) +
142 echo >>linkopt.tc $(LIB)graphics
143 # echo >>linkopt.tc -----
144 # echo >>linkopt.tc this file is generated automatically. don't change it, change the makefile.
146 # Create an options file for the C flags to avoid command line overflow
147 # (the only way I could think of to make sure this file was up to date
148 # and present when needed was to make all object files dependant upon
149 # it - ugly) <- this may cause error, do make clean instead.
150 cflags.tc: makefile.tc
151 echo >cflags.tc $(CFLAGS1)
152 echo >>cflags.tc $(CFLAGS2)
153 echo >>cflags.tc $(CFLAGS3)
160 $(BIN)$(CC) -c $(OVLY2) @cflags.tc $<
162 # The default for files is to be compiled for overlaying if OVLY1 and
163 # OVLY2 are defined. plot.c and parse.c are not suitable for overlaying.
165 bitmap.obj: bitmap.c bitmap.h plot.h
167 command.obj: command.c plot.h setshow.h help.h fit.h
168 $(BIN)$(CC) -c $(OVLY2) @cflags.tc -DHELPFILE=\"$(HELPFILE)\" command.c
170 contour.obj: contour.c plot.h
172 eval.obj: eval.c plot.h
174 graphics.obj: graphics.c plot.h setshow.h
176 graph3d.obj: graph3d.c plot.h setshow.h
178 hidden3d.obj: hidden3d.c plot.h setshow.h
180 util3d.obj: util3d.c plot.h setshow.h
182 fit.obj: fit.c fit.h matrix.h plot.h
184 matrix.obj: matrix.c matrix.h fit.h
186 help.obj: help.c plot.h help.h
188 internal.obj: internal.c plot.h
190 misc.obj: misc.c plot.h setshow.h help.h
192 parse.obj: parse.c plot.h
193 $(BIN)$(CC) -c $(OVLY1) @cflags.tc parse.c
195 plot.obj: plot.c plot.h setshow.h
196 $(BIN)$(CC) -c $(OVLY1) @cflags.tc plot.c
198 readline.obj: readline.c
200 scanner.obj: scanner.c plot.h
202 set.obj: set.c plot.h setshow.h
204 show.obj: show.c plot.h setshow.h
205 $(BIN)$(CC) -c $(OVLY2) @cflags.tc -DHELPFILE="$(HELPFILE)" show.c
207 specfun.obj: specfun.c
209 standard.obj: standard.c plot.h
211 stdfn.obj: stdfn.c stdfn.h
213 interpol.obj: interpol.c plot.h setshow.h
215 # the CSOURCE? dependencies are not up to date (but who cares)
216 term.obj: term.c term.h plot.h set.c show.c bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
217 $(BIN)$(CC) -c $(OVLY2) @cflags.tc $(TERMFLAGS) -DDEFAULTTERM="dospc" -I$(T) -I. term.c
219 util.obj: util.c plot.h
221 variable.obj: variable.c plot.h variable.h
223 version.obj: version.c
225 # convert gnuplot.doc to gnuplot.gih
226 $(HELPFILE): doc2gih.exe $(D)gnuplot.doc
227 doc2gih $(D)gnuplot.doc $(HELPFILE)
229 doc2gih.exe: $(D)doc2gih.c $(D)termdoc.c
230 $(BIN)$(CC) $(DOC2XXX_FLAGS) -edoc2gih.exe $(D)doc2gih.c $(D)termdoc.c
232 doc2tex.exe: $(D)doc2tex.c
233 $(BIN)$(CC) $(DOC2XXX_FLAGS) -DALL_TERM_DOC $(D)doc2tex.c
235 $(M)bf_test.exe: bf_test.c binary.obj alloc.obj
236 $(BIN)$(CC) -e$(M)bf_test.exe @cflags.tc -L$(TC)\lib bf_test.c binary.obj alloc.obj
241 # convert Borland Graphics Interface files to object for linking
242 cgaf.obj: $(BGI)\cga.bgi
243 $(BGIOBJ) /F $(BGI)\cga
245 egavgaf.obj: $(BGI)\egavga.bgi
246 $(BGIOBJ) /F $(BGI)\egavga
248 hercf.obj: $(BGI)\herc.bgi
249 $(BGIOBJ) /F $(BGI)\herc
251 attf.obj: $(BGI)\att.bgi
252 $(BGIOBJ) /F $(BGI)\att
254 pc3270f.obj: $(BGI)\pc3270.bgi
255 $(BGIOBJ) /F $(BGI)\pc3270
257 svgaf.obj: $(SVGA_BGI)
258 $(BGIOBJ) /F $(SVGA_BGI) svgaf.obj _SVGA_driver_far SVGA_TEXT
260 # $(OBJS): cflags.tc # this causes error message
262 # clean target - remove all temp files, but leave executable intact
263 # needed when changing configuration (model or overlaying)
272 # realclean target - remove all files created by the makefile