################################################################################
#
# File:         Imakefile
# RCS:          $Header: Imakefile,v 1.3 91/03/14 03:15:38 mayer Exp $
# Description:  IMAKEFILE FOR WINTERP-SERVER DIRECTORY
# Author:       Niels Mayer, HPLabs
# Created:      Fri Nov 24 19:47:38 1989
# Modified:     Sat Oct  5 23:13:01 1991 (Niels Mayer) mayer@hplnpm
# Language:     N/A
# Package:      N/A
# Status:       X11r5 contrib tape release
#
# WINTERP Copyright 1989-1991 Hewlett-Packard Company (by Niels Mayer).
# XLISP version 2.1, Copyright (c) 1989, by David Betz.
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of Hewlett-Packard and David Betz not be
# used in advertising or publicity pertaining to distribution of the software
# without specific, written prior permission.  Hewlett-Packard and David Betz
# make no representations about the suitability of this software for any
# purpose. It is provided "as is" without express or implied warranty.
#
# HEWLETT-PACKARD AND DAVID BETZ DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
# SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
# IN NO EVENT SHALL HEWLETT-PACKARD NOR DAVID BETZ BE LIABLE FOR ANY SPECIAL,
# INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
#
# See ./winterp/COPYRIGHT for information on contacting the authors.
#
# Please send modifications, improvements and bugfixes to mayer@hplabs.hp.com
# Post XLISP-specific questions/information to the newsgroup comp.lang.lisp.x
#
################################################################################

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

#
# Note on INCLUDES for Motif 1.0:
# ==============================
# Motif 1.0 does not use the standard X11r4 toolkit, therefore you must
# make sure that you are compiling Motif 1.0 programs with the headers
# associated with Motif 1.0, not the default headers that are used by
# X11r4 imake.
#
# Standard locations for Motif includes are /usr/include/X11 and
# /usr/include/Xm. Note that Motif 1.0 uses a variant of the X11r3 toolkit
# intrinsics headers which are installed in /usr/include/X11. Don't
# confuse these	with the incompatible Xtoolkit intrinsics from X11r4.
#
# IF YOUR INSTALLATION OF MOTIF PLACES THE INCLUDE FILES FOR MOTIF's Xt/Xm
# DIRECTORIES SOMEWHERE OTHER THAN cc's USUAL INCLUDE SEARCH PATH
# (normally -I/usr/include -I.), THEN YOU WILL HAVE TO SET 'INCLUDES' BELOW
# TO THE APPROPRIATE LOCATION.
#
# If you change INCLUDES below, you should also set INCLUDES in 
# ./xlisp/Imakefile.
#
# INCLUDES = -I/usr/include -I.

#
# Note on INCLUDES for Motif 1.1:
# ==============================
# Motif 1.1 uses the X11r4 Xlib, libXt, etc. Therefore imake should
# automatically point the compiler to the correct include file directory.
# Thus, leave imake's default TOP_INCLUDES alone, since that will point
# to the X11r4 headers.
# 
# Motif 1.1 is not included as part of the X11r4 distribution. 
# IF YOUR INSTALLATION OF MOTIF PLACES THE INCLUDE FILES FOR MOTIF's Xm
# DIRECTORIES SOMEWHERE OTHER THAN cc's USUAL INCLUDE SEARCH PATH
# (e.g. /usr/include/Xm), THEN YOU WILL HAVE TO SET 'STD_INCLUDES' BELOW
# TO THE APPROPRIATE LOCATION.
#
# If you change STD_INCLUDES below, you should also set STD_INCLUDES
# in ./xlisp/Imakefile. 
#			
# STD_INCLUDES = -I. -I/mnt0/src/OSFMotif1.1.1 -I/mnt0/src/OSFMotif1.1.1/X11

#
# Note on SYS_LIBRARIES:
#       "-lm" == libm.a:
#		This is required by XLISP since it includes math routines.
#
#	"-lXm" == libXm.a:
#		This library is part of OSF/Motif, it is not included with
#		X11r4. Many systems vendors sell Motif as part of their OS,
#		e.g. HP, IBM, DEC, MIPS, SCO, etc. If you haven't installed
#		Motif on your system, then replace -lXm below with
#		<path>/libXm.a
#
#	$(XTOOLLIB) == "-lXt" == libXt.a:
#		If you are using Motif 1.1, this should be the standard
#		X11r4 Xt Instrinsics library, with MIT patches 1-18, and any
#		additional patches distributed by OSF. If you are using X11r4
#		Imake, then use $(XTOOLLIB) and imake will do the right thing.
#		If you are using Motif 1.0, you must replace $(XTOOLLIB) with
#		-lXt or <path>/libXt.a -- make sure you are using the libXt.a
#		supplied with Motif 1.0. DO NOT USE libXt.a from X11r4 with
#		Motif 1.0 -- they are incompatible.
#
#	$(XLIB) == "-lX11" == libX11.a:
#		If you are using Motif 1.1, this is the standard X11r4
#		X11 library, or the X11 library supplied by your vendor.
#		If you are using X11r4 Imake, then use $(XLIB) and
#		imake will do the right thing.
#		For Motif 1.0, you should probably use the X11 library
#		supplied by your vendor (e.g. -lX), although the X11r4
#		libX11.a should work too.
#
#	"-lPW" == libPW.a:
#		This library is required by Motif's file selection box widget
#		on some brands of Unix, such as HPUX, MIPS, and other systems
#		that I am not familiar with. Note that this library may or
#		may not be required for other OS's. See	the Motif documentation
#		for your particular installation of Motif for details.
#
#	"-lmalloc" == libmalloc.a:
#		I've been using this fast malloc library on HPUX. When
#		used in conjuction with Motif, -lmalloc causes a tremendous
#		improvement in the overall application performance. Supposedly
#		for HPUX 8.0, the standard malloc will be faster, though...
#		I don't know whether something equivalent exists on other OS's,
#		therefore I'm leaving it out by default. This should allow WINTERP to
#		build on more systems -- those using OS's supporting -lmalloc may
#		want to include -lmalloc in SYS_LIBRARIES below.
#

#ifdef HPArchitecture

# SYS_LIBRARIES = /mnt0/src/OSFMotif1.1.1/lib/Xm/libXm.a $(XTOOLLIB) $(XLIB) -lPW -lm -lmalloc
 SYS_LIBRARIES = -lXm $(XTOOLLIB) $(XLIB) -lPW -lm -lmalloc

#else

 SYS_LIBRARIES = -lXm $(XTOOLLIB) $(XLIB) -lm

#endif


 SUBDIRS = xlisp

MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
MakeLintLibSubdirs($(SUBDIRS))


 SRCS =	utils.c \
	w_XmString.c \
	w_callbacks.c \
	w_classes.c \
	w_evnthndlr.c \
	w_funtab.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

 OBJS = utils.o \
	w_XmString.o \
	w_callbacks.o \
	w_classes.o \
	w_evnthndlr.o \
	w_funtab.o \
	w_libXm.o \
	w_libXt.o \
	w_pixmap.o \
	w_resources.o \
	w_savedobjs.o \
	w_timeouts.o \
	w_txlations.o \
	w_utils.o \
	wc_ArrowB.o \
	wc_BulletinB.o \
	wc_CascadeB.o \
	wc_Command.o \
	wc_DrawingA.o \
	wc_DrawnB.o \
	wc_FileSB.o \
	wc_Form.o \
	wc_Frame.o \
	wc_Label.o \
	wc_List.o \
	wc_MainW.o \
	wc_MessageB.o \
	wc_PanedW.o \
	wc_PushB.o \
	wc_RowColumn.o \
	wc_SHELL.o \
	wc_Scale.o \
	wc_ScrollBar.o \
	wc_ScrolledW.o \
	wc_SelectioB.o \
	wc_Separator.o \
	wc_Text.o \
	wc_ToggleB.o \
	wc_WIDGET.o \
	winterp.o 

#
# Note on DEFINES:
# (1) -DWINTERP: xlisp/xlisp.h and xlisp/xldmem.h (which are included by all
# WINTERP files) have '#ifdef WINTERP' surrounding changes made to XLISP
# for use by WINTERP: you MUST compile with -DWINTERP or nothing will work.
#
# (2) -D_NO_PROTO: this is required by Motif 1.1 if you are using a
# non-ANSI-C compiler. Eventually everybody will have an ANSI C compiler
# and at that point this flag should be removed.
#
# (3) -Dhpux is needed if you are running on HPUX 7.0.
#
# (4) -DMALLOC_0_RETURNS_NULL is needed on HPUX 7.0 when linking with
# the fast malloc library "-lmalloc".
#
# For HPUX 7.0, -Wc,-Np1000 is there to prevent the 'cc' error:
# 	"Parameter table overflow. Try the -Wc,-Np option."
# Get rid of this in HPUX 8.0 since the compiler is supposed to use
# dynamic tables.
# Note that the X11r4 Imake hp.cf specifies a smaller value of
# "-Wc,-Np" -- this setting overrides that value.
#

#ifdef SQNTArchitecture
 DEFINES = -DWINTERP -D_NO_PROTO -DTLI -W0,-Np1000
#else
#ifdef HPArchitecture
 DEFINES = -Dhpux -DWINTERP -DMALLOC_0_RETURNS_NULL -D_NO_PROTO -Wc,-Np1000
#else
 DEFINES = -DWINTERP -D_NO_PROTO
#endif
#endif

#
# xlisp/libXlisp.a is a library of routines from XLISP used by WINTERP
#
 LOCAL_LIBRARIES = xlisp/libXlisp.a

ComplexProgramTarget(winterp)
