/* 
 * Imakefile for xtechinfo
 *
 * $Author: brlewis $
 * $Id: Imakefile.x11r5,v 1.4 1995/03/28 19:20:18 brlewis Exp $
 *
 * Copyright 1994 by the Massachusetts Institute of Technology.
 * For copying and distribution information, see the file
 * "mit-copyright.h".
 */

#define WcTopDir /mit/wcl
#include "/mit/wcl/src/Wc.tmpl.r5"

WCLINSTALLTOP=$(WCTOPDIR)
WCLIBDIR=$(WCTOPDIR)/lib
LOCAL_LDFLAGS=-L../libti -L$(WCLIBDIR) -L/usr/athena/lib
LOCAL_XLIBRARIES=$(XMPLIB) $(XMLIB) $(WCLIB) $(XTOOLLIB) $(XLIB)
LOCAL_LIBRARIES=$(LOCAL_XLIBRARIES) -lti -lkrb -ldes -lcom_err -lhesiod

#ifdef UltrixArchitecture
DEFINES=-I../libti/include -I/mit/wcl/include -Dconst -UFUNCPROTO
#else
DEFINES=-I../libti/include -I/mit/wcl/include
#endif
#ifdef SGIArchitecture
CCOPTIONS=
EXTRA_LIBRARIES=
#endif

SRCS=xti.c xtifile.c xtimain.c xtiprov.c xtitext.c xtiview.c \
	MuSetEmacsBindings.c MuSetCursor.c
OBJS=xti.o xtifile.o xtimain.o xtiprov.o xtitext.o xtiview.o \
	MuSetEmacsBindings.o MuSetCursor.o

#ifndef SGIArchitecture
/* XXX comment out the following line before distributing */
all:: ptypes.h
#endif

ComplexProgramTarget(xtechinfo)

/* com_err error table */
depend:: xti.c xti.h
xti.o: xti.c
xti.c xti.h: xti.et
	$(RM) xti.c xti.h
	compile_et xti.et
clean::
	$(RM) xti.c xti.h

/**/# global.o and main.o need to know how big GlobalWidgets is.
/**/# comment.o needs to keep up with XTECHINFO_VERSION
global.o main.o comment.o: xtechinfo.h

/**/# mkptypes on Athena is in the watchmaker locker
ptypes.h: $(SRCS) Imakefile
	$(RM) ptypes.h~
	-mv ptypes.h ptypes.h~
	mkptypes ${SRCS} | sed "s/int NOARGS/void/g" > ptypes.h \
	|| ($(RM) ptypes.h; mv ptypes.h~ ptypes.h)

/* Redundancy below because sun cpp would add blank lines. */

#if defined(ultrix) || defined(sun)
xtechinfo_src:
	/**/#suppress 592	/* unused static */
	/**/#suppress 560	/* assignment within conditional */
	/**/#suppress 701	/* function redeclared */
	/**/#load ${DEFINES} -I/usr/athena/include ${SRCS}
	/**/#setopt program_name xtechinfo
	/**/#setenv XAPPLRESDIR /mit/techinfodev/src/xtechinfo/app-defaults
#else
xtechinfo_src:
	/**/#suppress 287
	/**/#suppress 349 in /lib/libc.a   /* _ctype_ redefined as text */
	/**/#load ${DEFINES} -I/usr/athena/include ${SRCS}
	/**/#setopt program_name xtechinfo
	/**/#setenv XAPPLRESDIR /mit/techinfodev/src/xtechinfo/app-defaults
#endif

saber_lib:
	/**/#load ${DEFINES} ${LOCAL_LDFLAGS} ${LOCAL_LIBRARIES}
