CFLAGS = -O  

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

OBJECT = uirc.o ramstore.o ctcp.o dcc.o do_exec.o

# Uncomment the following line, and comment out the line after that  if you
# want a static executable (independent of libs).
#LIBRARY = -ltermcap -static
LIBRARY = -ltermcap

a.out : $(OBJECT)
	gcc -o uirc  $(OBJECT) $(LIBRARY)
		
# DEPENDENCIES
uirc.o : uirc.c uirc.h
ramstore.o : ramstore.c uirc.h
ctcp.o : ctcp.c uirc.h
dcc.o : dcc.c uirc.h
do_exec.o: do_exec.c uirc.h 

#INSTALL
install:
	strip ./uirc
	cp ./uirc /usr/local/bin/

install.man:
	cp man/uirc.n.gz /usr/man/mann/

#CLEANUP
clean:
	rm *.o
