# This is the Makefile for HYBROW 1.3 (4 May 1993)
# Please make the appropriate changes to it according to the instructions
# given below.
# T.W.Tan and Derek Kiong. bchtantw@nuscc.nus.sg and isckbk@nuscc.nus.sg

# Please set your own home directory where hybrow is to reside
HOME = \"/usr/local/biocomp/hybrow\"

# Please set your compiler 
CC = cc

# Please define the switches appropriate to your computer OS.
CFLAGS = -DSTARTDIR=$(HOME) -DUSEENV -DCASESEN -DCYCLIC -DXIFILE  -O2 -fomit-frame-pointer -m486 -I/usr/include/bsd
# for SGI, add -DUSG3TTY -DSGI
# for ULTRIX, add -DCURSESX
# for SUNs and other environments without setenv, add -DSETENV
# for SUNs with proto-c compilers, add -DNOPROTO
# for AIX, add -DAIX
# for CONVEX, add -DCONVEX

# For Ultrix users, please set this to -lcursesX instead of -lcurses
LIBS = -lcurses -ltermcap -lbsd
#LIBS = -lcursesX -ltermcap

SOURCES = screen.c mx.c searchpath.c main.c hybrow.c
OBJECTS = screen.o mx.o searchpath.o main.o hybrow.o

all:  hybrow ngopher

hybrow: $(OBJECTS)
	$(CC) -o hybrow $(OBJECTS) $(LIBS)

ngopher: ngopher.o
	$(CC) -o ngopher ngopher.o 

.c.o:
	$(CC) -c $(CFLAGS) $<

clean:
	rm -f *.o hybrow ngopher

pack:
	@tar cf - def.h  hybrow.c main.c mx.c screen.c searchpath.c ngopher.c \
		.hybrowrc help.brow info.brow Makefile \
		INSTALLATION README customization_help \
		glossary help hy indexer menutemplate \
		sample sample01 sampledict sampleheader sampletext \
		start tutorial tutorial1 tutorial2 \
	 	xdict xgloss | compress > hybrow1.3.tar.Z

depend:
	-echo "1,/^#.*DO NOT DELETE THIS LINE/ w!" | e - Makefile
	grep '^#[	 ]*include[ 	][ 	]*"' $(SOURCES) /dev/null \
	| sed 's/\..*:#[^"]*"\([^"]*\)".*/.o:	\1/' >> Makefile
	echo '#	PUT NO STUFF BELOW -- make depend will remove it' >> Makefile

#	DO NOT DELETE THIS LINE
screen.o:	def.h
mx.o:	def.h
searchpath.o:	def.h
main.o:	def.h
hybrow.o:	def.h
#	PUT NO STUFF BELOW -- make depend will remove it
