DOC

windows vc makefile

By Walter Parker,2014-07-05 18:18
11 views 0
windows vc makefilevc,VC

    # Makefile : Builds a Microsoft Foundation Class library variant. #

    # This is a part of the Microsoft Foundation Classes C++ library. # Copyright (C) 1992-1998 Microsoft Corporation

    # All rights reserved.

    #

    # This source code is only intended as a supplement to the

    # Microsoft Foundation Classes Reference and related

    # electronic documentation provided with the library.

    # See these sources for detailed information regarding the

    # Microsoft Foundation Classes product.

    #

    # Usage: NMAKE CLEAN (removes all intermediary files)

    # or: NMAKE options (builds one library variant (see below)) # Note that an NMAKE CLEAN should be performed before building a new variant. #

    # 'Options' are one of each of:

    # "DLL" (defaults to 0)

    # If this item is 0, then a normal library is generated. # DLL=1 is obsolete and not supported by this release. # If this item is 2, objects suitable for the shared DLL version # of MFC are created. Note: DLL=2 is to be used only from # MFCDLL.MAK, MFCOLE.MAK, or MFCDB.MAK

    #

    # "DEBUG" (defaults to 1)

    # If this item is 1, debugging support is compiled into # the library. If this item is 0, then debugging support # is disabled. Debug support does not include CodeView information. #

    # "CODEVIEW" (defaults to 1 for DEBUG=1, 0 for DEBUG=0) # If this item is 1 CodeView information is compiled into # the library. You must use the /DEBUG:FULL and /DEBUGTYPE:cv link # options when linking your executable. A value of 0 indicates that # no CodeView information is to be generated.

    #

    # "OBJ=.\obj" (defaults to '$$(MODEL)$(BASE)$(DEBUG)') # This optional specification specifies where temporary OBJ files # are stored during the build process. The directory is created or # removed as necessary.

    #

    # "OPT=" (no default value)

    # This allows additional compiler options to be added to the build. # If more than one switch is desired, put double-quotes around the # whole OPT= argument, e.g., "OPT=/J /W3".

#

    # "NO_PCH=1"

    # Set this item to override the default use of precompiled headers. #

    # "NO_PDB=1"

    # Set this item to override the default use of PDB files. #

    # "BROWSE=1" (defaults to 0)

    # Set this option to build the browse database for the MFC # library. By setting BROWSE=1, both the .SBRs and the .BSC # files will be built along with the .OBJ and .LIB files that # are part of the normal build process.

    #

    # "BROWSEONLY=1" (defaults to 0)

    # Set this option to build the browse files without re-building # the MFC library itself. Note: This option is used internally # when BROWSE=1 is selected.

    #

    # "PLATFORM=INTEL" (defaults depends on host)

    # This option chooses the appropriate tools and sources for the # different platforms supporting the Win32 API. Currently INTEL, # MIPS, ALPHA, PPC are supported.

    #

    # "INCREMENTAL=1" (defaults to 0)

    # This option enables incremental/minimal compilation and # incremental linking.

    #

    # Advanced Options:

    #

    # "MBCS=0" (defaults to 1)

    # To build an SBCS library instead of the default (MBCS) # you can use MBCS=0. This creates a slightly smaller # library, but the code will not work in far-east markets. # This option has no effect when UNICODE=1.

    #

    # "MT=0" (defaults to 1)

    # To build a non-multithreaded library instead of the default # (which enables multitheading and uses the multithread # C-runtimes) you can use MT=0.

    #

    ############################################################################# # Define defaults if not defined

# Default PLATFORM depending on host environment

!ifndef PLATFORM

    !ifndef PROCESSOR_ARCHITECTURE PROCESSOR_ARCHITECTURE=x86 !endif

    !if "$(PROCESSOR_ARCHITECTURE)" == "x86"

    PLATFORM=INTEL

    !endif

    !if "$(PROCESSOR_ARCHITECTURE)" == "MIPS"

    PLATFORM=MIPS

    !endif

    !if "$(PROCESSOR_ARCHITECTURE)" == "ALPHA"

    PLATFORM=ALPHA

    !endif

    !if "$(PROCESSOR_ARCHITECTURE)" == "PPC"

    PLATFORM=PPC

    !endif

    !endif

    # Default to DEBUG mode !ifndef DEBUG

    DEBUG=1

    !endif

# Default to NOT DLL

    !ifndef DLL

    DLL=0

    !endif

    # Default Codeview Info !ifndef CODEVIEW

    !if "$(DEBUG)" == "1" CODEVIEW=1

    !else

    CODEVIEW=0

    !endif

    !endif

# BROWSEONLY is default 0 and implies BROWSE=1 if BROWSEONLY=1

    !ifndef BROWSEONLY

    BROWSEONLY=0

    !endif

    !if "$(BROWSEONLY)" != "0" !undef BROWSE

BROWSE=1

    !endif

    # Default to no BROWSE info !ifndef BROWSE

    BROWSE=0

    !endif

    # Default to no INCREMENTAL build !ifndef DEVBUILD

    DEVBUILD=0

    !endif

    !if "$(DEBUG)" != "0"

    !ifndef INCREMENTAL

    INCREMENTAL=$(DEVBUILD)

    !endif

    !endif

    !ifndef INCREMENTAL

    INCREMENTAL=0

    !endif

# Default to _MBCS build

    !ifndef MBCS

    MBCS=1

    !endif

    # Default to multithreading support !ifndef MT

    MT=1

    !endif

#############################################################################

    # normalize cases of parameters, or error check

!if "$(CPU)" == "MIPS"

    !if "$(PLATFORM)" != "MIPS" !error Must set PLATFORM=MIPS for MIPS builds

    !endif

    !endif

!if "$(CPU)" == "ALPHA"

    !if "$(PLATFORM)" != "ALPHA" !error Must set PLATFORM=ALPHA for ALPHA builds

    !endif

!endif

BASE=W

#############################################################################

    # Parse options

#

    # DEBUG OPTIONS

    #

    !if "$(DEBUG)" != "0"

DEBUGSUF=D

    DEBDEFS=/D_DEBUG

    DEBOPTS=/Od

!endif

#

    # NON-DEBUG OPTIONS #

    !if "$(DEBUG)" == "0"

DEBUGSUF=

    DEBDEFS=

!if "$(PLATFORM)" == "INTEL"

    DEBOPTS=/O1 /GyF

    !endif

    !if "$(PLATFORM)" == "MIPS"

    DEBOPTS=/O1 /GyF

    !endif

    !if "$(PLATFORM)" == "ALPHA"

    DEBOPTS=/O1 /GyF

    !endif

    !if "$(PLATFORM)" == "PPC"

    DEBOPTS=/O1 /GyF

    !endif

!endif

#

    # PLATFORM options #

    !if "$(PLATFORM)" == "INTEL" CL_MODEL=/D_X86_

    !endif

    !if "$(PLATFORM)" == "MIPS" CL_MODEL=/D_MIPS_

    !endif

    !if "$(PLATFORM)" == "ALPHA" CL_MODEL=/D_ALPHA_

    !endif

    !if "$(PLATFORM)" == "PPC" CL_MODEL=/D_PPC_

    !endif

    !if "$(CL_MODEL)" == "" !error PLATFORM must be one of INTEL, MIPS, ALPHA, or PPC.

    !endif

    # TYPE = Library Type Designator # c = normal C library # d = DLL library TYPE=c

    DEXT=

#

    # Object File Directory #

    !if "$(OBJ)" == ""

    D=$$$(MODEL)$(BASE)$(DEBUGSUF)$(DEXT) # subdirectory specific to variant

    !else

    D=$(OBJ) # User specified directory

    !endif

#

    # _AFXDLL DLL Variant

    #

!if "$(DLL)" == "2"

    # _AFXDLL library

    TYPE=e

    !if "$(OBJ)" == ""

    D=DLL$(DEBUGSUF).$(BASE) !if "$(UNICODE)" == "1" D=$(MODEL)$D

    !endif

    D=$$$D

    !endif

    TARGOPTS=$(TARGOPTS) /MD /D_DLL /GF

    !if "$(MT)" != "0"

    TARGOPTS=$(TARGOPTS) /D_MT !endif

    TARGDEFS=$(TARGDEFS) /D_WINDLL /D_AFXDLL

    !else

    # not _AFXDLL library

    !if "$(MD)" == "1"

    TARGOPTS=$(TARGOPTS) /MD !else

    !if "$(MT)" != "0"

    TARGOPTS=$(TARGOPTS) /MT !endif

    !endif

    !endif

    !if "$(UNICODE)" == "1" MODEL=U

    TARGDEFS=$(TARGDEFS) /D_UNICODE !else

    MODEL=N

    !if "$(MBCS)" != "0"

    TARGDEFS=$(TARGDEFS) /D_MBCS !endif

    !endif

!if "$(DLL)" == "2" && "$(BROWSEONLY)" != "1"

    !if "$(TARG)" == ""

    !error DLL=2 is used only from MFCDLL.MAK, MFCOLE.MAK, or MFCDB.MAK

    !endif

    GOAL=$(TARG)

    !else

    GOAL=$(MODEL)afx$(TYPE)$(BASE)$(DEBUGSUF)

    !endif

#

    # CODEVIEW options

    #

    !if "$(CODEVIEW)" == "1" !if "$(NO_PDB)" == "1"

    CVOPTS=/Z7

    !if "$(PROFLIB)" != ""

    !error Can't build for profiling without PDB files.

    !endif

    !else

    CVOPTS=/Zi

    !if "$(PROFLIB)" != ""

    CVOPTS=$(CVOPTS) /Gh

    !endif

    !if "$(DLL)" == "2"

    PDBOPTS=/Fd$(GOAL).pdb

    !else

    PDBOPTS=/Fd..\lib\$(GOAL).pdb !endif

    !endif

    !endif

#

    # INCREMENTAL options

    #

    !if "$(INCREMENTAL)" == "1" INCROPTS=/Gi /Gm

    !else

    INCROPTS=/Gi- /Gm-

    !endif

#

    # COMPILER OPTIONS

    #

    !if "$(PLATFORM)" == "INTEL" CL_OPT=/W4 /WX /Zl /GX /GR $(INCROPTS) $(DEBOPTS) $(CVOPTS) $(TARGOPTS)

    !endif

    !if "$(PLATFORM)" == "MIPS" CL_OPT=/W4 /WX /Zl /GX /GR $(INCROPTS) $(DEBOPTS) $(CVOPTS) $(TARGOPTS)

    !endif

    !if "$(PLATFORM)" == "ALPHA" CL_OPT=/W4 /WX /Zl /GX /GR $(INCROPTS) $(DEBOPTS) $(CVOPTS) $(TARGOPTS)

    !endif

    !if "$(PLATFORM)" == "PPC"

    CL_OPT=/W4 /WX /Zl /GX /GR $(INCROPTS) $(DEBOPTS) $(CVOPTS) $(TARGOPTS) !endif

!if "$(DEVBUILD)" != "0"

    CL_OPT=$(CL_OPT) /D_AFX_DEVBUILD

    !endif

!if "$(BROWSE)" != "0"

    CL_OPT=/FR$D\ $(CL_OPT)

    !endif

!if "$(BROWSEONLY)" != "0"

    CL_OPT=/Zs $(CL_OPT)

    !else

    CL_OPT=/Fo$D\ $(CL_OPT)

    !endif

DEFS=$(DEFS) $(DEBDEFS) $(TARGDEFS)

#############################################################################

    # Library Components

OBJECT=$D\objcore.obj $D\except.obj \

     $D\validadd.obj $D\dumpcont.obj $D\dumpflt.obj \

     $D\arccore.obj $D\arcobj.obj $D\arcex.obj \

     $D\arcstrm.obj

# non-shared diagnostics

    OBJDIAG=$D\dumpinit.obj $D\dumpout.obj \

     $D\afxasert.obj $D\afxmem.obj $D\afxabort.obj

    FILES=$D\filecore.obj $D\filetxt.obj $D\filemem.obj $D\fileshrd.obj \

     $D\filex.obj $D\filest.obj

    COLL1=$D\array_b.obj $D\array_d.obj $D\array_p.obj $D\array_o.obj \

     $D\array_s.obj $D\array_u.obj $D\array_w.obj \

     $D\list_o.obj $D\list_p.obj $D\list_s.obj

COLL2=$D\map_pp.obj $D\map_pw.obj $D\map_so.obj \

     $D\map_sp.obj $D\map_ss.obj $D\map_wo.obj $D\map_wp.obj $D\plex.obj

MISC=\

     $D\strcore.obj $D\strex.obj $D\timecore.obj \

     $D\afxdbcs.obj $D\afxstate.obj $D\afxtls.obj $D\fixalloc.obj \

     $D\mtcore.obj $D\mtex.obj

WINDOWS=\

     $D\wincore.obj $D\winfrm.obj $D\winfrm2.obj $D\winfrmx.obj \

     $D\winmdi.obj $D\tooltip.obj $D\winmini.obj $D\winhand.obj \

     $D\winmain.obj $D\barcore.obj $D\bartool.obj $D\bardlg.obj \

     $D\barstat.obj $D\bardock.obj $D\dockcont.obj $D\dockstat.obj \

     $D\dcprev.obj $D\dcmeta.obj $D\trckrect.obj $D\barcool.obj

DIALOG=\

     $D\winctrl1.obj $D\winctrl2.obj $D\winctrl3.obj $D\winctrl4.obj \

     $D\winbtn.obj $D\dlgcore.obj $D\dlgdata.obj $D\dlgfloat.obj \

     $D\dlgprop.obj $D\dlgcomm.obj $D\dlgfile.obj $D\dlgprnt.obj \

     $D\dlgclr.obj $D\dlgfnt.obj $D\dlgfr.obj $D\ccdata.obj \

     $D\dlgtempl.obj $D\winctrl6.obj $D\winctrl7.obj

WINMISC=\

     $D\wingdi.obj $D\wingdix.obj $D\winstr.obj $D\winmenu.obj \

     $D\auxdata.obj $D\afxcrit.obj $D\afxtrace.obj $D\winutil.obj \

     $D\winocc.obj

DOCVIEW=\

     $D\cmdtarg.obj $D\doccore.obj $D\doctempl.obj \

     $D\docsingl.obj $D\docmulti.obj $D\docmgr.obj \

     $D\viewcore.obj $D\viewprnt.obj $D\winsplit.obj $D\viewscrl.obj \

     $D\viewform.obj $D\viewedit.obj $D\viewprev.obj $D\viewcmn.obj \

     $D\docmapi.obj

INTERNET=$D\inet.obj $D\filefind.obj

    !if "$(UNICODE)" != "1"

    INTERNET=$(INTERNET) $D\isapimix.obj

    !endif

APPLICATION=\

     $D\thrdcore.obj $D\appcore.obj $D\appinit.obj $D\appterm.obj \

     $D\appui.obj $D\appui1.obj $D\appui2.obj $D\appui3.obj $D\appgray.obj \

     $D\appdlg.obj $D\app3d.obj $D\appprnt.obj $D\apphelp.obj $D\apphelpx.obj \

     $D\filelist.obj

!if "$(DLL)" != "2"

    APPLICATION=$(APPLICATION) $D\app3ds.obj \

     $D\nolib.obj $D\appmodul.obj $D\dllmodul.obj $D\oleexp.obj $D\dumpstak.obj !endif

Report this document

For any questions or suggestions please email
cust-service@docsford.com