# Makefile : Builds the client and server applications
#
# Usage:     NMAKE option (build client)
#    or:     NMAKE clean  (erase all compiled files)
#
# option:    DEBUG=[0|1]  (DEBUG not defined is equivalent to DEBUG=0)


# This is a part of the Microsoft Foundation Classes C++ library.
# Copyright (C) 1992 Microsoft Corporation
# All rights reserved.
#
# This source code is only intended as a supplement to the
# Microsoft Foundation Classes Reference and Microsoft
# QuickHelp documentation provided with the library.
# See these sources for detailed information regarding the
# Microsoft Foundation Classes product.
#

DEBUG=1
CPPFLAGS=  /DWINVER=0x0300 /AM /W3 /Zp /GA /GEs /G2
LINKFLAGS=/NOD /ONERROR:NOEXE

!if "$(DEBUG)"=="1"
CPPFLAGS=/D_DEBUG $(CPPFLAGS) /Od /Zi /f
LINKFLAGS=$(LINKFLAGS) /COD
LIBS=mafxcwd libw mlibcew ddeml
!else
CPPFLAGS=$(CPPFLAGS) /Oselg /Gs
LINKFLAGS=$(LINKFLAGS)  
LIBS=mafxcw libw mlibcew ddeml 
!endif

all: client.exe server.exe

client.exe:     client.obj cddecli.obj map_do.obj client.def client.res
        link $(LINKFLAGS) client cddecli map_do, client, NUL, $(LIBS),client.def;
        rc -30 /t client.res


client.res:  resource.h client.ico client.dlg

client.obj:  client.h resource.h  client.cpp

cddecli.obj: cddecli.h cddecli.cpp

map_do.obj: map_do.h map_do.cpp

server.exe:  server.sym cddeserv.obj  server.obj map_do.obj server.def server.res
        link $(LINKFLAGS) /MAP /LI server cddeserv map_do, server, server, $(LIBS),server.def;
        rc -30 /t server.res
        mapsym server.map


server.res:  resource.h server.ico server.dlg

server.obj:  server.h resource.h  server.cpp
        cl $(CPPFLAGS)  -c /NT SERVER /GA /GEs server.cpp

cddeserv.obj: cddeserv.h cddeserv.cpp
        cl $(CPPFLAGS)  -c /NT CDDESERV /GA /GEs cddeserv.cpp

clean:
        -erase server.exe
        -erase server.res
        -erase server.obj
        -erase client.exe
        -erase client.res
        -erase client.obj
