Initial release of Maemo 5 port of gnuplot
[gnuplot] / config / makefile.tc
1 #
2 # $Id: makefile.tc,v 1.8 2002/03/07 16:20:15 lhecking Exp $
3 #
4 # GNUPLOT Makefile for Borland C++ 3.x
5 #
6 # copy this file to the 'src' directory, cd into there, and
7 #     make -fmakefile.tc
8 #
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)
13 #
14 # the makefile no longer depends on a linker options file.
15 # this file will be created as needed.                          (AL 07/17/92)
16 #
17 # The compiler commands lines have become too long so I
18 # modified the make file to use an options file to store $(CFLAGS) 
19 #                                                              (ALM 08/08/94)
20 #
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'.
25 #
26
27 # directory names, like for use with makefile.all:
28 T=..\\term\\
29 D=..\\docs\\
30 M=..\\demo\\
31
32
33 # where to place gnuplot.gih helpfile
34 HELPFILE = gnuplot.gih
35 # location of Turbo C compiler
36 TC = d:\bc31
37 #TC = c:\tc
38 # name of C compiler
39 CC = bcc
40 #CC = tcc
41 # location of TLINK.EXE and TCC.EXE or BCC.EXE
42 BIN = $(TC)\bin\\
43 #BIN =
44 # location of BGI files,
45 # change this line if not in TC directory, i.e. $(TC)\bgi
46 BGI = $(TC)\bgi
47 # location of bgiobj.exe tool - convertion of BGI to a linkable OBJ file.
48 BGIOBJ = $(TC)\bgi\bgiobj
49 #BGIOBJ =
50 # location of the system libraries
51 LIB = $(TC)\lib\\
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)
55 MODEL = l
56
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
75
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
78
79 TERMFLAGS =
80
81 # With Overlay Support
82 OVLY1 = -Y
83 OVLY2 = -Yo
84 OVERLIB = $(LIB)overlay
85 SLASHO = /o
86 ODASH = /o-
87 # Without Overlay Support
88 #OVLY1 =
89 #OVLY2 =
90 #OVERLIB =
91 #SLASHO =
92 #ODASH =
93
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
100
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
103
104 OBJS =  $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6) $(OBJBGI)
105
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
115
116 all: cflags.tc gnuplot.exe $(HELPFILE) $(M)bf_test.exe
117
118 # use linkopt.tc and cflags.tc to avoid command-line overflow
119
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
124
125 # create linker options file
126 # note that when you change the model or switch overlaying,
127 # you will have to execute 'make clean'
128
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.
145
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)
154
155
156
157 # default rules
158
159 .c.obj:
160         $(BIN)$(CC) -c $(OVLY2) @cflags.tc $<
161
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.
164
165 bitmap.obj: bitmap.c bitmap.h plot.h
166
167 command.obj: command.c plot.h setshow.h help.h fit.h
168         $(BIN)$(CC) -c $(OVLY2) @cflags.tc -DHELPFILE=\"$(HELPFILE)\" command.c
169
170 contour.obj: contour.c plot.h
171
172 eval.obj: eval.c plot.h
173
174 graphics.obj: graphics.c plot.h setshow.h
175
176 graph3d.obj: graph3d.c plot.h setshow.h
177
178 hidden3d.obj: hidden3d.c plot.h setshow.h
179
180 util3d.obj: util3d.c plot.h setshow.h
181
182 fit.obj: fit.c fit.h matrix.h plot.h
183
184 matrix.obj: matrix.c matrix.h fit.h
185
186 help.obj: help.c plot.h help.h
187
188 internal.obj: internal.c plot.h
189
190 misc.obj: misc.c plot.h setshow.h help.h
191
192 parse.obj: parse.c plot.h
193         $(BIN)$(CC) -c $(OVLY1) @cflags.tc parse.c
194
195 plot.obj: plot.c plot.h setshow.h
196         $(BIN)$(CC) -c $(OVLY1) @cflags.tc plot.c
197
198 readline.obj: readline.c
199
200 scanner.obj: scanner.c plot.h
201
202 set.obj: set.c plot.h setshow.h
203
204 show.obj: show.c plot.h setshow.h
205         $(BIN)$(CC) -c $(OVLY2) @cflags.tc -DHELPFILE="$(HELPFILE)" show.c
206
207 specfun.obj: specfun.c
208
209 standard.obj: standard.c plot.h
210
211 stdfn.obj: stdfn.c stdfn.h
212
213 interpol.obj: interpol.c plot.h setshow.h
214
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
218
219 util.obj: util.c plot.h
220
221 variable.obj: variable.c plot.h variable.h
222
223 version.obj: version.c
224
225 # convert gnuplot.doc to gnuplot.gih
226 $(HELPFILE): doc2gih.exe $(D)gnuplot.doc
227         doc2gih $(D)gnuplot.doc $(HELPFILE)
228
229 doc2gih.exe: $(D)doc2gih.c $(D)termdoc.c
230     $(BIN)$(CC) $(DOC2XXX_FLAGS) -edoc2gih.exe $(D)doc2gih.c $(D)termdoc.c
231
232 doc2tex.exe: $(D)doc2tex.c
233     $(BIN)$(CC) $(DOC2XXX_FLAGS) -DALL_TERM_DOC $(D)doc2tex.c
234
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
237         cd ..\demo
238         bf_test
239         cd ..\src
240
241 # convert Borland Graphics Interface files to object for linking
242 cgaf.obj: $(BGI)\cga.bgi
243         $(BGIOBJ) /F $(BGI)\cga
244
245 egavgaf.obj: $(BGI)\egavga.bgi
246         $(BGIOBJ) /F $(BGI)\egavga
247
248 hercf.obj: $(BGI)\herc.bgi
249         $(BGIOBJ) /F $(BGI)\herc
250
251 attf.obj: $(BGI)\att.bgi
252         $(BGIOBJ) /F $(BGI)\att
253
254 pc3270f.obj: $(BGI)\pc3270.bgi
255         $(BGIOBJ) /F $(BGI)\pc3270
256
257 svgaf.obj: $(SVGA_BGI)
258         $(BGIOBJ) /F $(SVGA_BGI) svgaf.obj _SVGA_driver_far SVGA_TEXT
259
260 # $(OBJS): cflags.tc # this causes error message
261
262 # clean target - remove all temp files, but leave executable intact
263 # needed when changing configuration (model or overlaying)
264
265 clean:
266         del *.obj
267         del gnuplot.map
268         del linkopt.tc
269         del doc2gih.exe
270         del cflags.tc
271
272 # realclean target - remove all files created by the makefile
273
274 realclean: clean
275         del gnuplot.exe
276         del gnuplot.gih
277         del $(M)soundfit.par
278         del $(M)fit.log
279         del $(M)bf_test.exe
280         del $(M)bf_test.map
281         del $(M)binary1
282         del $(M)binary2
283         del $(M)binary3