# This Imakefile is slightly tailored for just scity, however scity is
# equivalent to the xcbi program, the only difference is the name and 
# the installed setup files.
#
# Copyright 1990,1991 the Regents of the University of California.  All
# rights reserved.  Permission to use, copy, modify, and distribute this
# software and its documentation for any purpose and without fee is
# hereby granted, provided that this copyright notice appear in all
# copies.  See the file copyright.h for more information.
#

# XCBISETUPDIR is the default directory xcbi will look in for setup
# files.  The example files listed in SCITYSETUPFILES will be installed
# in XCBISETUPDIR by ``make install''
#
    XCBISETUPDIR = /u1/if1/new/city/newsetupfiles
 SCITYSETUPFILES = di.help di.setup di.xbm graphwalk.setup graphwalk.xbm list.procs \
                   osc.help osc.setup osc.xbm scity.setup scity.help scitytools.procs \
		   useful.procs view.xbm viewer.setup

# Imake indents the following line with a tab in the generated Makefile if
# the line begins with any white space.  This screws up most versions of
# make.  Imake does this to us because of the colon in the line ...
#
DEFINES = -DXCBISETUPPATH=\".:$(XCBISETUPDIR)\"

# If you already have John Ousterhout's TCL package installed, you might
# want to change these ...
# Note: tclsend and Xerror are not part of the standard TCL package (but
# were written by Ousterhout) so they are in the xcbi directory and not
# the tcl directory.
#
      DEPTCLLIB = tcl/tcl.a
         TCLLIB = $(DEPTCLLIB)
       INCLUDES = -Itcl -I$(OPENWINHOME)/include

# If you don't have vprintf in your standard library, uncomment the following
# lines.
#
#    VPRINTFSRCS = vprintf.c
#    VPRINTFOBJS = vprintf.o

LOCAL_LIBRARIES = XawClientLibs -lm $(TCLLIB) -L$(OPENWINHOME)/lib
        DEPLIBS = XawClientDepLibs $(DEPTCLLIB)

/*
 * If debugging then define DEBUG.  You almost certainly don't want to do
 * this.  Currently it only really works under SunOS in any case.
 */
#define DEBUG		/* Enable debugging code */

#ifdef DEBUG
    CDEBUGFLAGS = -g
#if SunOSPlatform
  SYS_LIBRARIES = /usr/lib/debug/malloc.o
#endif
#endif

           SRCS = ScTool.c Table.c create.c debug.c getresource.c \
		  setresource.c tclinterp.c util.c object.c xcbi.c \
		  $(VPRINTFSRCS)
           OBJS = ScTool.o Table.o create.o debug.o getresource.o \
		  setresource.o object.o tclinterp.o util.o xcbi.o \
		  $(VPRINTFOBJS)

           HDRS = ScTool.h ScToolP.h Table.h TableP.h copyright.h \
		  object.h debug.h global.h util.h xwrap.h patchlevel.h

ComplexProgramTarget(scity)

InstallAppDefaults(XCbi)

#if defined(DEBUG) && SunOSPlatform
SpecialObjectRule(debug.o, ,'-DMALLOCDEBUG')
#endif

tcl/tcl.a:
	@echo Making TCL package ...
	@(cd tcl; make CC="$(CC)")

clean::
	@echo Cleaning in TCL package
	@(cd tcl; make clean)

MakeDirectories(install, $(XCBISETUPDIR))
InstallMultipleFlags($(SCITYSETUPFILES), $(XCBISETUPDIR), $(INSTDATFLAGS))
#
# Private rules to keep track of printing versions and use etags instead
# of ctags
#
print:	Imakefile $(HDRS) $(SRCS)
	enscript -2rG $?
	touch print

TAGS:	$(HDRS) $(SRCS)
	etags -t *.h $(SRCS)
