#
# $Header: /wrld/mnt11/ricks/src/X/xrn/RCS/Imakefile,v 1.14 91/12/04 11:32:55 ricks Exp $
#
# xrn - an X-based NNTP news reader
#
# Copyright (c) 1988, 1989, 1990, 1991, Ellen M. Sentovich and Rick L. Spickelmier.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted, provided
# that the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of the University of California not
# be used in advertising or publicity pertaining to distribution of 
# the software without specific, written prior permission.  The University
# of California makes no representations about the suitability of this
# software for any purpose.  It is provided "as is" without express or
# implied warranty.
#
# THE UNIVERSITY OF CALIFORNIA DISCLAIMS ALL WARRANTIES WITH REGARD TO 
# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 
# FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE FOR
# ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
# RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
# CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# Suggestions, comments, or improvements are welcome and should be
# addressed to:
#
#   xrn@ic.berkeley.edu
#   ..!ucbvax!ic!xrn
#

#ifdef BandAidCompiler
#include BandAidCompiler
#endif

#if defined(XmacIIServer) || defined(hp9000s300) || defined(hp9000s800) || defined(SGIArchitecture)
EXTRA_LOAD_FLAGS = -lPW
#endif

#if defined(RsArchitecture)
EXTRA_LOAD_FLAGS = -lPW -lbsd
#endif

#ifdef UseMotif
LOCAL_LIBRARIES = XmClientLibs
DEPLIBS = XmClientDepLibs
APPDEFAULTS = XRnMotif
MOTIFDEFINES = -DMOTIF
#else
LOCAL_LIBRARIES = XawClientLibs
DEPLIBS = XawClientDepLibs
APPDEFAULTS = XRn
MOTIFDEFINES = /*nothing*/
#endif

#if defined(aiws)
DEFINES = -a -Nn3000 -Nd4000 $(MOTIFDEFINES)
#else
#if defined(hp9000s300)
DEFINES = -Wc,-Ns4000 $(MOTIFDEFINES)
#else
#if defined(HCRevision)
DEFINES = -DUNIXCPP -DNOSTDHDRS $(MOTIFDEFINES)
#else
#if defined(gould)
DEFINES = -DNOVOID -DLONGINT -UINTSPRINTF $(MOTIFDEFINES)
#else
#if defined(UltrixArchitecture)
DEFINES = -DNOSTDHDRS $(MOTIFDEFINES)
#else
DEFINES = $(MOTIFDEFINES)
#endif
#endif
#endif
#endif
#endif

PROGRAMS = xrn

SRCS = avl.c buttons.c clientlib.c compose.c cursor.c dialogs.c \
       refile.c mesg.c error_hnds.c newsrcfile.c resources.c    \
       internals.c save.c server.c utils.c xmisc.c xrn.c        \
       xthelper.c vprintf.c tempnam.c strstr.c strtok.c y.tab.c \
       cancel.c
OBJS = avl.o buttons.o clientlib.o compose.o cursor.o dialogs.o \
       refile.o mesg.o error_hnds.o newsrcfile.o resources.o    \
       internals.o save.o server.o utils.o xmisc.o xrn.o        \
       xthelper.o vprintf.o tempnam.o strstr.o strtok.o y.tab.o \
       cancel.o

all::

depend:: lex.yy.c y.tab.c

ComplexProgramTarget($(PROGRAMS))
InstallAppDefaults($(APPDEFAULTS))

#if HasSaberC == YES
# saber_xrn:: lex.yy.c
# osaber_xrn:: lex.yy.c
#endif

lex.yy.c: newsrc.l
	$(LEX) newsrc.l
y.tab.c: newsrc.y
	$(YACC) newsrc.y
y.tab.o: lex.yy.c avl.h news.h newsrcfile.h utils.h

clean::
	$(RM) y.tab.c lex.yy.c

