# --------------------------------------------------------------------
# 
# Makefile for audio mail server and test client
# 
# Time-stamp: <97/01/11 05:09:52 vels>
# 
# --------------------------------------------------------------------

# --------------------------------------------------------------------
#                         Machine dependend
# --------------------------------------------------------------------

include config.prog
include config.in

# --------------------------------------------------------------------
#                    Compiler and linker options
# --------------------------------------------------------------------
INCLUDES  = -I$(TOPDIR)/include -I$(TOPDIR)/client/include \
            -I../include -I$(TOPDIR)/unix $(XINCLUDES)

.SUFFIXES: .o .cpp
.cpp.o:
	$(C++) $(C++FLAGS) $(INCLUDES) -c $*.cpp

# --------------------------------------------------------------------
#                                Files 
# --------------------------------------------------------------------
SRVOBJS = server.o \
          srv2clnt.o \
          util.o 

CLNTOBJS = client.o \
           clnt2srv.o \
           util.o 

# --------------------------------------------------------------------
all: $(SERVER) $(TESTCLIENT)

$(SERVER): $(SRVOBJS)
	$(RM) $@
	$(C++) -o $@ $(SRVOBJS) $(SYSLIBS)

$(TESTCLIENT): $(CLNTOBJS)
	$(RM) $@
	$(C++) -o $@ $(CLNTOBJS) $(SYSLIBS)

depend:
	@$(MAKEDEPEND) -f.depend -DUNIX $(INCLUDES) *.c *.cpp 2> /dev/null
	@$(RM) .depend.bak

clean:
	@$(RM) $(PROGRAM) .gdb* core *.core *.bak *.o *.flc *~ ../include/*~ Templates.DB

# --------------------------------------------------------------------
#                                Dependencies
# --------------------------------------------------------------------
ifeq (.depend,$(wildcard .depend))
include .depend
endif
