# Makefile generated by imake - do not edit!
# $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $

# -------------------------------------------------------------------------
# Makefile generated from "Imake.tmpl" and </tmp/IIf.002220>
# $XConsortium: Imake.tmpl,v 1.139 91/09/16 08:52:48 rws Exp $
#
# Platform-specific parameters may be set in the appropriate <vendor>.cf
# configuration files.  Site-specific parameters should be set in the file
# site.def.  Full rebuilds are recommended if any parameters are changed.
#
# If your C preprocessor does not define any unique symbols, you will need
# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
# "make World" the first time).
#

# -------------------------------------------------------------------------
# site-specific configuration parameters that need to come before
# the platform-specific parameters - edit site.def to change

# site:  $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $

# -------------------------------------------------------------------------
# platform-specific configuration parameters - edit ibm.cf to change

# platform:  $XConsortium: ibm.cf,v 1.29 91/07/28 22:39:58 rws Exp $

# operating system:  	AOS 4.3

            PCC = pcc

# -------------------------------------------------------------------------
# site-specific configuration parameters that go after
# the platform-specific parameters - edit site.def to change

# site:  $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $

            SHELL = 	/bin/sh

              TOP = .
      CURRENT_DIR = .

               AR = ar clq
  BOOTSTRAPCFLAGS = -Dibm
               CC = hc
               AS = as

         COMPRESS = compress
              CPP = /lib/cpp $(STD_CPP_DEFINES)
    PREPROCESSCMD = hc -E $(STD_CPP_DEFINES)
          INSTALL = install
               LD = ld
             LINT = lint
      LINTLIBFLAG = -C
         LINTOPTS = -ax -Dibm -DHCVERSION=21025
               LN = ln -s
             MAKE = make
               MV = mv
               CP = cp

           RANLIB = ranlib
  RANLIBINSTFLAGS =

               RM = rm -f
            TROFF = psroff
         MSMACROS = -ms
              TBL = tbl
              EQN = eqn
     STD_INCLUDES =
  STD_CPP_DEFINES = -Dibm -DHCVERSION=21025
      STD_DEFINES = -Dibm -DHCVERSION=21025
 EXTRA_LOAD_FLAGS =  -Z
  EXTRA_LIBRARIES =
             TAGS = ctags

   SIGNAL_DEFINES = -DSIGNALRETURNSINT

    PROTO_DEFINES =

     INSTPGMFLAGS =

     INSTBINFLAGS = -m 0755
     INSTUIDFLAGS = -m 4755
     INSTLIBFLAGS = -m 0644
     INSTINCFLAGS = -m 0444
     INSTMANFLAGS = -m 0444
     INSTDATFLAGS = -m 0444
    INSTKMEMFLAGS = -m 4755

      PROJECTROOT = /mit/x11/rt

     TOP_INCLUDES = -I$(INCROOT)

      CDEBUGFLAGS = -O
        CCOPTIONS =

      ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES)
           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)

           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)

        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -L$(USRLIBDIR)

   LDCOMBINEFLAGS = -X -r
      DEPENDFLAGS =

        MACROFILE = ibm.cf
           RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut

    IMAKE_DEFINES =

         IRULESRC = $(CONFIGDIR)
        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)

     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
			$(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
			$(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)

# -------------------------------------------------------------------------
# X Window System Build Parameters
# $XConsortium: Project.tmpl,v 1.138 91/09/10 09:02:12 rws Exp $

# -------------------------------------------------------------------------
# X Window System make variables; this need to be coordinated with rules

          PATHSEP = /
        USRLIBDIR = /mit/x11/rt/lib
         SHAREDIR = /mit/x11/lib
           BINDIR = /mit/sipb/$(MACHINE)bin
          INCROOT = /mit/x11/include
     BUILDINCROOT = $(TOP)
      BUILDINCDIR = $(BUILDINCROOT)/X11
      BUILDINCTOP = ..
           INCDIR = $(INCROOT)/X11
           ADMDIR = /usr/adm
           LIBDIR = $(USRLIBDIR)/X11
        CONFIGDIR = /afs/sipb.mit.edu/project/sipbsrc/src/X11r5-config
       LINTLIBDIR = $(USRLIBDIR)/lint

          FONTDIR = $(LIBDIR)/fonts
         XINITDIR = $(LIBDIR)/xinit
           XDMDIR = $(LIBDIR)/xdm
           TWMDIR = /mit/x11/lib/twm
          MANPATH = /mit/sipb/man
    MANSOURCEPATH = $(MANPATH)/man
        MANSUFFIX = n
     LIBMANSUFFIX = 3
           MANDIR = $(MANSOURCEPATH)$(MANSUFFIX)
        LIBMANDIR = $(MANSOURCEPATH)$(LIBMANSUFFIX)
           NLSDIR = $(LIBDIR)/nls
        PEXAPIDIR = $(LIBDIR)/PEX
      XAPPLOADDIR = /mit/sipb/lib/app-defaults
       FONTCFLAGS = -t

     INSTAPPFLAGS = $(INSTDATFLAGS)

            IMAKE = imake
           DEPEND = makedepend
              RGB = rgb

            FONTC = bdftopcf

        MKFONTDIR = mkfontdir
        MKDIRHIER = 	/bin/sh $(BINDIR)/mkdirhier

        CONFIGSRC = $(TOP)/config
       DOCUTILSRC = $(TOP)/doc/util
        CLIENTSRC = $(TOP)/clients
          DEMOSRC = $(TOP)/demos
           LIBSRC = $(TOP)/lib
          FONTSRC = $(TOP)/fonts
       INCLUDESRC = $(TOP)/X11
        SERVERSRC = $(TOP)/server
          UTILSRC = $(TOP)/util
        SCRIPTSRC = $(UTILSRC)/scripts
       EXAMPLESRC = $(TOP)/examples
       CONTRIBSRC = $(TOP)/../contrib
           DOCSRC = $(TOP)/doc
           RGBSRC = $(TOP)/rgb
        DEPENDSRC = $(UTILSRC)/makedepend
         IMAKESRC = $(CONFIGSRC)
         XAUTHSRC = $(LIBSRC)/Xau
          XLIBSRC = $(LIBSRC)/X
           XMUSRC = $(LIBSRC)/Xmu
       TOOLKITSRC = $(LIBSRC)/Xt
       AWIDGETSRC = $(LIBSRC)/Xaw
       OLDXLIBSRC = $(LIBSRC)/oldX
      XDMCPLIBSRC = $(LIBSRC)/Xdmcp
      BDFTOSNFSRC = $(FONTSRC)/bdftosnf
      BDFTOSNFSRC = $(FONTSRC)/clients/bdftosnf
      BDFTOPCFSRC = $(FONTSRC)/clients/bdftopcf
     MKFONTDIRSRC = $(FONTSRC)/clients/mkfontdir
         FSLIBSRC = $(FONTSRC)/lib/fs
    FONTSERVERSRC = $(FONTSRC)/server
     EXTENSIONSRC = $(TOP)/extensions
         XILIBSRC = $(EXTENSIONSRC)/lib/xinput
      PHIGSLIBSRC = $(EXTENSIONSRC)/lib/PEX

  DEPEXTENSIONLIB =  $(USRLIBDIR)/libXext.a
     EXTENSIONLIB = 			  -lXext

          DEPXLIB = $(DEPEXTENSIONLIB)  $(USRLIBDIR)/libX11.a
             XLIB = $(EXTENSIONLIB) 			  -lX11

      DEPXAUTHLIB =  $(USRLIBDIR)/libXau.a
         XAUTHLIB = 			  -lXau
      DEPXDMCPLIB =  $(USRLIBDIR)/libXdmcp.a
         XDMCPLIB = 			  -lXdmcp

        DEPXMULIB =  $(USRLIBDIR)/libXmu.a
           XMULIB = 			  -lXmu

       DEPOLDXLIB =  $(USRLIBDIR)/liboldX.a
          OLDXLIB = 			  -loldX

      DEPXTOOLLIB =  $(USRLIBDIR)/libXt.a
         XTOOLLIB = 			  -lXt

        DEPXAWLIB =  $(USRLIBDIR)/libXaw.a
           XAWLIB = 			  -lXaw

        DEPXILIB =  $(USRLIBDIR)/libXi.a
           XILIB = 			  -lXi

        DEPPHIGSLIB =  $(USRLIBDIR)/libphigs.a
           PHIGSLIB = 			  -lphigs

       DEPXBSDLIB =  $(USRLIBDIR)/libXbsd.a
          XBSDLIB = 			  -lXbsd

 LINTEXTENSIONLIB =  $(LINTLIBDIR)/llib-lXext.ln
         LINTXLIB =  $(LINTLIBDIR)/llib-lX11.ln
          LINTXMU =  $(LINTLIBDIR)/llib-lXmu.ln
        LINTXTOOL =  $(LINTLIBDIR)/llib-lXt.ln
          LINTXAW =  $(LINTLIBDIR)/llib-lXaw.ln
           LINTXI =  $(LINTLIBDIR)/llib-lXi.ln
        LINTPHIGS =  $(LINTLIBDIR)/llib-lphigs.ln

          DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)

         DEPLIBS1 = $(DEPLIBS)
         DEPLIBS2 = $(DEPLIBS)
         DEPLIBS3 = $(DEPLIBS)

# -------------------------------------------------------------------------
# Imake rules for building libraries, programs, scripts, and data files
# rules:  $XConsortium: Imake.rules,v 1.124 91/11/17 16:57:39 rws Exp $

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

#
#	Imakefile for xkal - X appointment calendar
#
#	George Ferguson, ferguson@cs.rochester.edu, 15 Oct 1990.
#	Version 1.1 - 27 Feb 1991.
#
#	$Id: Imakefile,v 1.2 91/12/20 12:04:16 jik Exp $
#

#
# Here's what to change to customize the installation...
#
# Where do you want this stuff? Uncomment these to change the destinations
# of "make install" and "make install.man" if the defaults are not
# satisfactory.
#
#BINDIR = /u/ferguson/bin
KALLIBDIR = /mit/sipb/lib
#MANDIR = /u/ferguson/man/man1
##undef n
##define n		 1

#
# Where is the ezMenu package?
#
EZMENU_DIR =		../EzMenu
EZMENU_INCLUDES =	-I$(EZMENU_DIR)
EZMENU_LIBRARIES =	-L$(EZMENU_DIR) -lezMenu$(TARGET_MACH)

#
# Where is the app-defaults to C converter?
# Only needed if you change the app-defaults file Xkal.ad and want the changes
# compiled into the program. If you do not have ad2c you should remove the
# extra clean target for Xkal.ad.h below. If you lose Xkal.ad.h and can not
# remake it, create it to be a line containing NULL (i.e. those four
# characters) only.
#
AD2C = ../Ad2c/ad2c

#
# Do you want to use popup alert boxes (can you compile them)? If not,
# comment out these definitions and error messages will go to stderr.
#
ALERTC = alert.c
ALERTO = alert.o
ALERTDEFS = -DUSE_ALERT

#
# Is dysize(3) in your standard library? If not, you need these definitions.
# It appears that Ultrix and maybe SGI systems need this for sure.
#
DYSIZEC = dysize.c
DYSIZEO = dysize.o

#
# Is strcasecmp(3) in your standard library? If not, you need these
# definitions. It appears that at least Sun 386i systems need this for sure.
#
#STRCASECMPC = strcasecmp.c
#STRCASECMPO = strcasecmp.o

#
# Do you want to try to get rid of the "cannot convert string NULL to widget"
# message? If so, leave these uncommmented to use the hacked error
# message printer. If you get linker errors (multiply defined symbols, etc)
# then you are stuck with the message and should comment these out.
#
#STRINGCONVERTC = string-convert.c
#STRINGCONVERTO = string-convert.o

#
# This is -g for debugging or -O for optimization (or nothing).
#

#	#	#	#	#	#	#	#	#	#
# Nothing to change below here
#

PROGRAMS	=	xkal xkal2xremind xkal2pcal
DEFINES		=	-DXAPPLOADDIR=\"$(XAPPLOADDIR)\" $(ALERTDEFS)
EXTRA_INCLUDES  =	$(EZMENU_INCLUDES)
LOCAL_LIBRARIES =	$(EZMENU_LIBRARIES) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)

#
# These definitions are for xkal itself
#
SRCS1 = xkal.c month.c day.c edit.c edit-defaults.c db.c \
	util.c date-strings.c resources.c \
	$(STRINGCONVERTC) $(ALERTC) $(DYSIZEC) $(STRCASECMPC)
OBJS1 = xkal.o month.o day.o edit.o edit-defaults.o db.o \
	util.o date-strings.o resources.o \
	$(STRINGCONVERTO) $(ALERTO) $(DYSIZEO) $(STRCASECMPO)

            OBJS = $(OBJS1) $(OBJS2) $(OBJS3)
            SRCS = $(SRCS1) $(SRCS2) $(SRCS3)

all:: $(PROGRAMS)

xkal: $(OBJS1) $(DEPLIBS1)
	 $(RM) $@
	$(CC) -o $@ $(LDOPTIONS) $(OBJS1) $(LOCAL_LIBRARIES) $(LDLIBS)  $(EXTRA_LOAD_FLAGS)

install:: xkal
	 @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \
		else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi
	$(INSTALL) -c $(INSTPGMFLAGS)  xkal $(DESTDIR)$(BINDIR)

install.man:: xkal.man
	 @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \
		else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi
	$(INSTALL) -c $(INSTMANFLAGS) xkal.man $(DESTDIR)$(MANDIR)/xkal.$(MANSUFFIX)

depend::
	$(DEPEND) $(DEPENDFLAGS) -s "# DO NOT DELETE" -- $(ALLDEFINES) -- $(SRCS)

lint:
	$(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS)
lint1:
	$(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS)

clean::
	$(RM) $(PROGRAMS)

install:: Xkal.ad
	 @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then set +x; \
		else (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); fi
	$(INSTALL) -c $(INSTAPPFLAGS) Xkal.ad $(DESTDIR)$(XAPPLOADDIR)/Xkal

install:: xkal.appoints
	$(INSTALL) -c $(INSTDATFLAGS) xkal.appoints $(DESTDIR)$(KALLIBDIR)

#
# These definitions are for xkal2xremind
#
OBJS2 = xkal2xremind.o resources.o db.o util.o date-strings.o \
	$(STRCASECMPO) $(DYSIZEO)
SRCS2 = xkal2xremind.c resources.c db.c util.c date-strings.c \
	$(STRCASECMPC) $(DYSIZEC)

xkal2xremind: $(OBJS2) $(DEPLIBS2)
	 $(RM) $@
	$(CC) -o $@ $(LDOPTIONS) $(OBJS2) $(XTOOLLIB) $(XLIB) $(LDLIBS)  $(EXTRA_LOAD_FLAGS)

install:: xkal2xremind
	 @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \
		else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi
	$(INSTALL) -c $(INSTPGMFLAGS)  xkal2xremind $(DESTDIR)$(BINDIR)

install.man:: xkal2xremind.man
	 @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \
		else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi
	$(INSTALL) -c $(INSTMANFLAGS) xkal2xremind.man $(DESTDIR)$(MANDIR)/xkal2xremind.$(MANSUFFIX)

#
# These definitions are for xkal2pcal
#
OBJS3 = xkal2pcal.o resources.o db.o util.o date-strings.o \
	$(STRCASECMPO) $(DYSIZEO)
SRCS3 = xkal2pcal.c resources.c db.c util.c date-strings.c \
	$(STRCASECMPC) $(DYSIZEC)

xkal2pcal: $(OBJS3) $(DEPLIBS3)
	 $(RM) $@
	$(CC) -o $@ $(LDOPTIONS) $(OBJS3) $(XTOOLLIB) $(XLIB) $(LDLIBS)  $(EXTRA_LOAD_FLAGS)

install:: xkal2pcal
	 @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \
		else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi
	$(INSTALL) -c $(INSTPGMFLAGS)  xkal2pcal $(DESTDIR)$(BINDIR)

install.man:: xkal2pcal.man
	 @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \
		else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi
	$(INSTALL) -c $(INSTMANFLAGS) xkal2pcal.man $(DESTDIR)$(MANDIR)/xkal2pcal.$(MANSUFFIX)

#
# These install the xkal-mail and xkal-automail scripts. Can't use
# "InstallScript" since it uses INSTPGMFLAGS which might include "-s".
#
install::
	$(INSTALL) -c xkal-mail $(BINDIR)
	$(INSTALL) -c xkal-automail $(BINDIR)

install.man:: xkal-mail.man
	 @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \
		else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi
	$(INSTALL) -c $(INSTMANFLAGS) xkal-mail.man $(DESTDIR)$(MANDIR)/xkal-mail.$(MANSUFFIX)

install.man:: xkal-automail.man
	 @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \
		else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi
	$(INSTALL) -c $(INSTMANFLAGS) xkal-automail.man $(DESTDIR)$(MANDIR)/xkal-automail.$(MANSUFFIX)

#
#	Generate C code for fallback resources
#
Xkal.ad.h: Xkal.ad
	$(AD2C) Xkal.ad >Xkal.ad.h

clean::
	$(RM) Xkal.ad.h

#
#	Miscellaneous other rules:
#
ci:
	ci -u *.c *.h Xkal.ad xkal.man xkal.appoints Imakefile

tar:
	tar cvf - \
		README Imakefile Makefile Xkal.ad \
		alert.c alert.h app-resources.h date-strings.c date-strings.h \
		day.c day.h db.c db.h dysize.c edit-defaults.c edit-defaults.h \
		edit.c edit.h month.c month.h patchlevel.h \
		resources.c resources.h \
		strcasecmp.c string-convert.c util.c util.h \
		xkal-automail xkal-automail.man	xkal-mail xkal-mail.man \
		xkal.appoints xkal.c xkal.h xkal.man \
		xkal2pcal.c xkal2pcal.man xkal2xremind.c xkal2xremind.man | \
	    compress >xkal.tar.Z

install:: install.man

# -------------------------------------------------------------------------
# common rules for all Makefiles - do not edit

emptyrule::

clean::
	$(RM_CMD) "#"*

Makefile::
	-@if [ -f Makefile ]; then set -x; \
		$(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
	else exit 0; fi
	$(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)

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

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

install::
	@echo "install in $(CURRENT_DIR) done"

install.man::
	@echo "install.man in $(CURRENT_DIR) done"

Makefiles::

includes::

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

