2 # $Id: makefile.unx,v 1.6 2004/04/13 17:23:30 broeker Exp $
5 ############################################################
7 # GNUPLOT 3.0 Makefile (Unix X11 support) for
8 # Apollo/Sun/Dec5000/IBM-RS6000/HP9000/SGI/3B1/386IX/Cray
10 # Original version by:
11 # oliveria@caen.engin.umich.edu (ROQUE DONIZETE DE OLIVEIRA)
12 # Wed, 3 Jul 91 14:31:37 -0400
14 #>>> Customizing: You must customize part of this makefile for your site.
15 #>>> Then type 'make' for further instructions.
16 #>>> Customization instructions look like these lines do (#>>>).
21 TARGET = All# What to make by default
23 ############################################################
24 #>>> Decide where the binaries and manuals will go.
25 # directory where to install executables on 'make install'
27 # directory for installing man page on 'make man_install'.
28 MANDEST=/usr/local/man/man1
29 # where to install help file gnuplot.gih (note: this doesn't include gnuplot.gih)
30 HELPDEST=/usr/local/lib
32 # Where to send email about bugs and comments (locally)
33 EMAIL=gnuplot-bugs@lists.sourceforge.net
35 ############################################################
36 #>>> Some machines may need MAKE to be defined explicitly
38 #>>> Choose your C compiler and basic compiler flags.
41 # -O if you trust your compiler's optimizer
43 # default loading command
46 # default installion command. On some systems, this doesn't exist or is
47 # incompatible. In this case just use cp. This should be handeled by the
48 # system specific make commands below. Please report systems that need this,
49 # so this can be added as default. (I think most SysV systems need this, but
54 ############################################################
55 #>>> Choose some optional features.
56 #>>> At this point there are only two optional features:
58 # If READLINE is defined, then command-line editing is supported.
59 # Otherwise, your normal terminal editing is all you get.
60 # Some machines will not support this, and they will turn this
61 # option off (for example, apollos running SR10.2 or SR10.3 and
62 # loaded with BSD4.3 instead of SYS5). Note: problems with
63 # gnuplot prompts have been noted when this feature is selected
64 # on IBM RS/6000 AIX, and compile errors are encountered on
65 # Sequent Dynix 3 and Convex OS 9.0. If seems to work with ConvexOS 10.1.
67 # If you want to use the more complex gnu version of readline, you can
68 # define HAVE_LIBREADLINE instead of READLINE and add the appropriate library
69 # file(s) to LIBS below.
71 # If NOCWDRC is defined, then any .gnuplot in the current directory
72 # is not read on startup. This is a security consideration
73 # especially for root users ( we recommend you define -DNOCWDRC ).
74 OPTIONS = -DREADLINE -DNOCWDRC
76 #>>> Optionally install the lasergnu script.
77 # Lasergnu is a handy shell script for creating a plot from the
78 # command line and sending it directly to the printer. It currently
79 # supports PostScript and imagen printers, and probably would need
80 # tailoring to your site.
81 # Use lasergnu_install to install lasergnu.
82 # Use lasergnu_noinstall to not install lasergnu (default).
83 LASERGNU = lasergnu_noinstall
85 ############################################################
89 #>>> List your X11 libraries
92 #>>> List where the X11 include directory is found (if other than /usr/include)
95 #>>> List additional CFLAGS for X11 compilation
96 # -DBSD_TYPES if your system defines FD_* macros for select in
98 # -ISC22 to circumvent missing plots past the first on ISC 2.2
101 #>>> You shouldn't have to change these, since they are controlled by
102 #>>> Machine dependent definitions below.
103 # Compile option for plot.c and TERMFLAGS, to include X11 support
105 # make gnuplot_x11 by default
106 GNUPLOT_X11 = gnuplot_x11
107 # install gnuplot_x11 by default
108 X11INSTALL = x11_install
110 ############################################################
111 #>>> Okay, you've changed enough. Now type 'make'.
113 ############################################################
114 # This is used to pass many of the above definitions to make
115 # subprocesses. Don't change this.
116 MY_FLAGS = CC="$(CC)" COPTS="$(COPTS)" DEST="$(DEST)" \
117 MANDEST="$(MANDEST)" HELPDEST="$(HELPDEST)" \
118 EMAIL="$(EMAIL)" LASERGNU="$(LASERGNU)"
120 ############################################################
121 # Explanations of CFLAGS definitions.
122 # These should not need to be changed by you.
123 # They are set correctly for each machine below. If your machine
124 # doesn't fit the one of the patterns, override on the make command
125 # line or make a new target for it and a new _FLAGS definition.
126 # -DHAVE_COPY if you have bcopy() and no memcpy()
127 # -DHAVE_STRNICMP if you have strnicmp()
128 # -DHAVE_STRNCASECMP if you have strncasecmp() (GNU Libc, bsd)
129 # -DGAMMA=foo if your gamma function is called foo(). Apollos and
130 # Linux have lgamma(3m). The default is -DGAMMA=gamma.
131 # -DHAVE_GETCWD if your unix uses getcwd() instead of getwd()
132 # this is needed by HP-UX and Cray Unicos systems.
133 # -DHAVE_GETWD if you have getwd()
134 # -DULTRIX_KLUDGE if you run X windows on Ultrix and experience the
135 # "every other plot" problem.
136 # -DCRIPPLED_SELECT if "select errors" are encountered with X. This
137 # option is needed on SVR3 platforms with incomplete support for
138 # the BSD select() system call
139 # -DXPG3_LOCALE if your system uses the 'setlocale' function to
140 # support foreign charactersets (currently only ISO8859-1).
141 # -Dunix is required to explicitly define "unix" for SCO and IBM
142 # RS/6000 running AIX 3.2
143 # -DHAVE_UNISTD_H if you have unistd.h
144 # -DHAVE_LIBC_H if you have libc.h (NeXT)
145 # -fswitch if you are compiling on a Sun3 (or even -f68881)
146 # (but -fswitch is buggy on some systems, so watch out)
147 # -DRETSIGTYPE=int if the argument to signal is an int function
148 # -DSIGFUNC_NO_INT_ARG if the signal function may not have an int argument
150 # Defaults in case the user types 'make All' directly
151 # Should match X11_FLAGS's CFLAGS definition
152 CFLAGS = $(COPTS) $(OPTIONS)
154 ############################################################
155 # Terminal (device) support
157 # All devices available to a given machine are compiled in by default.
158 # This documents the flags available in TERMFLAGS, although TERMFLAGS
159 # is usually controlled by the machine-dependent definitions below.
160 # See other terminal defines in term.h.
161 # Define ULTRIX_KLUDGE if you have the every-other plot problem in Ultrix X11.
163 # -DAPOLLO Apollo Graphics Primitive Resource (window resize after replot)
164 # -DGPR Apollo Graphics Primitive Resource (fixed-size window)
166 # -DIRIS IRIS4D series computer
167 # -DSUN Sun Microsystems Workstation
168 # -DLINUXVGA Linux PC with SuperVGA library
169 # -DUNIXPC unixpc (ATT 3b1 or ATT 7300)
170 # -DUNIXPLOT unixplot
171 # -DGNUGRAPH use GNU graphics version of UNIX plot library
172 # This can only be used in combination with -DUNIXPLOT
173 # -DX11 X11 Window System (This is $(PLOTXFLAG))
174 TERMFLAGS = -I. -Iterm $(PLOTXFLAG)
176 ############################################################
177 # Library explanations.
178 # You shouldn't need to adjust this; again, it is handled by the
179 # machine-dependent definitions below.
181 # -lplot if you have -DUNIXPLOT in TERMFLAGS
182 # -lsuntool -lsunwindow -lpixrect if you have -DSUN in TERMFLAGS
183 # -lgl_s if -DIRIS4D in TERMFLAGS
184 # -lccgi if -DCGI in TERMFLAGS
185 # -lvga if -DLINUXVGA in TERMFLAGS
186 # -lmgr -lpixrect if -DMGR in TERMFLAGS. (conflicts with SunView)
187 # -lreadline (or -Lsomewhere libreadline.a) if you use the gnu version
188 # -ltermcap might be necessary after -lreadline
189 LIBS = -lm # -lplot is no longer shipped on SUNs
191 ####################################################################
192 # List of object files except version.o
193 OBJS = bitmap.o command.o contour.o eval.o graphics.o graph3d.o help.o \
194 internal.o misc.o parse.o plot.o plot2d.o plot3d.o readline.o \
195 scanner.o set.o show.o specfun.o standard.o stdfn.o term.o time.o \
196 util.o binary.o interpol.o fit.o matrix.o datafile.o alloc.o \
197 util3d.o hidden3d.o variable.o
199 NEXTOBJS = epsviewe.o
200 ############################################################
201 # Machine-dependent settings.
204 CFLAGS="$(COPTS) $(OPTIONS)" \
205 LIBS="$(LIBS)" X11FLAGS="$(X11FLAGS)" X11INCLUDES="$(X11INCLUDES)" \
206 X11LIBS="$(X11LIBS)" \
207 PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
208 X11INSTALL="$(X11INSTALL)" \
209 TERMFLAGS="$(TERMFLAGS)"
212 CFLAGS="$(COPTS) $(OPTIONS) -I/usr/sys/include -I/usr/sys/BINARY -DANSI -DGAMMA=lgamma -D_XOPEN_SOURCE" \
213 LIBS="$(LIBS) -ldnet_stub" \
214 X11FLAGS="$(X11FLAGS) -DMOTIF -D_NO_PROTO -D_OSF_SOURCE" \
215 X11INCLUDES="$(X11INCLUDES) -I/usr/include/Xm" \
216 X11LIBS="$(X11LIBS) -ldnet_stub" \
217 PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
218 X11INSTALL="$(X11INSTALL)" \
219 TERMFLAGS="$(TERMFLAGS) "
222 CFLAGS="$(COPTS) $(OPTIONS)" \
223 LIBS="-lplot $(LIBS)" X11FLAGS="$(X11FLAGS)" \
224 X11INCLUDES="$(X11INCLUDES)" \
225 X11LIBS="$(X11LIBS)" \
226 PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
227 X11INSTALL="$(X11INSTALL)" \
228 TERMFLAGS="$(TERMFLAGS) -DULTRIX_KLUDGE"
231 CFLAGS="$(COPTS) $(OPTIONS) -DGAMMA=lgamma" \
232 LIBS="$(LIBS)" X11FLAGS="$(X11FLAGS)" \
233 X11INCLUDES="$(X11INCLUDES)" \
234 X11LIBS="-L/usr/lib/X11 -lX11" \
235 PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
236 X11INSTALL="$(X11INSTALL)" \
237 TERMFLAGS="$(TERMFLAGS) -DAPOLLO -DGPR"
240 CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_GETCWD" \
241 LIBS=$(LIBS) X11FLAGS="$(X11FLAGS)" \
242 X11INCLUDES="-I/usr/include/X11R4" \
243 X11LIBS="-L/usr/lib/X11R4 -lX11" \
244 PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
245 X11INSTALL="$(X11INSTALL)" \
246 TERMFLAGS="-I. -Iterm -DX11"
249 CFLAGS="$(COPTS) $(OPTIONS) -Ae -DHAVE_GETCWD" \
250 LIBS=$(LIBS) X11FLAGS="$(X11FLAGS)" \
251 X11INCLUDES="-I/usr/include/X11R5" \
252 X11LIBS="-L/usr/lib/X11R5 -lX11" \
253 PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
254 X11INSTALL="$(X11INSTALL)" \
255 TERMFLAGS="-I. -Iterm -DX11" \
256 MFLAGS="CFLAGS=\"-Ae -I.. -I../term\""
258 SOLARIS_X11_FLAGS = \
259 CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_UNISTD_H -DHAVE_GETCWD -DHAVE_SYS_SYSTEMINFO_H -DHAVE_SYSINFO" \
260 X11FLAGS="$(X11FLAGS)" X11INCLUDES="$(X11INCLUDES)" \
261 X11LIBS="$(X11LIBS) -lsocket" \
262 X11INCLUDES="-I$$OPENWINHOME/include $(X11INCLUDES)" \
263 PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
264 X11INSTALL="$(X11INSTALL)" \
265 TERMFLAGS="$(TERMFLAGS) -DHAVE_SYS_SYSTEMINFO_H -DHAVE_SYSINFO"
268 CFLAGS="$(COPTS) $(OPTIONS) -DSUN" \
269 LIBS="-lsuntool -lsunwindow -lpixrect $(LIBS)" \
270 X11FLAGS=" " X11INCLUDES=" " \
272 PLOTXFLAG=" " GNUPLOT_X11=" " X11INSTALL=x11_noinstall \
273 TERMFLAGS="-I. -Iterm"
276 CFLAGS="$(COPTS) $(OPTIONS)" \
277 LIBS="-L$$OPENWINHOME/lib $(LIBS)" \
278 X11FLAGS="$(X11FLAGS)" \
279 X11INCLUDES="-I$$OPENWINHOME/include $(X11INCLUDES)" \
280 X11LIBS="$(X11LIBS)" \
281 PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
282 X11INSTALL="$(X11INSTALL)" \
283 TERMFLAGS="$(TERMFLAGS)"
285 SUN_X11_MGR_FLAGS = \
286 CFLAGS="$(COPTS) $(OPTIONS)" \
287 LIBS="-lmgr -lpixrect -L/usr/mgr/lib $(LIBS)" \
288 X11FLAGS="$(X11FLAGS)" X11INCLUDES="$(X11INCLUDES)" \
289 X11LIBS="$(X11LIBS)" \
290 PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
291 X11INSTALL="$(X11INSTALL)" \
292 TERMFLAGS="-I/usr/mgr/include -I. -Iterm -DMGR $(TERMFLAGS)"
295 CFLAGS="-xansi $(COPTS) $(OPTIONS) -DHAVE_GETCWD" \
296 LIBS="-lgl_s -lm -lX11_s $(LIBS)" X11FLAGS=" " X11INCLUDES=" " \
298 PLOTXFLAG=" " GNUPLOT_X11=" " X11INSTALL=x11_noinstall \
299 TERMFLAGS="-I. -Iterm -DIRIS4D -DANSI" INSTALL="cp"
302 CFLAGS="-xansi $(COPTS) $(OPTIONS) -DHAVE_GETCWD" \
303 LIBS="-lgl_s -lm -lc_s -lX11_s $(LIBS)" X11FLAGS="$(X11FLAGS)" \
304 X11INCLUDES="$(X11INCLUDES)" \
306 PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
307 X11INSTALL="$(X11INSTALL)" \
308 TERMFLAGS="-I. -Iterm -DX11 -DIRIS4D -DANSI" INSTALL="cp"
309 # TERMFLAGS="-I. -Iterm -DX11 -DIRIS4D -cckr" INSTALL="cp"
312 CFLAGS="$(COPTS) $(OPTIONS) -Dunix" \
313 LIBS="-lccgi $(LIBS)" X11FLAGS=" " X11INCLUDES=" " \
314 X11LIBS=" " PLOTXFLAG=" " GNUPLOT_X11=" " X11INSTALL=x11_noinstall \
315 TERMFLAGS="-I. -Iterm -DUNIXPLOT -DCGI"
318 CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_GETCWD" \
319 LIBS="$(LIBS)" X11FLAGS=" " X11INCLUDES=" " \
321 PLOTXFLAG=" " GNUPLOT_X11=" " X11INSTALL=x11_noinstall \
322 LD="ld /lib/crt0s.o /lib/shlib.ifile" \
323 TERMFLAGS="-I. -Iterm -DUNIXPC"
326 CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_GETCWD" \
327 X11FLAGS=" " X11INCLUDES=" " \
329 PLOTXFLAG=" " GNUPLOT_X11=" " X11INSTALL=x11_noinstall \
330 TERMFLAGS="-I. -Iterm -DUNIXPLOT" LIBS="$(LIBS) -lplot"
333 CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_GETCWD -DTCSETSW -DTCGETS" \
334 LIBS="$(LIBS) -lcposix" X11FLAGS=" " X11INCLUDES=" " \
335 X11LIBS=" " PLOTXFLAG=" " GNUPLOT_X11=" " \
336 X11INSTALL=x11_noinstall \
337 TERMFLAGS="-I. -Iterm -DUNIXPLOT"
340 CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_GETCWD -DTCSETSW -DTCGETS" \
341 LIBS="$(LIBS) -lcposix" X11FLAGS="$(X11FLAGS)" X11INCLUDES="$(X11INCLUDES)" \
342 X11LIBS="$(X11LIBS)" PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11="$(GNUPLOT_X11)" \
343 X11INSTALL= "$(X11INSTALL)" \
344 TERMFLAGS="-I. -Iterm -DUNIXPLOT -DX11"
347 CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_GETCWD -DISC22" \
348 LIBS="$(LIBS) -lplot -lcposix" X11FLAGS="$(X11FLAGS)" X11INCLUDES="$(X11INCLUDES)" \
349 X11LIBS="$(X11LIBS) -linet -lpt -lcposix" PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11="$(GNUPLOT_X11)" \
350 X11INSTALL= "$(X11INSTALL)" \
351 TERMFLAGS="-I. -Iterm -DUNIXPLOT -DX11"
354 CFLAGS="$(COPTS) $(OPTIONS) -DERF -DGAMMA=gamma -DXPG3_LOCALE -Dunix" \
355 LIBS="$(LIBS) -lbsd" X11FLAGS="$(X11FLAGS)" \
356 X11INCLUDES="$(X11INCLUDES)" \
357 X11LIBS="$(X11LIBS)" \
358 PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
359 X11INSTALL="$(X11INSTALL)" \
360 TERMFLAGS="$(TERMFLAGS) -qmaxmem=9000"
363 CFLAGS="$(COPTS) $(OPTIONS) -DGAMMA=gamma -DXPG3_LOCALE -Dunix" \
364 LIBS="$(LIBS) -lbsd" X11FLAGS="$(X11FLAGS)" \
365 X11INCLUDES="$(X11INCLUDES)" \
366 X11LIBS="$(X11LIBS)" \
367 PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
368 X11INSTALL="$(X11INSTALL)" \
369 TERMFLAGS="$(TERMFLAGS)"
372 CFLAGS="$(COPTS) -DGAMMA=lgamma -DNEXT -DREADLINE -DHAVE_SGTTY_H -DHAVE_STRNCASECMP -DHAVE_LIBC_H $(OPTIONS)" \
373 LIBS="-lNeXT_s -lsys_s $(LIBS)" \
374 X11FLAGS="$(X11FLAGS)" \
375 X11INCLUDES=" " X11LIBS=" " PLOTXFLAG=" " \
376 GNUPLOT_X11=" " X11INSTALL=x11_noinstall \
377 TERMFLAGS="-I. -Iterm -ObjC -DANSI" OBJS=" $(OBJS) $(NEXTOBJS)"
380 CFLAGS="$(COPTS) -DGAMMA=lgamma -DNEXT -DREADLINE -DHAVE_SGTTY_H -DHAVE_STRNCASECMP -DX_NOT_POSIX -DHAVE_LIBC_H $(OPTIONS)" \
381 LIBS="-lNeXT_s -lsys_s $(LIBS)" \
382 X11LIBS="-L/usr/lib/X11 -lX11" \
383 X11INCLUDES="$(X11INCLUDES)" X11FLAGS="$(X11FLAGS)" \
384 PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
385 X11INSTALL="$(X11INSTALL)" \
386 TERMFLAGS="-I. -Iterm -DX11 -ObjC -DANSI" OBJS=" $(OBJS) $(NEXTOBJS)"
389 CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_GETCWD" \
390 LIBS="$(LIBS)" X11FLAGS=" " \
393 PLOTXFLAG=" " GNUPLOT_X11=" " \
394 X11INSTALL=x11_noinstall \
395 TERMFLAGS="-I. -Iterm"
398 CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_GETCWD" \
399 LIBS="$(LIBS)" X11FLAGS="$(X11FLAGS)" \
400 X11INCLUDES="$(X11INCLUDES)" \
401 X11LIBS="$(X11LIBS)" \
402 PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11="$(GNUPLOT_X11)" \
403 X11INSTALL=$(X11INSTALL) \
404 TERMFLAGS="-I. -Iterm -DX11"
407 CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_GETCWD -DCRIPPLED_SELECT" \
408 LIBS="$(LIBS) -lplot" X11FLAGS="$(X11FLAGS)" \
409 X11INCLUDES="$(X11INCLUDES)" \
410 X11LIBS="-lX11 -lseq -lsocket -linet -lnsl" \
411 PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11="$(GNUPLOT_X11)" \
412 X11INSTALL=$(X11INSTALL) \
413 TERMFLAGS="$(TERMFLAGS)"
415 SEQUENT_X11_FLAGS = \
416 CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_SGTTY_H -DCRIPPLED_SELECT" \
417 LIBS="$(LIBS) -lplot" X11FLAGS="$(X11FLAGS) -DX_WCHAR" \
418 X11INCLUDES="$(X11INCLUDES)" \
419 X11LIBS="-lX11 -lseq " \
420 PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11="$(GNUPLOT_X11)" \
421 X11INSTALL=$(X11INSTALL) \
422 TERMFLAGS="$(TERMFLAGS)"
424 # Convex X11 uses -O1 for scalar optimization only
427 CFLAGS="$(COPTS) $(OPTIONS) -DHUGE=8.9e307 -O1" \
428 LIBS="$(LIBS)" X11FLAGS="$(X11FLAGS)" X11INCLUDES="$(X11INCLUDES)" \
429 X11LIBS="$(X11LIBS)" \
430 PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
431 X11INSTALL="$(X11INSTALL)" \
432 TERMFLAGS="$(TERMFLAGS)"
435 CFLAGS="$(COPTS) $(OPTIONS) -I/usr/sys/include -I/usr/sys/BINARY -DANSI -D_XOPEN_SOURCE -D__osf__" \
437 X11FLAGS="$(X11FLAGS) -DMOTIF -D_NO_PROTO -D_OSF_SOURCE" \
438 X11INCLUDES="$(X11INCLUDES) -I/usr/include/Xm" \
439 X11LIBS="$(X11LIBS)" \
440 PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
441 X11INSTALL="$(X11INSTALL)" \
442 TERMFLAGS="$(TERMFLAGS) "
445 CFLAGS="$(COPTS) $(OPTIONS) -DHAVE_STRNCASECMP -DGAMMA=lgamma -DHAVE_UNISTD_H -DLINUXVGA -D PROTOTYPE__P" \
446 LIBS="-lvga $(LIBS)" \
447 X11FLAGS="$(X11FLAGS)" \
448 X11INCLUDES="-I/usr/X386/include $(X11INCLUDES)" \
449 X11LIBS="-L/usr/X386/lib $(X11LIBS)" \
450 PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
451 X11INSTALL="$(X11INSTALL)" \
452 TERMFLAGS="$(TERMFLAGS) -DX11"
454 ####################################################################
455 # List of source files
456 # Used for making shar files, lint, and some dependencies.
457 DIRS = term demo docs docs/latextut
459 CSOURCE1 = bf_test.c binary.c command.c set.c show.c
460 CSOURCE2 = help.c graphics.c graph3d.c internal.c
461 CSOURCE3 = misc.c eval.c parse.c plot.c plot2d.o plot3d.o readline.c scanner.c standard.c stdfn.c
462 CSOURCE4 = bitmap.c term.c time.c util.c version.c fit.c matrix.c variable.c
463 CSOURCE5 = term/ai.trm term/amiga.trm term/aed.trm term/atariaes.trm term/atarivdi.trm \
464 term/cgi.trm term/corel.trm \
465 term/djsvga.trm term/dumb.trm \
466 term/dxf.trm term/dxy.trm term/debug.trm \
467 term/emxvga.trm term/eepic.trm term/epson.trm term/excl.trm \
468 term/fig.trm term/grass.trm term/hp26.trm term/hp2648.trm term/hpgl.trm \
469 term/hp500c.trm term/hpljii.trm term/metafont.trm term/mgr.trm\
470 term/apollo.trm term/gpr.trm term/hppj.trm term/compact.c
471 CSOURCE6 = term/impcodes.h term/imagen.trm term/next.trm term/object.h \
472 term/iris4d.trm term/kyo.trm term/latex.trm term/mif.trm \
473 term/pbm.trm term/pslatex.trm term/gpic.trm term/gnugraph.trm
474 CSOURCE7 = term/post.trm term/pstricks.trm term/qms.trm term/regis.trm \
475 term/rgip.trm term/sun.trm\
476 term/t410x.trm term/tek.trm term/texdraw.trm \
477 term/tgif.trm term/tpic.trm \
478 term/unixpc.trm term/unixplot.trm \
479 term/v384.trm term/vws.trm term/x11.trm term/xlib.trm term/linux.trm
480 CSOURCE8 = contour.c specfun.c gplt_x11.c interpol.c
481 CONFIGURE = configure configure.in Makefile.in docs/Makefile.in\
482 docs/latextut/Makefile.in
483 NEXTSRC = epsviewe.m epsviewe.h
484 # not C code, but still needed
486 DEMOS = demo/1.dat demo/2.dat demo/3.dat demo/contours.dem \
487 demo/controls.dem demo/electron.dem demo/glass.dat demo/param.dem \
488 demo/polar.dem demo/simple.dem demo/surface1.dem \
489 demo/surface2.dem demo/using.dat demo/using.dem demo/world.cor \
490 demo/world.dat demo/world.dem \
491 demo/err.dat demo/poldat.dem demo/errorbar.dem \
492 demo/all.dem demo/animate.dem demo/bivariat.dem \
493 demo/prob.dem demo/stat.inc demo/prob2.dem demo/random.dem \
494 demo/discrete.dem demo/hidden.dem demo/airfoil.dem demo/gnuplot.rot\
495 demo/binary.dem demo/spline.dem demo/steps.dem demo/steps.dat \
496 demo/multimsh.dem demo/whale.dat demo/hemisphr.dat \
497 demo/scatter.dem demo/scatter2.dat demo/singulr.dem demo/klein.dat
499 ETC = Copyright 0README README.gnu README.ami makefile.unx makefile.vms \
500 linkopt.amg makefile.amg makefile.ami linkopt.vms buildvms.com \
501 lasergnu makefile.r makefile.nt makefile.g 0FAQ 0BUGS\
502 term/README History gnuplot.el intergra.x11 0INSTALL README.3p1\
503 README.3p2 README.3p3 README.3p4 README.pro README.nex README.x11 \
504 README.3d README.mf README.win README.iso README.3p5 README.pic \
505 README.xli $(CONFIGURE)
507 #BETA files (not standard distribution files)
510 PC = corgraph.asm corplot.c header.mac hrcgraph.asm lineproc.mac \
511 linkopt.msc makefile.msc makefile.tc makefile.st makefile.djg \
512 pcgraph.asm gnuplot.def makefile.286 makefile.emx \
513 makefile.ztc linkopt.ztc term/fg.trm term/pc.trm
514 WINDOWS = makefile.win makefile.msw README.win win/wcommon.h \
515 win/wgnuplib.c win/wgnuplib.def win/wgnuplib.h win/wgnuplib.rc \
516 win/wgnuplot.def win/wgnuplot.hpj win/wgnuplot.mnu win/wgnuplot.rc \
517 win/wgraph.c win/winmain.c win/wmenu.c win/wpause.c \
518 win/wprinter.c win/wresourc.h win/wtext.c win/wtext.h \
519 win/geticon.c docs/doc2rtf.c term/win.trm
520 OS2 = makefile.os2 os2/makefile os2/dialogs.c os2/dialogs.h os2/gclient.c \
521 os2/gnuicon.uue os2/gnupmdrv.c os2/gnupmdrv.def os2/gnupmdrv.h \
522 os2/gnupmdrv.itl os2/gnupmdrv.rc os2/print.c docs/doc2ipf.c \
523 README.os2 term/pm.trm
525 # Documentation and help files
526 DOCS1 = docs/makefile docs/README docs/checkdoc.c docs/doc2gih.c \
527 docs/doc2hlp.c docs/doc2hlp.vms docs/doc2ms.c docs/doc2tex.c \
528 docs/gnuplot.1 docs/lasergnu.1 docs/toc_entr.sty docs/doc2info.pl \
529 docs/titlepag.ms docs/titlepag.tex docs/makefile.ami \
531 DOCS2 = docs/gnuplot.doc docs/gpcard.tex
532 DOCS3 = docs/latextut/makefile docs/latextut/eg1.plt \
533 docs/latextut/eg2.plt docs/latextut/eg3.dat docs/latextut/eg3.plt \
534 docs/latextut/eg4.plt docs/latextut/eg5.plt docs/latextut/eg6.plt \
535 docs/latextut/header.tex docs/latextut/tutorial.tex \
536 docs/latextut/linepoin.plt
538 #########################################################################
539 # Default target (informational)
541 @echo "Please do a 'make <MACHINE>' where <MACHINE> is one of the following:"
543 @echo "apollo for Apollo running SR10.3 with Apollo's X11"
544 @echo "dec_osf for Dec3100/5000 running DEC OSF/1 v1.0"
545 @echo "dec for Dec3100/5000 running Ultrix 3.1d with MIT's X11"
546 @echo "hp8 for HP/9000 700 series running HP/UX 8.0 with MIT's X11R4"
547 @echo "hp for HP/9000 700 series running HP/UX 9.01 with MIT's X11R5"
548 @echo "sun for Sun sparcstation running SunOS 4.1 with suntools (no X11) "
549 @echo "sun_x11 for Sun sparcstation running SunOS 4.1 with suntools and X11 "
550 @echo "solaris_x11 for Sun Sparcstation running Solaris 2 with X11 "
551 @echo "sgi for Silicon Graphics IRIS4D machines (no X11) "
552 @echo "sgix11 for Silicon Graphics IRIS4D machines (X11) "
553 @echo "next for NeXT Cube and Slab running NeXTOS 2.0+ (no X11)"
554 @echo "next_x11 for NeXT Cube and Slab running NeXTOS 2.0+ with X11"
555 @echo "3b1 for ATT 3b1 machines (no X11) "
556 @echo "3b2 for ATT 3b2 machines (no X11) "
557 @echo "386ix for 386 machines running 386/ix (no X11)"
558 @echo "386ix_x11 for 386 machines running 386/ix with T.Roell X386"
559 @echo "isc22_x11 for 386 machines running ISC 2.2 with T.Roell X386"
560 @echo "aix32 for IBM RS/6000 running AIX 3.2 with xlc 1.2"
561 @echo "aix32o for IBM RS/6000 running AIX 3.2 with xlc 1.1"
562 @echo "x11 for a generic machine (like a sun or dec) with MIT's X11"
563 @echo "cray for Cray Y-MP or Cray-2 running Unicos 6.0 or 6.1 (no X11)"
564 @echo "cray_x11 for Cray Y-MP or Cray-2 running Unicos 6.0 or 6.1 with X11"
565 @echo "ptx_x11 for Sequent Dynix/PTX with MIT X11"
566 @echo "sequent_x11 for Sequent Symmetry (DYNIX 3) with X11"
567 @echo "convex_x11 for Convex 9.0 or up with MIT X11"
568 @echo "osf for KSR1 running DEC OSF/1 v1.0 (use make -j 16)"
569 @echo "linux for LINUX with XFree86 or vgalib"
575 @echo " make apollo OPTIONS='-DNOCWDRC' "
576 @echo " make apollo DEST='/usr/um/misc/bin' "
580 @echo " make solaris_x11"
581 @echo " make sun HELPDEST='/usr/um/misc/lib' "
582 @echo " make sun X11INCLUDES='-I/usr/local/include' "
583 @echo " make sun_x11"
587 @echo " make 386ix_x11"
588 @echo " make isc22_x11"
589 @echo " make aix32 MANDEST='/usr/um/misc/man/man1' COPTS='-O' "
591 @echo " make cray_x11"
593 @echo "If you just type 'make All' , it will build gnuplot for Unix X11"
594 @echo "and the following variables will be used as default:"
596 @echo " DEST " $(DEST)
597 @echo " MANDEST " $(MANDEST)
598 @echo " HELPDEST " $(HELPDEST)
599 @echo " EMAIL " $(EMAIL)
601 @echo " COPTS " $(COPTS)
602 @echo " OPTIONS " $(OPTIONS)
603 @echo " CFLAGS " $(CFLAGS)
604 @echo " LIBS " $(LIBS)
605 @echo " X11FLAGS " $(X11FLAGS)
606 @echo " X11LIBS " $(X11LIBS)
607 @echo " X11INCLUDES " $(X11INCLUDES)
608 @echo " TERMFLAGS " $(TERMFLAGS)
609 @echo " LASERGNU " $(LASERGNU)
611 @echo "If you are not familiar with makefiles or just want to know what"
612 @echo " 'make <MACHINE>' would do without actually doing anything, then type"
613 @echo " 'make <MACHINE> -n' "
616 ###############################################################
617 # Targets for each machine
620 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(X11_FLAGS) $(TARGET)
623 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(DEC_OSF_FLAGS) $(TARGET)
626 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(DEC_FLAGS) $(TARGET)
629 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(APOLLO_FLAGS) $(TARGET)
632 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(HP8_FLAGS) $(TARGET)
635 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(HP9_FLAGS) $(TARGET)
638 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(NEXT_FLAGS) $(TARGET)
641 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(NEXT_X11_FLAGS) $(TARGET)
644 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(SOLARIS_X11_FLAGS) $(TARGET)
647 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(SUN_FLAGS) $(TARGET)
650 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(SUN_X11_FLAGS) $(TARGET)
653 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(SUN_X11_MGR_FLAGS) $(TARGET)
656 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(SGI_FLAGS) $(TARGET)
659 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(SGIX11_FLAGS) $(TARGET)
662 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(CGI_FLAGS) $(TARGET)
665 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(3B1_FLAGS) $(TARGET)
668 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(3B2_FLAGS) $(TARGET)
671 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(386IX_FLAGS) $(TARGET)
674 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(386IX_X11_FLAGS) $(TARGET)
677 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(ISC22_X11_FLAGS) $(TARGET)
680 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(AIX_FLAGS) $(TARGET)
683 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(AIXO_FLAGS) $(TARGET)
686 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(CRAY_FLAGS) $(TARGET)
689 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(CRAY_X11_FLAGS) $(TARGET)
692 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(PTX_X11_FLAGS) $(TARGET)
695 make $(MFLAGS) $(MY_FLAGS) $(SEQUENT_X11_FLAGS) $(TARGET)
698 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(CONVEX_X11_FLAGS) $(TARGET)
701 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(OSF_FLAGS) $(TARGET)
704 $(MAKE) $(MFLAGS) $(MY_FLAGS) $(LINUX_FLAGS) $(TARGET)
706 #############################################################
707 # Targets that really do something
710 @echo "Please just type 'make' in order to get some information on "
711 @echo "how to build gnuplot under Unix and the X Window System."
713 All: gnuplot $(GNUPLOT_X11) doc demo/binary1
715 gnuplot: $(OBJS) version.o
716 $(LD) -o gnuplot $(OBJS) version.o $(LIBS)
719 ( cd docs; $(MAKE) $(MFLAGS) $(MY_FLAGS) gnuplot.gih )
721 gnuplot_x11: gplt_x11.c stdfn.c
722 $(CC) $(CFLAGS) $(X11FLAGS) $(X11INCLUDES) -o gnuplot_x11 \
723 stdfn.c gplt_x11.c $(X11LIBS)
725 demo/binary1 demo/binary2 demo/binary3: bf_test
726 ( cd demo; ../bf_test )
728 bf_test: bf_test.o binary.o alloc.o
729 $(CC) $(CFLAGS) bf_test.o binary.o alloc.o -lm -o bf_test
730 ################################################################
731 # Installation instructions
735 @echo "Please do a 'make <MACHINE> TARGET=Install' where <MACHINE> is one of the following:"
737 @echo "apollo, dec, hp, sun, sun_x11, sgi, sgix11, cgi,"
738 @echo "next, next_x11, 3b1, 386ix, 386ix_x11, aix32, aix32o,"
739 @echo "x11, cray, cray_x11, ptx_x11, sequent_x11, convex_x11"
743 @echo " make x11 TARGET=Install "
744 @echo " make apollo TARGET=Install "
745 @echo " make dec TARGET=Install "
746 @echo " make hp TARGET=Install "
747 @echo " make sun TARGET=Install HELPDEST='/usr/um/misc/lib BINDIR='/usr/um/misc/bin' "
748 @echo " make aix32 TARGET=Install MANDEST='/usr/um/misc/man/man1' COPTS='-O' "
750 ################################################################
751 # Installation targets
753 Install: All man_install $(X11INSTALL) $(LASERGNU)
755 strip $(DEST)/gnuplot
756 ( cd docs; $(MAKE) $(MFLAGS) $(MY_FLAGS) install-unix HELPDEST=$(HELPDEST) INSTALL="$(INSTALL)")
758 x11_install: gnuplot_x11
759 cp gnuplot_x11 $(DEST)
760 strip $(DEST)/gnuplot_x11
763 @echo "X11 not requested, so gnuplot_x11 program not installed"
765 man_install: docs/gnuplot.1
766 cp docs/gnuplot.1 $(MANDEST)
768 lasergnu_install: lasergnu docs/lasergnu.1
770 chmod 755 $(DEST)/lasergnu
771 cp docs/lasergnu.1 $(MANDEST)
775 @echo "Lasergnu will not be installed by default."
776 @echo "If you think you need the lasergnu script to print"
777 @echo " files on the imagen or PostScript printers, then"
779 @echo " 'make <MACHINE> TARGET=Install LASERGNU='lasergnu_install' "
781 @echo "Lasergnu is really not needed since within gnuplot you can"
782 @echo " can create files (in impress or PostScript language) and"
783 @echo " print them through your favorite print command (lpr, lp, prf, ipr)."
786 ################################################################
790 $(CC) $(CFLAGS) $(PLOTXFLAG) -c plot.c
792 term.o: term.h term.c $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
793 $(CC) $(CFLAGS) $(TERMFLAGS) -c term.c
796 $(CC) $(CFLAGS) -DCONTACT=\"$(EMAIL)\" -c version.c
798 epsviewe.o : epsviewe.h epsviewe.m
799 $(CC) -ObjC -c epsviewe.m
803 command.o: command.c binary.h fit.h plot.h
804 $(CC) $(CFLAGS) -c command.c -DHELPFILE=\"$(HELPDEST)/gnuplot.gih\"
806 show.o: show.c plot.h setshow.h
807 $(CC) $(CFLAGS) -DHELPFILE=\"$(HELPFILE)\" -DBINDIR=\"$(DEST)\" -c $<
810 command.o help.o misc.o parse.o: help.h
812 command.o graphics.o graph3d.o misc.o plot.o set.o show.o term.o: setshow.h
814 fit.o: fit.c fit.h matrix.h plot.h
816 matrix.o: matrix.c matrix.h fit.h
818 bitmap.o term.o: bitmap.h
820 variable.o: variable.c plot.h variable.h
822 ################################################################
823 # Miscellaneous targets
825 SOURCES=plot.h help.h setshow.h bitmap.h term.h variable.h $(CSOURCE1) \
826 $(CSOURCE2) $(CSOURCE3) $(CSOURCE4) $(CSOURCE5) $(CSOURCE6) \
827 $(CSOURCE7) $(CSOURCE8) $(NEXTSRC) $(WINDOWS) $(OS2)
829 DOCS = $(DOCS1) $(DOCS2) $(DOCS3)
835 rm -f *.o *.orig *.rej *~ *.bak term/*~ term/*.orig term/*.bak
836 ( cd docs; $(MAKE) $(MFLAGS) clean )
837 ( cd docs/latextut; $(MAKE) $(MFLAGS) clean )
840 rm -f *.o *~ *.orig *.rej *.bak term/*~ term/*.orig term/*.bak \
841 TAGS gnuplot gnuplot_x11 bf_test demo/binary[1-3] \
842 demo/temp.set demo/defaults.ini
843 ( cd docs; $(MAKE) $(MFLAGS) clean )
844 ( cd docs/latextut; $(MAKE) $(MFLAGS) spotless )
846 ################################################################
847 # Making shar files for mailing gnuplot
849 shar: gnuplot.sh00 gnuplot.sh01 gnuplot.sh02 gnuplot.sh03 gnuplot.sh04 \
850 gnuplot.sh05 gnuplot.sh06 gnuplot.sh07 gnuplot.sh08 \
851 gnuplot.sh09 gnuplot.sh10 gnuplot.sh11 gnuplot.sh12 \
852 gnuplot.sh13 gnuplot.sh14 gnuplot.sh15 gnuplot.sh16
855 echo '#!/bin/sh' > gnuplot.sh00
856 echo '# This is a shell file to make directories' >> gnuplot.sh00
857 echo mkdir $(DIRS) >> gnuplot.sh00
860 shar $(ETC) > gnuplot.sh01
862 gnuplot.sh02: $(DOCS1)
863 shar $(DOCS1) > gnuplot.sh02
865 gnuplot.sh03: $(DOCS2)
866 shar $(DOCS2) > gnuplot.sh03
868 gnuplot.sh04: $(DOCS3)
869 shar $(DOCS3) > gnuplot.sh04
871 gnuplot.sh05: $(CSOURCE1)
872 shar $(CSOURCE1) > gnuplot.sh05
874 gnuplot.sh06: $(CSOURCE2)
875 shar $(CSOURCE2) > gnuplot.sh06
877 gnuplot.sh07: $(CSOURCE3)
878 shar $(CSOURCE3) > gnuplot.sh07
880 gnuplot.sh08: $(CSOURCE4)
881 shar $(CSOURCE4) > gnuplot.sh08
883 gnuplot.sh09: $(CSOURCE5)
884 shar $(CSOURCE5) > gnuplot.sh09
886 gnuplot.sh10: $(CSOURCE6)
887 shar $(CSOURCE6) > gnuplot.sh10
889 gnuplot.sh11: $(CSOURCE7)
890 shar $(CSOURCE7) > gnuplot.sh11
893 shar $(PC) > gnuplot.sh12
895 gnuplot.sh13: $(CSOURCE8)
896 shar $(CSOURCE8) > gnuplot.sh13
898 gnuplot.sh14: $(DEMOS)
899 shar $(DEMOS) > gnuplot.sh14
901 gnuplot.sh15: $(WINDOWS)
902 shar $(WINDOWS) > gnuplot.sh15
904 gnuplot.sh16: $(BETA)
905 shar $(BETA) > gnuplot.sh16
907 tar: $(ETC) $(SOURCES) $(PC) $(DEMOS) $(BETA) $(DOCS)
908 $(TAR) cvf /tmp/gnuplot.tar $(ETC) $(SOURCES) $(PC)\
909 $(DEMOS) $(BETA) $(DOCS)
911 # the following uses Rick Saltz's makekit shar generation tools
914 kit: $(ETC) $(SOURCES) $(PC) $(DEMOS) $(BETA) $(DOCS)
915 makekit -s135k -k30 $(ETC) $(SOURCES) $(PC)\
916 $(DEMOS) $(BETA) $(DOCS)
918 branch: rcs rcsdoc rcsdemo
921 rcs -b$(RCSVER) $(ETC) $(SOURCES) $(PC)
924 rcs -b$(RCSVER) $(DOCS)
927 rcs -b$(RCSVER) $(DEMOS)
929 ciall: ci cidoc cidemo
932 ci -l$(RCSVER) -m$(RCSCOM) -t-$(RCSCOM) $(SOURCES) $(PC) $(ETC)
935 ci -l$(RCSVER) -m$(RCSCOM) -t-$(RCSCOM) $(DOCS)
938 ci -l$(RCSVER) -m$(RCSCOM) -t-$(RCSCOM) $(DEMOS)
941 ci -f$(RCSVER) -m$(RCSCOM) -t-$(RCSCOM) $(SOURCES) $(ETC) $(DOCS) $(DEMOS) $(PC)
943 coall: co codoc codemo
946 co -l -r$(RCSVER) $(ETC) $(SOURCES) $(PC)
949 co -l -r$(RCSVER) $(DOCS)
952 co -l -r$(RCSVER) $(DEMOS)