# A Makefile for mxwais

RM = rm -f
AR = ar 
ARFLAGS = r

MXWAIS = mxwais

# choose your compiler.

#CC = gcc

# to use Sun shared libraries, use cc

LD = $(CC)

VERSION = 0.82

TOP = /proj/wais/latest

SUPDIR = $(TOP)/ir

# Edit these to point to your site's X directories.

INSTALLDIR = /usr/local/bin/sun4
APPSDIR = /usr/lib/X11/app-defaults

# if your X includes are not in the standard places, add a -I to them.
CFLAGS = -D_NO_PROTO -g -I$(SUPDIR)

# this is for SunOS 4.X
# if your X libraries are not in the standard places, add a -L to them.
#LFLAGS = -L/import/X11R4/usr/lib

# dealing with taking an intenet name and resolving it.  
# set to -lresolv or nothing
#RESOLVER=	-lresolv 

LIBS = -lXm -lXaw -lXmu -lXt -lXext -lX11 $(RESOLVER) -lm

UI_LIB = $(TOP)/bin/ui.a

MXWAISSRC = mxwais.c shell-ui.c

MXWAISOBJ = mxwais.o shell-ui.o

mxwais: $(MXWAISOBJ)
	$(LD) $(LFLAGS) -o $@  $(MXWAISOBJ) $(LIBS) $(UI_LIB)

clean:
	$(RM) *.o
	$(RM) *~
	$(RM) \#*\#
	$(RM) .nfs*  # NFS Lossage
	$(RM) *.elc
	$(RM) $(MXWAIS)
	$(RM) core
	$(RM) .make* .nse*	# Sun make junk

$(INSTALLDIR)/mxwais: $(MXWAIS)
	cp $(MXWAIS) $(INSTALLDIR)/mxwais
	
INSTALLS = 	$(INSTALLDIR)/mxwais

install: $(INSTALLS)
