/**/###########################################################################
/**/#                                                                         #
/**/#                         Attention xterm porters                         #
/**/#                                                                         #
/**/#                                                                         #
/**/# Xterm assumes that bcopy can handle overlapping arguments.  If your     #
/**/# bcopy (or memcpy) can't, write a routine called bcopy and link it in    #
/**/# or add -Dbcopy=mybcopy to the DEFINES list below.                       #
/**/#                                                                         #
/**/###########################################################################

#ifdef BandAidCompiler
#include BandAidCompiler
#endif

/*
 * add -DWTMP and -DLASTLOG if you want them; make sure that bcopy can
 * handle overlapping copies before using it.
 */
#ifdef SetTtyGroup			/* turn on in config/machine.cf */
   TTYGROUPDEF = -DUSE_TTY_GROUP
#endif

        DEFINES = -DHANZI -DNEW_HANZI		/* ygz@cs.purdue.edu */

   MAIN_DEFINES = -DUTMP -DWTMP -DLASTLOG $(TTYGROUPDEF)
   MISC_DEFINES = /* -DALLOWLOGFILEEXEC */

#ygz@cs.purdue.edu# split charproc.c into one more file: charVTparse.c
#ygz@cs.purdue.edu# add a new file for HZ: hzinput.c
#ygz@cs.purdue.edu# so add two entries to SRCS1, OBJS1.

          SRCS1 = button.c charproc.c cursor.c data.c input.c \
		  charVTparse.c hzinput.c \
		  main.c menu.c misc.c screen.c scrollbar.c tabs.c \
		  TekPrsTbl.c Tekproc.c util.c VTPrsTbl.c
          OBJS1 = main.o input.o charproc.o cursor.o util.o tabs.o \
		  charVTparse.o hzinput.o \
		  screen.o scrollbar.o button.o Tekproc.o misc.o \
		  VTPrsTbl.o TekPrsTbl.o data.o menu.o
          SRCS2 = cxresize.c		/* ygz@cs.purdue.edu */
          OBJS2 = cxresize.o		/* ygz@cs.purdue.edu */
          SRCS3 = tit2cit.c		/* ygz@cs.purdue.edu */
          OBJS3 = tit2cit.o		/* ygz@cs.purdue.edu */
          SRCS4 = cit2tit.c		/* ygz@cs.purdue.edu */
          OBJS4 = cit2tit.o		/* ygz@cs.purdue.edu */
           SRCS = $(SRCS1) $(SRCS2) $(SRCS3) $(SRCS4)
           OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4)
       PROGRAMS = cit2tit cxresize cxterm tit2cit	/* ygz@cs.purdue.edu */
       DEPLIBS1 = XawClientDepLibs
       DEPLIBS2 = 
       PROGRAMS = cxterm cxresize tit2cit cit2tit	/* ygz@cs.purdue.edu */

#ifndef TermcapLibrary
#if SystemV && !defined(MacIIArchitecture)
#ifdef CrayArchitecture
#define TermcapLibrary -lcurses		/* special case of system v */
#else
#define TermcapLibrary -ltermlib	/* usually in here */
#endif
#else
#define TermcapLibrary -ltermcap	/* bsd puts it here */
#endif
#endif

     TERMCAPLIB = TermcapLibrary

AllTarget($(PROGRAMS))

SpecialObjectRule(main.o, ,$(MAIN_DEFINES))
SpecialObjectRule(misc.o, ,$(MISC_DEFINES))
SpecialObjectRule(charproc.o, ,$(MISC_DEFINES))

NormalProgramTarget(cxterm,$(OBJS1),$(DEPLIBS1),XawClientLibs,$(TERMCAPLIB) $(PTYLIB))
InstallProgramWithFlags(cxterm, $(BINDIR), $(INSTUIDFLAGS))

NormalProgramTarget(cxresize,$(OBJS2),$(DEPLIBS2), ,$(TERMCAPLIB))
InstallProgramWithFlags(cxresize, $(BINDIR), )

NormalProgramTarget(tit2cit,$(OBJS3), , , )
InstallProgramWithFlags(tit2cit, $(BINDIR), )

NormalProgramTarget(cit2tit,$(OBJS4), , , )
InstallProgramWithFlags(cit2tit, $(BINDIR), )

NormalLintTarget($(SRCS))

InstallManPage(cxresize,$(MANDIR))
InstallManPage(cxterm,$(MANDIR))
InstallManPage(tit2cit,$(MANDIR))

DependTarget()

#define IHaveSubdirs
#define PassCDebugFlags /* as nothing */

SUBDIRS = Dict

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