#
# Makefile for AllClub.exe
#
# Environment variable Requirements:
#   
#    INCLUDE=foo           // can be set to anything, must be set
#    PATH=                 // must have proper nmake on path
#    FEDROOT=<path>        // MUST point to base of fed src enlistment
#
# nmake args:              // order of arguments is not relevent
#
#   Clean        // will delete all files in destination dir
#   Full         // will Clean, then build all derived files
#   Shell        // opens os-specific cmd/command shell (helps to debug build)
#   RETAIL=      // builds a retail build (default is DEBUG)
#                // no argument is used for debug builds
#
#
#  All derived files (temp files, .res, output of midl, *.obj, *.exe/.dll...
#  are placed directly into the appropriate tree under $(FEDROOT)\Objs.

#  The $(FEDROOT)\Objs tree is created on demand.
#  Since no derived files are placed in the source tree, multiple builds
#  can be run SIMULTANEOUSLY.

#   use _BCHK=1 if you want to do a boundschecker build.
#   note:  you must have BC already installed locally and define BCBINDIR to
#          point to the directory where nmcl.exe and nmlink.exe reside.  You 
#          can use the BCOPTS variable to add options to the BC compile.

SRCROOT=Club
MAINTARGROOT=AllClub
MAINTARGEXT=exe
SUBSYSTEM=CONSOLE
CARGSLOCAL=/D"ALLCLUB" /D _WIN32_WINNT=0x0400 /D _ATL_STATIC_REGISTRY
INCLUDELOCAL=$(FEDSRC)\ZLib;$(FEDSRC)\_Utility;$(FEDSRC)\inc\*.h;$(FEDROOT)\extern\vc\atl\inc;$(FEDROOT)\src\test\inc;$(DESTDIR)
PCHROOT=pch
PCHINC=$(FEDSRC)\ZLib\*.h $(FEDSRC)\_Utility\*.h $(FEDSRC)\inc\*.h $(FEDSRC)\Zone\*.h $(FEDSRC)\Club\*.h $(FEDSRC)\fedsrv\fedsrvsql.h $(FEDSRC)\fedsrv\sqlhelp.cpp
MSGFILE=AllClubMsg
SPLITSYMBOLS=1

#IDLOUTPUT=AllClubModuleIDL

!include "..\makefile.inc"

RARGS = /l 0x409 /d"ALLCLUB" $(RARGSFLAVOR)

OBJSCNST= $(DESTDIR)\AllClub.obj  \
           $(DESTDIR)\ClubApp.obj \
           $(DESTDIR)\ClubClient.obj \
           $(DESTDIR)\StaticData.obj \
           $(DESTDIR)\clubQguids.obj

OBJS=$(OBJSCNST) $(OBJSFLAVOR) 

LIBS= $(LIBSFLAVOR) \
     dplayx.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
     comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
     uuid.lib odbc32.lib odbccp32.lib ws2_32.lib comctl32.lib \
     urlmon.lib winmm.lib version.lib zticket.lib zticketc.lib

USERLIBS= \
    $(DESTDIR)\..\_utility\Utility.lib \
    $(DESTDIR)\..\zlib\zlib.lib \
    $(DESTDIR)\..\sharemem\sharemem.lib \
    $(DESTDIR)\..\test\TCLib\TCLib.lib

RESFILE= $(DESTDIR)\$(MAINTARGROOT).res

DLLFLAGS = /def:AllClub.def

LARGS=/LIBPATH:$(DXROOT)\lib \
      /LIBPATH:$(FEDEXT)\Vc\lib \
      /LIBPATH:$(FEDEXT)\Zone \
      /OUT:$(MAINTARGFULLPATH) /SUBSYSTEM:CONSOLE \
      $(LARGSFLAVOR) /PDB:$(PDB) $(NOLOGO) \
      /MACHINE:I386

!include "../makeexe.inc"

$(DESTDIR)\AllClub.obj     : $(PCHFILE)
$(DESTDIR)\ClubApp.obj     : $(PCHFILE)
$(DESTDIR)\ClubClient.obj  : $(PCHFILE)
$(DESTDIR)\StaticData.obj  : $(PCHFILE)
$(DESTDIR)\clubQguids.obj  : $(PCHFILE)

$(RESFILE): $(DESTDIR)\$(MSGFILE).rc $(FEDSRC)\Inc\VerRes.rc $(MAINTARGROOT).rc
   @copy $(FEDSRC)\$(SRCROOT)\$(MAINTARGROOT).rc $(DESTDIR)
   @type $(DESTDIR)\$(MSGFILE).rc >>$(DESTDIR)\$(MAINTARGROOT).rc
   @echo #define FLAVOR "$(FLAVOR)" >>$(DESTDIR)\$(MAINTARGROOT).rc
   @type $(FEDSRC)\Inc\VerRes.rc >>$(DESTDIR)\$(MAINTARGROOT).rc
   @$(RC) $(RARGS) /Fo$(RESFILE) $(DESTDIR)\$(MAINTARGROOT).rc

