CC=@CC@
RM=@RM@
IRCDLIBS=@LIBS@
INCLUDEDIR=-I../include

SRC_1 = bsd.c channel.c class.c dbuf.c dich_conf.c
SRC_2 = fdlist.c hash.c inet_addr.c ircd.c ircsprintf.c
SRC_3 = list.c match.c packet.c parse.c res.c
SRC_4 = s_auth.c s_bsd.c s_conf.c s_debug.c s_err.c s_misc.c s_numeric.c
SRC_5 = s_serv.c s_user.c send.c support.c whowas.c scache.c blalloc.c
RES_SRC =

#This is only for very old systems that NEED this
#RES_SRC = res_mkquery.c res_init.c res_comp.c

SOURCES = $(SRC_1) $(SRC_2) $(SRC_3) $(SRC_4) $(SRC_5) $(RES_SRC)
OBJECTS = $(SOURCES:.c=.o) version.o

all: ircd

build: all

# Yuck - don't use this.
depend:
	makedepend $(INCLUDE) $(SOURCES)

clean:
	$(RM) -f $(OBJECTS) *~ ircd.core core ircd 

distclean: clean
	$(RM) -f Makefile version.c.last

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

ircd: $(OBJECTS)
	$(CC) ${LDFLAGS} -o ircd $(OBJECTS) $(IRCDLIBS)
	mv version.c version.c.last

install: build
	@echo "Please do a make install from the top level directory"

version.c: version.c.SH
	/bin/sh ./version.c.SH

bsd.o: bsd.c ../include/struct.h ../include/config.h \
 ../include/setup.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/common.h \
 ../include/sys.h ../include/h.h ../include/dich_conf.h \
 ../include/fdlist.h
channel.o: channel.c ../include/struct.h ../include/config.h \
 ../include/setup.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/common.h \
 ../include/sys.h ../include/numeric.h ../include/channel.h \
 ../include/h.h ../include/dich_conf.h ../include/fdlist.h
class.o: class.c ../include/struct.h ../include/config.h \
 ../include/setup.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/common.h \
 ../include/numeric.h ../include/h.h ../include/dich_conf.h \
 ../include/fdlist.h
dbuf.o: dbuf.c ../include/struct.h ../include/config.h \
 ../include/setup.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/common.h \
 ../include/sys.h
dich_conf.o: dich_conf.c ../include/sys.h ../include/setup.h \
 ../include/common.h ../include/struct.h ../include/config.h \
 ../include/defs.h ../include/hash.h ../include/class.h \
 ../include/dbuf.h ../include/h.h ../include/dich_conf.h \
 ../include/fdlist.h
fdlist.o: fdlist.c ../include/config.h ../include/setup.h \
 ../include/defs.h ../include/fdlist.h
hash.o: hash.c ../include/struct.h ../include/config.h \
 ../include/setup.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/common.h \
 ../include/sys.h ../include/h.h ../include/dich_conf.h \
 ../include/fdlist.h
inet_addr.o: inet_addr.c ../include/setup.h ../include/struct.h \
 ../include/config.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/common.h \
 ../include/sys.h ../include/nameser.h ../include/resolv.h
ircd.o: ircd.c ../include/struct.h ../include/config.h \
 ../include/setup.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/common.h \
 ../include/sys.h ../include/numeric.h ../include/h.h \
 ../include/dich_conf.h ../include/fdlist.h
ircsprintf.o: ircsprintf.c
list.o: list.c ../include/struct.h ../include/config.h \
 ../include/setup.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/common.h \
 ../include/sys.h ../include/h.h ../include/dich_conf.h \
 ../include/fdlist.h ../include/numeric.h
match.o: match.c ../include/struct.h ../include/config.h \
 ../include/setup.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/common.h \
 ../include/sys.h
packet.o: packet.c ../include/struct.h ../include/config.h \
 ../include/setup.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/common.h \
 ../include/sys.h ../include/msg.h ../include/h.h \
 ../include/dich_conf.h ../include/fdlist.h
parse.o: parse.c ../include/struct.h ../include/config.h \
 ../include/setup.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/common.h \
 ../include/msg.h ../include/sys.h ../include/numeric.h ../include/h.h \
 ../include/dich_conf.h ../include/fdlist.h
res.o: res.c ../include/struct.h ../include/config.h \
 ../include/setup.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/common.h \
 ../include/sys.h ../include/res.h ../include/numeric.h ../include/h.h \
 ../include/dich_conf.h ../include/fdlist.h ../include/nameser.h \
 ../include/resolv.h
s_auth.o: s_auth.c ../include/struct.h ../include/config.h \
 ../include/setup.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/common.h \
 ../include/sys.h ../include/res.h ../include/numeric.h \
 ../include/patchlevel.h ../include/sock.h ../include/h.h \
 ../include/dich_conf.h ../include/fdlist.h
s_bsd.o: s_bsd.c ../include/struct.h ../include/config.h \
 ../include/setup.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/common.h \
 ../include/sys.h ../include/res.h ../include/numeric.h \
 ../include/patchlevel.h ../include/inet.h ../include/nameser.h \
 ../include/resolv.h ../include/h.h ../include/dich_conf.h \
 ../include/fdlist.h
s_conf.o: s_conf.c ../include/struct.h ../include/config.h \
 ../include/setup.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/common.h \
 ../include/sys.h ../include/numeric.h ../include/h.h \
 ../include/dich_conf.h ../include/fdlist.h
s_debug.o: s_debug.c ../include/struct.h ../include/config.h \
 ../include/setup.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/numeric.h \
 ../include/common.h ../include/sys.h ../include/h.h \
 ../include/dich_conf.h ../include/fdlist.h
s_err.o: s_err.c ../include/struct.h ../include/config.h \
 ../include/setup.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/numeric.h \
 ../include/s_err.h
s_misc.o: s_misc.c ../include/struct.h ../include/config.h \
 ../include/setup.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/common.h \
 ../include/sys.h ../include/numeric.h ../include/h.h \
 ../include/dich_conf.h ../include/fdlist.h
s_numeric.o: s_numeric.c ../include/struct.h ../include/config.h \
 ../include/setup.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/common.h \
 ../include/sys.h ../include/numeric.h ../include/h.h \
 ../include/dich_conf.h ../include/fdlist.h
s_serv.o: s_serv.c ../include/struct.h ../include/config.h \
 ../include/setup.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/common.h \
 ../include/sys.h ../include/numeric.h ../include/msg.h \
 ../include/channel.h ../include/h.h ../include/dich_conf.h \
 ../include/fdlist.h
s_user.o: s_user.c ../include/struct.h ../include/config.h \
 ../include/setup.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/common.h \
 ../include/sys.h ../include/numeric.h ../include/msg.h \
 ../include/channel.h ../include/h.h ../include/dich_conf.h \
 ../include/fdlist.h
send.o: send.c ../include/struct.h ../include/config.h \
 ../include/setup.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/common.h \
 ../include/sys.h ../include/h.h ../include/dich_conf.h \
 ../include/fdlist.h ../include/numeric.h
support.o: support.c ../include/struct.h ../include/config.h \
 ../include/setup.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/common.h \
 ../include/sys.h
whowas.o: whowas.c ../include/struct.h ../include/config.h \
 ../include/setup.h ../include/defs.h ../include/hash.h \
 ../include/class.h ../include/dbuf.h ../include/common.h \
 ../include/sys.h ../include/numeric.h ../include/h.h \
 ../include/dich_conf.h ../include/fdlist.h
scache.o: scache.c ../include/struct.h ../include/h.h
blalloc.o: blalloc.c ../include/blalloc.h
