# Makefile for tbbs-tool.
#

MBOXHOME=`./.MBOXHOME`
BIN=`./.MBOXHOME`
CC=gcc
EXPIRE.OBJ= update_usr.o ../derror.o main.o options.o log.rmail.o log.qwk.o \
	bclean.o mailing.lists.o 
LIST.OBJ= user_expire.o www.o boerde_list.o set.permission.o ../ztool.o

OS_DEFS=`../.osdefs` 
DEF_DEFS=`../.gbldefs` 
 
CFLAGS= -O2 -s -traditional  \
	$(OS_DEFS) $(DEF_DEFS)  #-Wall



#all:	update_usr user_list


bbs.update: $(LIST.OBJ) $(EXPIRE.OBJ)
	$(CC) $(CFLAGS) $(EXPIRE.OBJ) $(LIST.OBJ)
	mv a.out bbs.update
	chmod +s bbs.update

bclean.o: 
	@if test -f $(MBOXHOME)/src/.make.shared ; then echo 'enable shared-memory-support....' ; \
		$(CC) -c $(CFLAGS) -D_USE_SHARED_MEM  bclean.c  ;\
		else \
		echo "disable shared-memory-support..."; \
		$(CC) -c $(CFLAGS) bclean.c ;\
		echo; fi

clean:
	rm -f *.o *~ bbs.update
