;########################### -*- Mode: Makefile -*- ###########################
;# Imakefile --
;# ITIID           : $ITI$ $Header $__Header$
;# Author          : Ulrich Pfeifer
;# Created On      : Tue Mar  8 13:39:44 1994
;# Last Modified By: Ulrich Pfeifer
;# Last Modified On: Mon Nov  6 09:21:59 1995
;# Language        : Makefile
;# Update Count    : 154
;# Status          : Unknown, Use with caution!
;#
;# (C) Copyright 1995, Universitt Dortmund, all rights reserved.
;#
;# HISTORY
;#
;##############################################################################

;# $$
;# $Log: Jmakefile,v $
;# Revision 2.0.1.9  1995/11/09 14:04:08  pfeifer
;# patch46: Remved ui-local.c
;#
;# Revision 2.0.1.8  1995/10/20  17:08:15  pfeifer
;# patch40: Sighash seems to be obsolete?
;#
;# Revision 2.0.1.7  1995/10/10  18:27:35  pfeifer
;# patch33: Rule to compile test_query.
;#
;# Revision 2.0.1.7  1995/10/10  18:27:35  pfeifer
;# patch33: Rule to compile test_query.
;#
;# Revision 2.0.1.6  1995/10/04  17:19:23  pfeifer
;# patch20:
;#
;# Revision 2.0.1.5  1995/10/04  11:02:12  pfeifer
;# Test with metaconfigs errnolist. Does not work. Assumes the name of
;# the array to be sys_errnolist instead of sys_errlist.
;#
;# Revision 2.0.1.4  1995/09/29  11:10:06  pfeifer
;# patch17: Added ../ctype/ctype.o to libwais.a. This will cause problems
;# patch17: if one switches back to the sustems ctype without removing
;# patch17: the library.
;#
;# Revision 2.0.1.3  1995/09/21  16:28:05  pfeifer
;# patch16:
;#
;# Revision 2.0.1.2  1995/09/19  19:09:52  pfeifer
;# patch13: Added Make-Directories for PRIVLIB.
;#
;# Revision 2.0.1.1  1995/09/08  19:06:20  pfeifer
;# patch1: Added dependency to PRIVLIB and $socketlib. Not sure if
;# patch1: $socketlib is used correctly?
;#
;# Revision 2.0.1.1  1995/09/08  19:06:20  pfeifer
;# patch1: Added dependency to PRIVLIB and $socketlib. Not sure if
;# patch1: $socketlib is used correctly?
;#
;# Revision 2.0  1995/09/08  07:58:03  pfeifer
;# Metaconfig baseline
;#
;# Revision 1.2  1995/09/07  09:42:44  pfeifer
;# Anhaengigkeiten zur Uebersetungszeit muessen noch entfernt werden
;#
;# Revision 1.1  1995/09/07  07:52:32  pfeifer
;# Initial revision
;#
;# Revision 1.21  1995/03/15  16:39:10  pfeifer
;# moved soundex to libwais
;#
>PRIVLIB
Initialize(CFLAGS,$ctypeinc)
Initialize(ISOOBJS,$ctypeobj)
Initialize(LDFLAGS, $socketlib -lm) /* Not sure about the $socketlib */
Initialize(REGLIB,$regexplib)
Initialize(BIN_EXP,$installbin)

           YFLAGS = -d -l

     SRCS = \
                    cutil.c \
                    syslog.c \
                    futil.c \
                    ircfiles.c \
                    irfileio.c \
                    irfiles.c \
                    irtfiles.c \
                    irkeywords.c \
                    stemmer.c \
                    panic.c \
                    sockets.c \
                    transprt.c \
                    ustubs.c \
                    wmessage.c \
                    wprot.c \
                    wutil.c \
                    zprot.c \
                    zutil.c \
                    ztype1.c \
                    soundex.c \
                    docid.c \
                    list.c \
                    lock.c \
                    udping.c \
                    ir.c \
                    irretrvl.c \
                    stoplist.c \
                    irsearch.c \
                    stemmer.c \
                    synonym.c \
                    trie.c \
                    field_index.c \
                    field_search.c \
                    ui.c\
                    sersrch.c \
                    irhash.c \
                    hash.c \
                    irinv.c \
		    weight.c \
                    boolean_op.c \
                    hash.c \
                    field_l.c \
                    field_y.c \
                    query_y.c \
                    query_l.c

     OBJS = \
                    cutil.o \
                    syslog.o \
                    futil.o \
                    ircfiles.o \
                    irfileio.o \
                    irfiles.o \
                    irtfiles.o \
                    irkeywords.o \
                    stemmer.o \
                    panic.o \
                    sockets.o \
                    transprt.o \
                    ustubs.o \
                    wmessage.o \
                    wprot.o \
                    wutil.o \
                    zprot.o \
                    zutil.o \
                    ztype1.o \
                    soundex.o \
                    docid.o \
                    list.o \
                    lock.o \
                    udping.o \
                    ir.o \
                    irretrvl.o \
                    stoplist.o \
                    irsearch.o \
                    stemmer.o \
                    synonym.o \
                    trie.o \
                    field_index.o \
                    field_search.o \
                    ui.o\
                    sersrch.o \
                    irhash.o \
                    hash.o \
                    irinv.o \
		    weight.o \
                    boolean_op.o \
                    hash.o \
                    field_l.o \
                    field_y.o \
                    query_y.o \
                    query_l.o

          ALLOBJS = libwais.a $(REGLIB) ../lib/libftw.a

IdentifiedLexDependTarget(waisserver,query_l,query_y,query)
IdentifiedYaccTarget(waisserver,query_y,query)
IdentifiedLexDependTarget(waisindex,field_l,field_y,field)
IdentifiedYaccTarget(waisindex,field_y,field)
NormalLibraryTarget(wais,$(SRCS),$(ISOOBJS) $(OBJS))
InstallLibrary(wais,$(PRIVLIB))
MakeDirectories(install, $(PRIVLIB))
NormalProgramTarget(waisserver,waisserver.c,waisserver.o $(ALLOBJS))
NormalProgramTarget(waisindex,waisindex.c,waisindex.o $(ALLOBJS))
InstallProgram(waisserver,$(BIN_EXP))
InstallProgram(waisindex,$(BIN_EXP))
DependTarget()

test_query: query_y.c libwais.a
	$(CC) -o $@ query_y.c -DTEST_QUERY  $(JLDFLAGS) libwais.a
