EXENAME = slforum
DEBUGLIBS =
LIBS = -lcrypt  $(DEBUGLIBS)
CC=gcc
CCC=g++

# uncomment the following line for shadow password support.
# CFLAGS += -DUSE_SHADOW

CFLAGS =  -funsigned-char  
CPPFLAGS = -O2 -g -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes  -funsigned-char  

O_FILES = slforummain.o passwd.o slforumuser.o slforumroom.o slforumcmd.o slforumutil.o linkedlist.o authlocal.o

H_FILES = slfprefs.h slforum.h slforumuser.h slforumroom.h slforumcmd.h

all : slforum 

testrun: all
	./slforum 1515 -nofork

strip :
	@ls -l $(EXENAME)
	strip $(EXENAME)
	@ls -l $(EXENAME)

passwd.o: slfprefs.h passwd-pam-inc.c passwd-unix-inc.c

slforumutil.o: slforumutil.h

slforumuser.o: $(H_FILES)

slforumroom.o: $(H_FILES)

slforummain.o: $(H_FILES)

slforumcmd.o: $(H_FILES)


clean :
	rm -f $(O_FILES)

realclean : clean
	rm -f $(EXENAME) *~ Makefile

slforum : $(O_FILES)
	g++ -o $(EXENAME) $(O_FILES) $(LIBS)

tart: ../slf-devel.tar.gz

../slf-devel.tar.gz:	*.c *.cc *.h Makefile-*
	tar cfp - *.c *.cc *.h Makefile-* | gzip > ../slf-devel.tar.gz

