# Makefile for Services


include ../Makefile.inc


########################## Configuration section ##########################


# Compilation options:
#	-DSKELETON	Compile a "skeleton" version of Services, with only
#			    OperServ enabled
#
#       -DBAHAMUT       Compile services with the Bahamut ts3 support
#
#
# If you change this value, REMEMBER to "make clean", or you may
# (read: will) come out with a confused executable!

CDEFS =


######################## End configuration section ########################


CFLAGS = $(CDEFS) $(EXTRA_CFLAGS)


OBJS =	abuseserv.o actions.o channels.o chanserv.o compat.o conf.o datafiles.o \
	encrypt.o helpserv.o list.o log.o main.o memory.o memoserv.o messages.o \
	misc.o nickserv.o operserv.o opercon.o process.o rootserv.o send.o \
        sockutil.o taglines.o timeout.o users.o
SRCS =	abuseserv.c actions.c channels.c chanserv.c compat.c conf.c datafiles.c \
	encrypt.c helpserv.c list.c log.c main.c memory.c memoserv.c messages.c \
	misc.c nickserv.c operserv.c opercon.c process.c rootserv.c send.c \
        sockutil.c taglines.c timeout.c users.c

all: services

clean:
	/bin/rm -f *.o ../services listnicks listchans ../Makefile.inc

spotless: clean
	/bin/rm -f config.cache configure.log ../Makefile.inc ../inc/sysconf.h

########


services: ../inc/version.h $(OBJS)
	$(CC) $(LFLAGS) $(LIBS) $(OBJS) -o $@


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

abuseserv.o:	abuseserv.c	../inc/services.h
actions.o:	actions.c	../inc/services.h
channels.o:	channels.c	../inc/services.h
chanserv.o:	chanserv.c	cs-help.c ../inc/services.h ../inc/timeout.h ../inc/encrypt.h
compat.o:	compat.c	../inc/services.h
conf.o:         conf.c          ../inc/services.h
datafiles.o:	datafiles.c	../inc/services.h
encrypt.o:	encrypt.c	../inc/encrypt.h ../inc/sysconf.h
helpserv.o:	helpserv.c	../inc/services.h
list.o:		list.c		../inc/services.h
log.o:          log.c           ../inc/services.h
main.o:		main.c		../inc/services.h ../inc/timeout.h
memory.o:	memory.c	../inc/services.h
memoserv.o:	memoserv.c	ms-help.c ../inc/services.h
messages.o:	messages.c	../inc/messages.h
misc.o:		misc.c		../inc/services.h
nickserv.o:	nickserv.c	ns-help.c ../inc/services.h ../inc/timeout.h ../inc/encrypt.h
operserv.o:	operserv.c	os-help.c ../inc/services.h
opercon.o:      opercon.c       ../inc/services.h
process.o:	process.c	../inc/services.h ../inc/messages.h version.h
rootserv.o:     rootserv.c      ../inc/services.h
send.o:		send.c		../inc/services.h
sockutil.o:	sockutil.c	../inc/services.h
taglines.o:     taglines.c      ../inc/services.h
timeout.o:	timeout.c	../inc/services.h ../inc/timeout.h
users.o:	users.c		../inc/services.h

services.h: ../inc/config.h ../inc/extern.h
	touch $@

config.h: ../inc/sysconf.h
	touch $@

version.h: Makefile ../version.sh ../inc/services.h $(SRCS)
