# NOTES: 1.31x by Roger Barth 11/27/91
# "make" makes all. run it as a user.
#
# "make install" should be run as root to put comb in /usr/bin.  Change
# the directory if you want it elsewhere.
#
# "make clean" will remove the .o files.
#
# Many fixes from other versions.  Base version was 1.29.
# -DCOHERENT is needed for curses321.

SRC	= comb.c display.c headers.c sendmsg.c utility.c help.c comb.h \
		cgetstr.c config.c routing.c uname.c rc.c

OBJ	= comb.o display.o headers.o sendmsg.o utility.o help.o cgetstr.o \
		config.o routing.o uname.o rc.o

COPTS = -DCOHERENT -A 

comb	: $(OBJ) comb.h
	cc $(COPTS) -o comb $(OBJ) -n -lcurses -lterm
	fixstack 6000 comb
	strip comb

rc.o	: rc.c comb.h
	cc -c $(COPTS) rc.c

comb.o	  : comb.c comb.h
	cc -c $(COPTS) comb.c

uname.o	  : uname.c
	cc -c $(COPTS) uname.c

display.o : display.c comb.h
	cc -c $(COPTS) display.c

cgetstr.o : cgetstr.c comb.h
	cc -c $(COPTS) cgetstr.c

routing.o : routing.c comb.h
	cc -c $(COPTS) routing.c

config.o  : config.c comb.h
	cc -c $(COPTS) config.c

help.o	  : help.c comb.h
	cc -c $(COPTS) help.c

utility.o : utility.c comb.h
	cc -c $(COPTS) utility.c

headers.o : headers.c comb.h
	cc -c $(COPTS) headers.c

sendmsg.o : sendmsg.c comb.h
	cc -c $(COPTS) sendmsg.c

# run "make install" as root

install :	/bin/comb
	mv comb /bin
	chown bin /bin/comb
	chgrp bin /bin/comb

clean :       $(OBJ)
	rm $(OBJ)
