CCFLAGS = -O2 -Wall -Werror -Wstrict-prototypes -ansi -c

bot:	main.o file.o irc.o net.o sys.o
	cc -g -L ../libmy -o bot main.o file.o irc.o net.o sys.o -lm -lmy
	nroff -Tascii -mandoc bot.8 > ../../bot.cat8
	#strip bot
	cp bot ../..
	@echo "Done. Run Install to copy bots binary and config files."

main.o:	main.c
	cc ${CCFLAGS} main.c

file.o:	file.c
	cc ${CCFLAGS} file.c

irc.o:	irc.c
	cc ${CCFLAGS} irc.c	

net.o:	net.c
	cc ${CCFLAGS} net.c

sys.o:	sys.c
	cc ${CCFLAGS} sys.c

clean:
	rm -f bot *.o ../../bot ../../*.log ../../bot.cat8
