# $Id: Makefile.in,v 1.7 2000-01-20 19:18:47 danw Exp $

SHELL=/bin/sh
@SET_MAKE@

CC=@CC@
CPPFLAGS=@CPPFLAGS@
CFLAGS=@CFLAGS@
DEFS=@DEFS@
ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
PRO_C=@PRO_C@
PRO_C_DEFS=@PRO_C_DEFS@
PRO_C_INCLUDES=@PRO_C_INCLUDES@
PRO_C_OPTS=@PRO_C_OPTS@
PRO_C_FLAGS=$(PRO_C_OPTS) $(PRO_C_DEFS) $(PRO_C_INCLUDES)
LDFLAGS=@LDFLAGS@
SQL_LIBS=@SQL_LIBS@
LIBS=@LIBS@
MR_LIBDEP=@MR_LIBDEP@
INSTALL=@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@

srcdir=@srcdir@
VPATH=@srcdir@
SRCTOP=@top_srcdir@
BUILDTOP=..
mrbindir=@mrbindir@

DCM_OBJS=dcm.o
UPDATE_OBJS=../update/checksum.o ../update/client.o ../update/send_file.o \
	../update/ticket.o ../update/sendrecv.o
START_OBJS=startdcm.o

CFILES=dcm.c

TARGET=dcm startdcm

.SUFFIXES: .pc

.pc.c:
	$(PRO_C) $(PRO_C_FLAGS) INAME=$< ONAME=$@

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

all: $(TARGET)

clean:
	rm -f $(DCM_OBJS) $(START_OBJS) $(CFILES) $(TARGET)

cleandir distclean: clean
	rm -f Makefile

depend: $(CFILES)

install:
	$(INSTALL_PROGRAM) dcm $(mrbindir)
	$(INSTALL_PROGRAM) startdcm $(mrbindir)

dcm: $(DCM_OBJS) $(UPDATE_OBJS) $(MR_LIBDEP)
	$(CC) -o $@ $(LDFLAGS) $(DCM_OBJS) $(UPDATE_OBJS) $(SQL_LIBS) $(LIBS)

startdcm: $(START_OBJS)
	$(CC) -o $@ $(LDFLAGS) $(START_OBJS) $(LIBS)
