
SHELL=	 /bin/sh
CC=	 @CC@
INSTALL= @INSTALL@

DEFS=	@DEFS@
LIBS=	@LIBS@

KLIBS=	@KLIBS@
ETLIB=	../et/libcom_err.a

INCLUDES= -I../include -I../../source/include
CFLAGS=	-O
LFLAGS=	-uhv ${INCLUDES}

OBJS=	edsc.o parse.o time.o do_quote.o do_trn.o do_mtg.o do_misc.o \
	do_cache.o mktemp.o

SRCS=	edsc.c parse.c time.c do_quote.c do_trn.c do_mtg.c do_misc.c \
	do_cache.c mktemp.c

# other files 
OFILES= discuss.el discuss-enter.el doc

# defaults for options that should come from above.
DESTDIR= /usr/local

INFODIR= /usr/lib/discuss/info

.SUFFIXES:	.h

.c.o:
	-rm -f $*.o
	${CC} ${CFLAGS} ${INCLUDES} ${DEFS} -c $*.c

#

all:	edsc

edsc: ${OBJS} ../server/acl.o ../libds/libds.a ../usp/libusp.a ${ETLIB} newvers.sh
	-rm -f edsc
	sh newvers.sh
	${CC} ${CFLAGS} -c version.c
	${CC} ${CFLAGS} -o edsc ${OBJS} version.o ../server/acl.o \
	    ../libds/libds.a ../usp/libusp.a  ${KLIBS} ${ETLIB} ${LIBS}

saber:
	#setopt load_flags ${CFLAGS}
	#load ${SRCS} ${LIBS} ../lib/libkrb.a ../lib/libdes.a

tags:	TAGS

TAGS:	${SRCS}
	-etags ${SRCS}

install: all

clean:
	rm -f *.o *~ \#* *.bak version.h
	rm -f edsc TAGS

dist:	${SRCS} Makefile.in ${OFILES}
	-mkdir ../../dist/source/edsc
	cp -p ${SRCS} ../../dist/source/edsc/
	cp -p Makefile.in ../../dist/source/edsc/
	cp -p ${OFILES} ../../dist/source/edsc/
	chmod 644 ../../dist/source/edsc/Makefile.in

edsc.o: edsc.c
edsc.o: ../include/discuss/discuss.h
edsc.o: ../include/discuss/types.h
edsc.o: ../include/discuss/tfile.h
edsc.o: ../include/discuss/acl.h
edsc.o: ../include/discuss/interface.h
edsc.o: ../include/discuss/types.h
edsc.o: ../include/discuss/dsname.h
edsc.o: ../include/config.h
parse.o: parse.c
time.o: time.c
do_quote.o: do_quote.c
do_trn.o: do_trn.c
do_trn.o: ../include/discuss/discuss.h
do_trn.o: ../include/discuss/types.h
do_trn.o: ../include/discuss/tfile.h
do_trn.o: ../include/discuss/dsc_et.h
do_trn.o: ../include/discuss/acl.h
do_trn.o: ../include/discuss/interface.h
do_trn.o: ../include/discuss/types.h
do_trn.o: ../include/discuss/dsname.h
do_mtg.o: do_mtg.c
do_mtg.o: ../include/discuss/discuss.h
do_mtg.o: ../include/discuss/types.h
do_mtg.o: ../include/discuss/tfile.h
do_mtg.o: ../include/discuss/dsc_et.h
do_mtg.o: ../include/discuss/acl.h
do_mtg.o: ../include/discuss/interface.h
do_mtg.o: ../include/discuss/types.h
do_mtg.o: ../include/discuss/dsname.h
do_misc.o: do_misc.c
do_misc.o: ./edsc.h
do_misc.o: ../include/discuss/discuss.h
do_misc.o: ../include/discuss/types.h
do_misc.o: ../include/discuss/tfile.h
do_misc.o: ../include/discuss/dsc_et.h
do_misc.o: ../include/discuss/acl.h
do_misc.o: ../include/discuss/interface.h
do_misc.o: ../include/discuss/types.h
do_misc.o: ../include/discuss/dsname.h
