# Makefile generated by imake - do not edit!
# $XConsortium: imake.c,v 1.37 88/10/08 20:08:30 jim Exp $
#
# The cpp used on this machine replaces all newlines and multiple tabs and
# spaces in a macro expansion with a single space.  Imake tries to compensate
# for this, but is not always successful.
#

###########################################################################
# X Window System Makefile generated from template file Imake.tmpl
# $XConsortium: Imake.tmpl,v 1.91 88/10/23 22:37:10 jim Exp $
#
# Do not change the body of the imake template file.  Server-specific
# parameters may be set in the appropriate .macros file; site-specific
# parameters (but shared by all servers) may be set in site.def.  If you
# make any changes, you'll need to rebuild the makefiles using
# "make World" (at best) or "make Makefile; make Makefiles" (at least) in
# the top level directory.
#
# If your C preprocessor doesn't define any unique symbols, you'll need
# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
# "make Makefile", "make Makefiles", or "make World").
#
# If you absolutely can't get imake to work, you'll need to set the
# variables at the top of each Makefile as well as the dependencies at the
# bottom (makedepend will do this automatically).
#

###########################################################################
# platform-specific configuration parameters - edit Sun.macros to change

# platform:  $XConsortium: Sun.macros,v 1.52 88/10/23 11:00:55 jim Exp $
# operating system:  SunOS 4.0

BOOTSTRAPCFLAGS =
             AS = as
             CC = cc
            CPP = /lib/cpp
             LD = ld
           LINT = lint
        INSTALL = install
           TAGS = ctags
             RM = rm -f
             MV = mv
             LN = ln -s
         RANLIB = ranlib
RANLIBINSTFLAGS = -t
             AR = ar clq
             LS = ls
       LINTOPTS = -axz
    LINTLIBFLAG = -C
           MAKE = make
STD_CPP_DEFINES =
    STD_DEFINES =

###########################################################################
# site-specific configuration parameters - edit site.def to change

# site:  $XConsortium: site.def,v 1.16 88/10/12 10:30:24 jim Exp $

###########################################################################
# definitions common to all Makefiles - do not edit

          SHELL = /bin/sh

        DESTDIR =
      USRLIBDIR = $(DESTDIR)/usr/lib
         BINDIR = $(DESTDIR)/tmp/bin
         INCDIR = $(DESTDIR)/usr/include/X11
         ADMDIR = $(DESTDIR)/usr/adm
         LIBDIR = $(USRLIBDIR)/X11
     LINTLIBDIR = $(USRLIBDIR)/lint
        FONTDIR = /usr1/zengyu/fonts/snf
       XINITDIR = $(LIBDIR)/xinit
         XDMDIR = $(LIBDIR)/xdm
         UWMDIR = $(LIBDIR)/uwm
         AWMDIR = $(LIBDIR)/awm
         TWMDIR = $(LIBDIR)/twm
        MANPATH = $(DESTDIR)/usr/local/man
  MANSOURCEPATH = $(MANPATH)/man
         MANDIR = $(MANSOURCEPATH)1
      LIBMANDIR = $(MANSOURCEPATH)3
    XAPPLOADDIR = $(LIBDIR)/app-defaults

   INSTBINFLAGS = -m 0755
   INSTUIDFLAGS = -m 4755
   INSTLIBFLAGS = -m 0664
   INSTINCFLAGS = -m 0444
   INSTMANFLAGS = -m 0444
   INSTAPPFLAGS = -m 0444
  INSTKMEMFLAGS = -m 4755
        FCFLAGS = -p4
    CDEBUGFLAGS = -O

        PATHSEP = /
         DEPEND = $(DEPENDSRC)/makedepend
          IMAKE = $(IMAKESRC)/imake
            RGB = $(RGBSRC)/rgb
             FC = $(BDFTOSNFSRC)/bdftosnf
      MKFONTDIR = $(MKFONTDIRSRC)/mkfontdir
      MKDIRHIER = $(SCRIPTSSRC)/mkdirhier.sh

         CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(STD_DEFINES) $(DEFINES)
      LINTFLAGS = $(LINTOPTS) $(INCLUDES) $(STD_DEFINES) $(DEFINES) -DLINT
        LDFLAGS = $(CDEBUGFLAGS) $(SYS_LIBRARIES) $(SYSAUX_LIBRARIES)
            TOP = $(TOPDIR)
      CLIENTSRC = $(TOP)/clients
        DEMOSRC = $(TOP)/demos
         LIBSRC = $(TOP)/lib
        FONTSRC = /usr1/zengyu/fonts
     INCLUDESRC = $(TOP)/X11
      SERVERSRC = $(TOP)/server
        UTILSRC = $(TOP)/util
     SCRIPTSSRC = $(UTILSRC)/scripts
     EXAMPLESRC = $(TOP)/examples
     CONTRIBSRC = $(TOP)/contrib
         DOCSRC = $(TOP)/doc
         RGBSRC = $(TOP)/rgb
      DEPENDSRC = $(UTILSRC)/makedepend
       IMAKESRC = $(UTILSRC)/imake
       IRULESRC = $(UTILSRC)/imake.includes
        XLIBSRC = $(LIBSRC)
         XMUSRC = $(LIBSRC)
     TOOLKITSRC = $(LIBSRC)
     AWIDGETSRC = $(LIBSRC)
     OLDXLIBSRC = $(LIBSRC)/oldX
    BDFTOSNFSRC = $(FONTSRC)/r3bdftosnf
   MKFONTDIRSRC = $(FONTSRC)/r3mkfndir
   EXTENSIONSRC = $(TOP)/extensions
   EXTENSIONLIB = $(EXTENSIONSRC)/lib/libXext.a
	 XMLLIB = ./libXML.a
           XLIB = $(XLIBSRC)/libX11.a-
         XMULIB = $(XMUSRC)/libXmu.a
        OLDXLIB = $(OLDXLIBSRC)/liboldX.a
       XTOOLLIB = $(TOOLKITSRC)/libXt.a
          XWLIB = $(XLIBSRC)/libXw.a
         XAWLIB = $(AWIDGETSRC)/libXaw.a
       LINTXLIB = $(XLIBSRC)/llib-lX11.ln
        LINTXMU = $(XMUSRC)/llib-lXmu.ln
      LINTXTOOL = $(TOOLKITSRC)/llib-lXt.ln
        LINTXAW = $(AWIDGETSRC)/llib-lXaw.ln
       INCLUDES = -I$(TOP)
      MACROFILE = Sun.macros
   ICONFIGFILES = $(IRULESRC)/Imake.tmpl \
			$(IRULESRC)/$(MACROFILE) $(IRULESRC)/site.def
  IMAKE_DEFINES =
      IMAKE_CMD = $(NEWTOP)$(IMAKE) -TImake.tmpl -I$(NEWTOP)$(IRULESRC) \
			-s Makefile $(IMAKE_DEFINES)
         RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a \
			.emacs_* tags TAGS make.log MakeOut

###########################################################################
# rules:  $XConsortium: Imake.rules,v 1.71 88/10/23 22:46:34 jim Exp $

###########################################################################
# start of Imakefile

###########################################################################
#                                                                         #
#		   IMakefile for Multi-Llingual X Window Package	      #
#									      #
#                       Attention Mlxterm porters                         #
#                                                                         #
#                                                                         #
# Xterm assumes that bcopy can handle overlapping arguments.  If your     #
# bcopy (or memcpy) can't, write a routine called Bcopy that can and      #
# the -DBcopy argument from the DEFINES list given below.  If possible,   #
# try to avoid extra procedure calls as this routine is used a lot.       #
#                                                                         #
###########################################################################

	DEFINES = -DHANZI -DMODEMENU -DUTMP -DBcopy=bcopy
        SRCS1 = button.c charproc.c cursor.c data.c input.c \
		  main.c menu.c misc.c screen.c scrollbar.c tabs.c \
		  TekPrsTbl.c Tekproc.c util.c VTPrsTbl.c haninit.c
        OBJS1 = main.o input.o charproc.o cursor.o util.o tabs.o \
		  screen.o scrollbar.o button.o Tekproc.o misc.o \
		  VTPrsTbl.o TekPrsTbl.o data.o menu.o haninit.o mlcalls.o

        SRCS2 = resize.c
        OBJS2 = resize.o

        SRCS3 = looktbl.c display.c mlinput.c chuyin.c
       	OBJS3 = looktbl.o display.o mlinput.o chuyin.o

	SRCS4 = windowtest.c
	OBJS4 = windowtest.o

	SRCS5 = xtermtest.c
	OBJS5 = xtermtest.o

	SRCS6 = xfd.c wsimple.c
	OBJS6 = xfd.o wsimple.o

	SRCS7 = parse.y scan.l output.c dialog.c xfed.c
	OBJS7 = parse.o scan.o output.o dialog.o xfed.o

	SRCS8 = Csong16.bdf Csong24.bdf Txian16.bdf Jming16.bdf Jsong24.bdf
	OBJS8 = Csong16.snf Csong24.snf Txian16.snf Jming16.snf Jsong24.snf

SYS_LIBRARIES = -ll

Mllocallibs = $(XAWLIB) $(XMULIB) $(XTOOLLIB)

PROGRAMS = mlxterm resize input sample sample0 xfd xfed mlfonts

all:: $(PROGRAMS)

mlxterm: $(OBJS1) $(Mllocallibs)
	$(RM) $@

	$(CC) -o $@ $(OBJS1) $(Mllocallibs) -lX11 -ltermcap  $(SYSLAST_LIBRARIES)

relink::
	$(RM) mlxterm
	$(MAKE) $(MFLAGES) mlxterm

clean::
	$(RM) mlxterm

resize: $(OBJS2)
	$(RM) $@
	$(CC) -o $@ $(OBJS2)  $(LDFLAGS) -lc -ltermcap $(SYSLAST_LIBRARIES)

relink::
	$(RM) resize
	$(MAKE) $(MFLAGS) resize

clean::
	$(RM) resize

libXML.a: mlcalls.o
	$(RM) $@
	$(AR) $@ mlcalls.o
	$(RANLIB) $@

input: $(OBJS3) $(XWLIB) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
	$(RM) $@
	$(CC) -o $@ $(OBJS3) $(XWLIB) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) $(LDFLAGS)  $(SYSLAST_LIBRARIES)

relink::
	$(RM) input
	$(MAKE) $(MFLAGS) input

clean::
	$(RM) input

sample: $(OBJS4) $(XMLLIB) $(XWLIB) $(XAWLIB) $(XTOOLLIB) $(XLIB)
	$(RM) $@
	$(CC) -o $@ $(OBJS4) $(XMLLIB) $(XWLIB) $(XAWLIB) $(XTOOLLIB) $(XLIB) $(LDFLAGS)  $(SYSLAST_LIBRARIES)

relink::
	$(RM) sample
	$(MAKE) $(MFLAGS) sample

clean::
	$(RM) sample

sample0: $(OBJS5)
	$(RM) $@
	$(CC) -o $@ $(OBJS5)  $(LDFLAGS)  $(SYSLAST_LIBRARIES)

relink::
	$(RM) sample0
	$(MAKE) $(MFLAGS) sample0

clean::
	$(RM) sample0

xfd: $(OBJS6) $(XLIB)
	$(RM) $@
	$(CC) -o $@ $(OBJS6) $(XLIB) $(LDFLAGS)  $(SYSLAST_LIBRARIES)

relink::
	$(RM) xfd
	$(MAKE) $(MFLAGS) xfd

clean::
	$(RM) xfd

xfed: $(OBJS7) $(XLIB)
	$(RM) $@
	$(CC) -o $@ $(OBJS7) $(XLIB) $(LDFLAGS)  $(SYSLAST_LIBRARIES)

relink::
	$(RM) xfed
	$(MAKE) $(MFLAGS) xfed

clean::
	$(RM) xfed

scan.o:		y.tab.h defs.h scan.l
		lex scan.l
		$(CC) $(CFLAGS) -c lex.yy.c
		mv lex.yy.o scan.o

y.tab.h:	parse.y

y.tab.c:	parse.y
		yacc -d parse.y

parse.o:	defs.h y.tab.c
		$(CC) $(CFLAGS) -c y.tab.c
		mv y.tab.o parse.o

main.o:		defs.h

output.o:	defs.h

FONTINSTDIR = $(FONTDIR)/misc

mlfonts::$(OBJS8) fonts.dir

Csong16.snf: Csong16.bdf
	$(FC) $(FCFLAGS) $? >$@

Csong24.snf: Csong24.bdf
	$(FC) $(FCFLAGS) $? >$@

Txian16.snf: Txian16.bdf
	$(FC) $(FCFLAGS) $? >$@

Jming16.snf: Jming16.bdf
	$(FC) $(FCFLAGS) $? >$@

Jsong24.snf: Jsong24.bdf
	$(FC) $(FCFLAGS) $? >$@

fonts.dir: $(OBJS8)
	@case '${MFLAGS}' in *[i]) set +e;; esac;\
	for i in $(OBJS8); do\
		(set -x; $(INSTALL) -c $(INSTALLFLAGS) $$i $(FONTINSTDIR));\
	done
	$(MKFONTDIR) $(FONTINSTDIR)

clean::
	$(RM) *.snf font.dir

###########################################################################
# Imake.tmpl common rules for all Makefiles - do not edit

emptyrule::

clean::
	$(RM_CMD) \#*

Makefile:: $(IMAKE)

Makefile:: Imakefile \
	$(IRULESRC)/Imake.tmpl \
	$(IRULESRC)/Imake.rules \
	$(IRULESRC)/site.def \
	$(IRULESRC)/$(MACROFILE)
	-@if [ -f Makefile ]; then \
	echo "$(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
	$(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
	else exit 0; fi
	$(IMAKE_CMD) -DTOPDIR=$(TOP)

$(IMAKE):
	@echo "making $@"; \
	cd $(IMAKESRC); $(MAKE) BOOTSTRAPCFLAGS=$(BOOTSTRAPCFLAGS)

tags::
	$(TAGS) -w *.[ch]
	$(TAGS) -xw *.[ch] > TAGS

###########################################################################
# empty rules for directories that do not have SUBDIRS - do not edit

install::
	@echo "install done"

install.man::
	@echo "install.man done"

Makefiles::

###########################################################################
# dependencies generated by makedepend

