LIBS=@LIBS@
CFLAGS=-O3 -Wall -include config.h
CC=@CC@

all: bnc mkpasswd

mkpasswd:mkpasswd.c
	${CC} ${CFLAGS} -o mkpasswd mkpasswd.c ${LIBS} 
bnc: bnc.o conf.o server.o cmds.o ctcp.o send.o sbuf.o Makefile
	${CC} -o bnc bnc.o conf.o server.o cmds.o ctcp.o sbuf.o send.o ${LIBS}

bnc.o: config.h struct.h bnc.c Makefile
	${CC} ${CFLAGS} -c bnc.c
conf.o: config.h struct.h conf.c Makefile
	${CC} ${CFLAGS} -c conf.c
cmds.o: config.h struct.h cmds.c Makefile
	${CC} ${CFLAGS} -c cmds.c
ctcp.o: config.h ctcp.c Makefile
	${CC} ${CFLAGS} -c ctcp.c
server.o: config.h struct.h server.c Makefile
	${CC} ${CFLAGS} -c server.c
send.o: send.c send.h Makefile
	${CC} ${CFLAGS} -c send.c
sbuf.o: sbuf.c
	${CC} ${CFLAGS} -c sbuf.c

clean:
	rm -rf *.o *~ core bnc mkpasswd
dist-clean: clean
	rm -rf Makefile config.cache config.h config.log config.status pid.bnc bnc.conf* bnc.log
	cp Makefile.out Makefile
distclean: dist-clean


syntax highlighted by Code2HTML, v. 0.9.1