XCOMM -*-Makefile-*-
XCOMM --------------------------------------------------------------------------
XCOMM File:         Imakefile
XCOMM RCS:          $Header: /users/npm/src/winterp/src-server/RCS/Imakefile,v 2.2 1994/06/13 09:03:37 npm Exp $
XCOMM Description:  IMAKEFILE FOR WINTERP-SERVER DIRECTORY
XCOMM Author:       Niels Mayer
XCOMM Created:      Fri Nov 24 19:47:38 1989
XCOMM Modified:     
XCOMM Language:     Imake
XCOMM Package:      N/A
XCOMM Status:       X11r6 contrib release
XCOMM
XCOMM Copyright (C) 1994, Enterprise Integration Technologies Corp. and Niels Mayer.
XCOMM WINTERP 1.15-1.99, Copyright (c) 1993, Niels P. Mayer.
XCOMM WINTERP 1.0-1.14, Copyright (c) 1989-1992 Hewlett-Packard Co. and Niels Mayer.
XCOMM 
XCOMM Permission to use, copy, modify, distribute, and sell this software and
XCOMM its documentation for any purpose is hereby granted without fee, provided
XCOMM that the above copyright notice appear in all copies and that both that
XCOMM copyright notice and this permission notice appear in supporting
XCOMM documentation, and that the name of Enterprise Integration Technologies,
XCOMM Hewlett-Packard Company, or Niels Mayer not be used in advertising or
XCOMM publicity pertaining to distribution of the software without specific,
XCOMM written prior permission. Enterprise Integration Technologies, 
XCOMM Hewlett-Packard Company, and Niels Mayer makes no representations about
XCOMM the suitability of this software for any purpose.  It is provided "as is"
XCOMM without express or implied warranty.
XCOMM 
XCOMM ENTERPRISE INTEGRATION TECHNOLOGIES, HEWLETT-PACKARD COMPANY AND NIELS
XCOMM MAYER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 
XCOMM ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 
XCOMM ENTERPRISE INTEGRATION TECHNOLOGIES, HEWLETT-PACKARD COMPANY OR NIELS
XCOMM MAYER BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
XCOMM DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
XCOMM IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
XCOMM OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
XCOMM
XCOMM See ./winterp/COPYRIGHT for information on contacting the authors.
XCOMM
XCOMM Please e-mail comments, modifications, questions, improvements and
XCOMM bugfixes to the WINTERP mailing list winterp@netcom.com. Please send 
XCOMM mailing list subscribe/unsubscribe notices to winterp-request@netcom.com .
XCOMM 
XCOMM Post XLISP-specific questions/information to the USENET newsgroup
XCOMM comp.lang.lisp.x.
XCOMM
XCOMM --------------------------------------------------------------------------

XCOMM
XCOMM Set "WANT_DROP_POCKET_WIDGET=-DSGI_DROP_POCKET_WIDGET" if you want to
XCOMM use SGI Irix 5.X and DropPocket widget. This is only useful if you're
XCOMM building applications that interact with the IndigoMagic desktop
XCOMM environment. Uncomment it or set "WANT_DROP_POCKET_WIDGET=" if you don't
XCOMM want this widget linked in to WINTERP. You may also want to remove
XCOMM "-lSgm" from "LIBS" if you're not using the SGI Drop Pocket widget.
XCOMM
#ifdef SGIArchitecture
 WANT_DROP_POCKET_WIDGET	= -DSGI_DROP_POCKET_WIDGET
 /* WANT_DROP_POCKET_WIDGET	= */
#else /* !defined(SGIArchitecture) */
 WANT_DROP_POCKET_WIDGET	=
#endif /* SGIArchitecture */

XCOMM
XCOMM Set "WANT_TABLE_WIDGET=-DWINTERP_TABLE_WIDGET" if you want to use the
XCOMM Table layout manager widget (see widgets/Table.doc, widgets/Table.c).
XCOMM Uncomment it or set "WANT_TABLE_WIDGET=" if you don't want this widget
XCOMM linked in to WINTERP
XCOMM
 WANT_TABLE_WIDGET		= -DWINTERP_TABLE_WIDGET
 /* WANT_TABLE_WIDGET	= */

XCOMM
XCOMM Set "WANT_XTANGO_WIDGET=-DWINTERP_XTANGO_WIDGET" if you want to use the
XCOMM Xtango graphics/animation widget (see directory ./xtango/, and files
XCOMM ../doc/xtango.README, ../doc/xtango.ps.Z and ../doc/xtangodoc.tex)
XCOMM Uncomment it or set "WANT_XTANGO_WIDGET=" if you don't want this widget
XCOMM linked in to WINTERP. Note that compiling with the Xtango widget feature
XCOMM makes the WINTERP binary approx XXX kBytes larger on a 68040, and increases
XCOMM runtime size too.
XCOMM
 WANT_XTANGO_WIDGET		= -DWINTERP_XTANGO_WIDGET
 /* WANT_XTANGO_WIDGET	= */

XCOMM
XCOMM Set "WANT_XMGRAPH_WIDGET=-DWINTERP_XMGRAPH_WIDGET" if you want to use the
XCOMM XmGraph layout manager widget (see widgets/XmGraph.3x, widgets/XmArc.3x).
XCOMM Uncomment it or set "WANT_XMGRAPH_WIDGET=" if you don't want this widget
XCOMM linked in to WINTERP. Note that compiling with the XmGraph widget feature
XCOMM makes the WINTERP binary approx XXX Bytes larger on a 68040, and increases
XCOMM runtime size too.
XCOMM
 WANT_XMGRAPH_WIDGET		= -DHP_GRAPH_WIDGET
/* WANT_XMGRAPH_WIDGET	= */

XCOMM
XCOMM Set "WANT_EXPECT_SUBPROCESS=-DWINTERP_EXPECT_SUBPROCESS" if you want to use
XCOMM WINTERP's subprocess facilities provided by Don Libes' expect library.
XCOMM (see expect/libexpect.man).
XCOMM Uncomment it or set "WANT_EXPECT_SUBPROCESS=" if you don't want this facility
XCOMM linked in to WINTERP. Alternately, you may need to remove this feature if
XCOMM your OS can't build expect/libexpect.a.
XCOMM
 WANT_EXPECT_SUBPROCESS		= -DWINTERP_EXPECT_SUBPROCESS
 /* WANT_EXPECT_SUBPROCESS	= */

XCOMM
XCOMM Set "WANT_INET_SERVER=-DWINTERP_WANT_INET_SERVER" if you want to use
XCOMM WINTERP's internet domain winterp-lisp eval server. To use this, you
XCOMM must also set resource "Winterp.enableInetServer: true"
XCOMM (default is false) and use ../src-client/wl-tcpip as the server client.
XCOMM Uncomment it or set "WANT_INET_SERVER=" if you don't want this facility
XCOMM linked in to WINTERP. You may want to disable this feature if your
XCOMM OS has problems compiling/linking code using internet domain sockets.
XCOMM Alternately, since the internet domain server is a security hole, you
XCOMM may want to prevent any of your WINTERP-application users from enabling
XCOMM it.
XCOMM
 WANT_INET_SERVER		= 
 /* WANT_INET_SERVER		= -DWINTERP_WANT_INET_SERVER */

XCOMM
XCOMM Set "WANT_UNIX_SERVER=-DWINTERP_WANT_UNIX_SERVER" if you want to use
XCOMM WINTERP's unix domain socket based winterp-lisp eval server. To use
XCOMM this, you must also set resource "Winterp.enableUnixServer: true"
XCOMM (default is false) and use ../src-client/wl as the server client.
XCOMM Uncomment it or set "WANT_UNIX_SERVER=" if you don't want this facility
XCOMM linked in to WINTERP. You may want to disable this feature if your
XCOMM OS has problems compiling/linking code using unix domain sockets.
XCOMM
 WANT_UNIX_SERVER		= -DWINTERP_WANT_UNIX_SERVER
 /* WANT_UNIX_SERVER		= */

XCOMM
XCOMM Set "WANT_STDIN_SERVER=-DWINTERP_WANT_STDIN_SERVER" if you want to be
XCOMM able to evaluate winterp-lisp s-expressions typed into the terminal
XCOMM (stdin). To use this, you must also set resource
XCOMM "Winterp.enableStdinServer: true" (true is the default value).
XCOMM Uncomment it or set "WANT_UNIX_SERVER=" if you don't want this facility
XCOMM linked in to WINTERP. You may want to disable this feature if your
XCOMM OS has problems with doing XtAppAddInput(...fileno(stdin)...).
XCOMM
 WANT_STDIN_SERVER		= -DWINTERP_WANT_STDIN_SERVER
 /* WANT_STDIN_SERVER	= */


#define IHaveSubdirs
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'

/******************************************************************************/

#if (defined(SunArchitecture) && (OSMajorVersion > 4))
XCOMM -- Solaris 2.3 running built-in X11/Motif/cc from 2.3 SDK option.
 SYS_LIBRARIES = -L/usr/openwin/lib -L/opt/SUNWmotif/lib -lXm $(XTOOLLIB) -lgen $(XLIBONLY) -lnsl -lsocket -lm
 INCLUDES = -I. -I/usr/openwin/include -I/opt/SUNWmotif/include
 DEFINES = -DWINTERP $(WANT_TABLE_WIDGET) $(WANT_XTANGO_WIDGET) $(WANT_XMGRAPH_WIDGET) $(WANT_EXPECT_SUBPROCESS) $(WANT_INET_SERVER) $(WANT_UNIX_SERVER) $(WANT_STDIN_SERVER)
#else /* (defined(SunArchitecture) && (OSMajorVersion > 4)) */

#if (defined(SunArchitecture) && (OSMajorVersion <= 4))
XCOMM -- SunOS 4.1.3 -- you'll probably need to set -L in SYS_LIBRARIES
XCOMM -- and -I in INCLUDES unless your imake/xmkmf was set up correctly
XCOMM -- for your Motif (since there's no std location for this on SunOS).
 SYS_LIBRARIES = -lXm $(XTOOLLIB) $(XLIBONLY) -lm
 INCLUDES = -I.
 DEFINES = -DWINTERP $(WANT_TABLE_WIDGET) $(WANT_XTANGO_WIDGET) $(WANT_XMGRAPH_WIDGET) $(WANT_EXPECT_SUBPROCESS) $(WANT_INET_SERVER) $(WANT_UNIX_SERVER) $(WANT_STDIN_SERVER)
#else /* (defined(SunArchitecture) && (OSMajorVersion <= 4)) */

#ifdef HPArchitecture
XCOMM -- HPUX 9.0 w/ C/X/Motif developers environment has a useable built-in
XCOMM -- version of Motif 1.2 and X11r5. Set up SYS_LIBRARIES INCLUDES
XCOMM -- to refer to this Motif/Xtoolkit/Xlib.
 SYS_LIBRARIES = -L/usr/lib/X11R5 -L/usr/lib/Motif1.2 -lXm $(XTOOLLIB) $(XLIBONLY) -lPW -lm
 INCLUDES = -I. -I/usr/include/Motif1.2 -I/usr/include/X11R5
 DEFINES = -DWINTERP $(WANT_TABLE_WIDGET) $(WANT_XTANGO_WIDGET) $(WANT_XMGRAPH_WIDGET) $(WANT_EXPECT_SUBPROCESS) $(WANT_INET_SERVER) $(WANT_UNIX_SERVER) $(WANT_STDIN_SERVER)
#else /* !defined(HPArchitecture) */

#ifdef SGIArchitecture
XCOMM -- SGI Irix 5.X running built-in X11/Motif/cc from "IDO" option.
XCOMM -- use mmkmf (Motif version of xmkmf) to build Imakefiles
 SYS_LIBRARIES = -L/lib -L/usr/lib $(WANT_DROP_POCKET_WIDGET:-DSGI_DROP_POCKET_WIDGET=-lSgm) -lXm $(XTOOLLIB) $(XLIBONLY) -lPW -lm
 INCLUDES = -I. -I/usr/include
 DEFINES = -DWINTERP $(WANT_DROP_POCKET_WIDGET) $(WANT_TABLE_WIDGET) $(WANT_XTANGO_WIDGET) $(WANT_XMGRAPH_WIDGET) $(WANT_EXPECT_SUBPROCESS) $(WANT_INET_SERVER) $(WANT_UNIX_SERVER) $(WANT_STDIN_SERVER)
#else /* !defined(SGIArchitecture) */

#ifdef OSF1Architecture
XCOMM -- DEC OSF1 V2.0 running DEC's X11/Motif/cc developer environment option.
 SYS_LIBRARIES = -lXm $(XTOOLLIB) $(XLIBONLY) -lm
 INCLUDES = -I. -I/usr/include
 DEFINES = -DWINTERP $(WANT_TABLE_WIDGET) $(WANT_XTANGO_WIDGET) $(WANT_XMGRAPH_WIDGET) $(WANT_EXPECT_SUBPROCESS) $(WANT_INET_SERVER) $(WANT_UNIX_SERVER) $(WANT_STDIN_SERVER)
#else /* !defined(OSF1Architecture) */

XCOMM -- Default Architecture: you may need to add directories -I<xm-inc-dir>
XCOMM -- to INCLUDES and add -L<xm-lib-dir> to SYS_LIBRARIES if your
XCOMM -- 'xmkmf' and/or 'imake' has not been configured for compiling Motif
XCOMM --  programs.
 SYS_LIBRARIES = -lXm $(XTOOLLIB) $(XLIBONLY) -lm
 INCLUDES = -I.
 DEFINES = -DWINTERP $(WANT_TABLE_WIDGET) $(WANT_XTANGO_WIDGET) $(WANT_XMGRAPH_WIDGET) $(WANT_EXPECT_SUBPROCESS) $(WANT_INET_SERVER) $(WANT_UNIX_SERVER) $(WANT_STDIN_SERVER)

#endif /* OSF1Architecture */
#endif /* SGIArchitecture */
#endif /* HPArchitecture */
#endif /* (defined(SunArchitecture) && (OSMajorVersion <= 4)) */
#endif /* (defined(SunArchitecture) && (OSMajorVersion > 4)) */

/******************************************************************************/

 DROP_POCKET_WIDGET_SRCS= $(WANT_DROP_POCKET_WIDGET:-DSGI_DROP_POCKET_WIDGET=wc_DropPockt.c)
 TABLE_WIDGET_SRCS	= $(WANT_TABLE_WIDGET:-DWINTERP_TABLE_WIDGET=wc_Table.c)
 XTANGO_WIDGET_SRCS	= $(WANT_XTANGO_WIDGET:-DWINTERP_XTANGO_WIDGET=wc_Xtango.c) \
			  $(WANT_XTANGO_WIDGET:-DWINTERP_XTANGO_WIDGET=t_classes.c) \
			  $(WANT_XTANGO_WIDGET:-DWINTERP_XTANGO_WIDGET=t_path.c) \
			  $(WANT_XTANGO_WIDGET:-DWINTERP_XTANGO_WIDGET=t_trans.c) \
			  $(WANT_XTANGO_WIDGET:-DWINTERP_XTANGO_WIDGET=t_tap.c) \
			  $(WANT_XTANGO_WIDGET:-DWINTERP_XTANGO_WIDGET=t_utils.c) \
			  $(WANT_XTANGO_WIDGET:-DWINTERP_XTANGO_WIDGET=tic_Bitmap.c) \
			  $(WANT_XTANGO_WIDGET:-DWINTERP_XTANGO_WIDGET=tic_Circle.c) \
			  $(WANT_XTANGO_WIDGET:-DWINTERP_XTANGO_WIDGET=tic_Composit.c) \
			  $(WANT_XTANGO_WIDGET:-DWINTERP_XTANGO_WIDGET=tic_Ellipse.c) \
			  $(WANT_XTANGO_WIDGET:-DWINTERP_XTANGO_WIDGET=tic_GIF.c) \
			  $(WANT_XTANGO_WIDGET:-DWINTERP_XTANGO_WIDGET=tic_IMAGE.c) \
			  $(WANT_XTANGO_WIDGET:-DWINTERP_XTANGO_WIDGET=tic_Line.c) \
			  $(WANT_XTANGO_WIDGET:-DWINTERP_XTANGO_WIDGET=tic_Polygon.c) \
			  $(WANT_XTANGO_WIDGET:-DWINTERP_XTANGO_WIDGET=tic_Polyline.c) \
			  $(WANT_XTANGO_WIDGET:-DWINTERP_XTANGO_WIDGET=tic_Rect.c) \
			  $(WANT_XTANGO_WIDGET:-DWINTERP_XTANGO_WIDGET=tic_Spline.c) \
			  $(WANT_XTANGO_WIDGET:-DWINTERP_XTANGO_WIDGET=tic_Text.c)
 XMGRAPH_WIDGET_SRCS	= $(WANT_XMGRAPH_WIDGET:-DHP_GRAPH_WIDGET=wc_XmGraph.c)
 EXPECT_SUBPROCESS_SRCS	= $(WANT_EXPECT_SUBPROCESS:-DWINTERP_EXPECT_SUBPROCESS=w_subprocess.c)

 HEADERS      = app_fundecl.h \
		app_funextn.h \
		app_funidx.h \
		config.h \
		user_prefs.h \
		w_XmString.h \
		w_funtab.h \
		winterp.h \
		tango.h

 SRCS	      = utils.c \
		w_XmString.c \
		w_callbacks.c \
		w_classes.c \
		w_evnthndlr.c \
		w_funtab.c \
		w_inputCB.c \
		w_libXm.c \
		w_libXt.c \
		w_pixmap.c \
		w_resources.c \
		w_savedobjs.c \
		w_timeouts.c \
		w_txlations.c \
		w_utils.c \
		wc_ArrowB.c \
		wc_BulletinB.c \
		wc_CascadeB.c \
		wc_Command.c \
		wc_DrawingA.c \
		wc_DrawnB.c \
		wc_FileSB.c \
		wc_Form.c \
		wc_Frame.c \
		wc_Label.c \
		wc_List.c \
		wc_MainW.c \
		wc_MessageB.c \
		wc_PanedW.c \
		wc_PushB.c \
		wc_RowColumn.c \
		wc_SHELL.c \
		wc_Scale.c \
		wc_ScrollBar.c \
		wc_ScrolledW.c \
		wc_SelectioB.c \
		wc_Separator.c \
		wc_Text.c \
		wc_ToggleB.c \
		wc_WIDGET.c \
		winterp.c \
		$(XTANGO_WIDGET_SRCS) \
		$(DROP_POCKET_WIDGET_SRCS) \
		$(TABLE_WIDGET_SRCS) \
		$(XMGRAPH_WIDGET_SRCS) \
		$(EXPECT_SUBPROCESS_SRCS)

 OBJS	      = $(SRCS:.c=.o)

XCOMM
XCOMM expect/libexpect.a   -- Don Libes 'expect' library.
XCOMM xlisp/libXlisp.a     -- WINTERP version of Betz/Almy's XLISP-PLUS (2.1c++)
XCOMM xtango/libXtango.a   -- WINTERP version of Stasko/Hayes Xtango 1.52 animation/graphics system
XCOMM widgets/libwidgets.a -- WINTERP version of various widgets and utilities.
XCOMM 

 SUBDIRS              = xlisp \
			widgets \
			$(WANT_EXPECT_SUBPROCESS:-DWINTERP_EXPECT_SUBPROCESS=expect) \
			$(WANT_XTANGO_WIDGET:-DWINTERP_XTANGO_WIDGET=xtango)


MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
/* MakeLintLibSubdirs($(SUBDIRS)) */


 LOCAL_LIBRARIES =	xlisp/libXlisp.a \
			widgets/libwidgets.a \
			$(WANT_EXPECT_SUBPROCESS:-DWINTERP_EXPECT_SUBPROCESS=expect/libexpect.a) \
			$(WANT_XTANGO_WIDGET:-DWINTERP_XTANGO_WIDGET=xtango/libXtango.a)

ComplexProgramTarget(winterp)

LinkFileList(all,winterp,../bin,../src-server)

InstallManPage(winterp,$(MANDIR))
InstallAppDefaults(Winterp)
