home *** CD-ROM | disk | FTP | other *** search
-
- # 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 and/or WinHelp documentation provided with the library.
- # See these sources for detailed information regarding the
- # Microsoft Foundation Classes product.
-
- # Common include for building MFC Sample programs
- #
- # typical usage
- # PROJ = foo
- # OBJS = foo.obj bar.obj ...
- # !INCLUDE ..\SAMPLE_.MAK
- #
- # NOTE: do not include 'stdafx.obj' in the OBJS list - the correctly
- # built version will be included for you
- #
- # Options to NMAKE:
- # "AFXDLL=1" => build a DLL client app (default static MFC library)
- # "DEBUG=0" => use retail (default debug)
- # "OPT" => use to set custom compile options
- # "BROWSE=1" => build Visual C++ compatible browse file (.BSC file)
-
- !ifndef PROJ
- !ERROR You forgot to define 'PROJ' !!
- !endif
- !ifndef OBJS
- !ERROR You forgot to define 'OBJS' !!
- !endif
-
- !if "$(AFXDLL)"!="1"
- # static link library variant [medium model] - the default
- CPPMAIN_FLAGS=/AM /Zp /GA /G2
- STDAFX=stdafx
- AFXLIB=mafxcw
- LIBS=mlibcew
- !else
- # dynamic link library variant [large model]
- CPPMAIN_FLAGS=/AL /Zp /GA /GEf /GEs /Gs /G2 /Gy /D_AFXDLL
- STDAFX=stdafxe
- AFXLIB=mfc200
- LIBS=llibcew
- !endif #//AFXDLL
-
- !ifndef VBX
- STACK=/STACK:10240
- !else
- STACK=/STACK:20480
- !endif
-
- !if "$(DEBUG)"!="0"
- # debug variant - the default
- CPPMAIN_FLAGS=/D_DEBUG $(CPPMAIN_FLAGS) /Od /Z7
- LINKFLAGS=/NOD /ONERROR:NOEXE $(STACK) /CODEVIEW
- AFXLIB=$(AFXLIB)D
- STDAFX=$(STDAFX)d
- !else
- # retail variant
- CPPMAIN_FLAGS=$(CPPMAIN_FLAGS) /O1
- LINKFLAGS=/NOD /ONERROR:NOEXE $(STACK)
- !endif #//DEBUG
-
- !if "$(OPT)"!=""
- CPPMAIN_FLAGS=$(CPPMAIN_FLAGS) $(OPT)
- !endif
-
- LIBS=$(AFXLIB) $(LIBS) libw commdlg shell olecli olesvr $(EXTRA_LIBS)
- CPPFLAGS=$(CPPMAIN_FLAGS) /W4 /Yustdafx.h /Fp..\$(STDAFX).pch
-
- !if "$(BROWSE)"=="1"
- CPPFLAGS=$(CPPFLAGS) /FR
- SBRS=$(OBJS:.obj=.sbr)
- all: $(PROJ).exe $(PROJ).bsc
- !endif
-
- #############################################################################
-
- $(PROJ).exe: ..\$(STDAFX).obj $(PROJ).res $(PROJ).def $(OBJS)
- link $(LINKFLAGS) @<<
- $(OBJS) ..\$(STDAFX).obj,
- $(PROJ),,$(LIBS),$(PROJ).def;
- <<
- rc /31 /k /t $(PROJ).res
-
- $(OBJS): ..\$(STDAFX).pch
-
- $(PROJ).res: resource.h
- rc /r /z $(RCFLAGS) $(PROJ).rc
-
- $(PROJ).bsc: $(SBRS) ..\$(STDAFX).sbr
- bscmake @<<
- /o$@ $(SBRS) ..\$(STDAFX).sbr
- <<
-
- clean::
- -erase $(PROJ).exe
- -erase $(PROJ).res
- -erase $(PROJ).bsc
- -erase *.aps
- -erase *.pdb
- -erase *.pch
- -erase *.map
- -erase *.obj
- -erase *.sbr
-
- #############################################################################
- # Shared PCH and PCT files (shared by all samples)
-
- ..\$(STDAFX).obj ..\$(STDAFX).pch ..\$(STDAFX).sbr:: ..\stdafx.h ..\stdafx.cpp
- @echo.
- @echo Building shared Pre-Compiled Header/Type files.
- @echo.
- !if "$(BROWSE)"=="1"
- $(CPP) @<<
- $(CPPMAIN_FLAGS) /W4 /Ycstdafx.h /FR..\$(STDAFX).sbr /Fp..\$(STDAFX).pch /Fo..\$(STDAFX).obj /c ..\stdafx.cpp
- <<
- !else
- $(CPP) @<<
- $(CPPMAIN_FLAGS) /W4 /Ycstdafx.h /Fp..\$(STDAFX).pch /Fo..\$(STDAFX).obj /c ..\stdafx.cpp
- <<
- !endif
-
- cleanall: clean
- -erase ..\$(STDAFX).pch
- -erase ..\$(STDAFX).obj
- -erase ..\$(STDAFX).sbr
-
- #############################################################################
-