--- mstools/mfc/samples/templdef/makefile 2018/08/09 18:22:38 1.1.1.2 +++ mstools/mfc/samples/templdef/makefile 2018/08/09 18:27:54 1.1.1.3 @@ -4,6 +4,10 @@ # or: NMAKE clean (erase all compiled files) # # options: DEBUG=[0|1] (DEBUG not defined is equivalent to DEBUG=0) +# PLATFORM=INTEL (defaults to INTEL) +# This option chooses the appropriate tools and sources for the +# different platforms support by Windows/NT. Currently INTEL and +# MIPS are supported; more will be aded as they become available. # # This is a part of the Microsoft Foundation Classes C++ library. # Copyright (C) 1992 Microsoft Corporation @@ -11,38 +15,52 @@ # # This source code is only intended as a supplement to the # Microsoft Foundation Classes Reference and Microsoft -# QuickHelp documentation provided with the library. +# documentation provided with the library. # See these sources for detailed information regarding the # Microsoft Foundation Classes product. # -!ifdef WIN16MFC -#!message compiling for WIN16 - -CPPFLAGS= /AM /W3 /Zp /D_DOS -LINKFLAGS=/NOD /ONERROR:NOEXE +!if "$(PLATFORM)"=="" +PLATFORM=ALPHA +!endif -!if "$(DEBUG)"=="1" -CPPFLAGS=/D_DEBUG $(CPPFLAGS) /Od /Zi /f -LINKFLAGS=$(LINKFLAGS) /COD -LIBS=mafxcrd mlibce $(LIBS) +!if "$(PLATFORM)"=="INTEL" +CPP = cl +CPPFLAGS=/W3 -D_X86_ -D_CONSOLE +LINK=link +LIBS= +!else +!if "$(PLATFORM)"=="MIPS" +CPP = mcl +CPPFLAGS=/W3 /D_MIPS_ /D_CONSOLE +LINK=link32 +LIBS=kernel32.lib libc.lib !else -CPPFLAGS=$(CPPFLAGS) /Oselg /Gs -LINKFLAGS=$(LINKFLAGS) -LIBS=mafxcr mlibce $(LIBS) +!if "$(PLATFORM)"=="ALPHA" +CPP = claxp +CPPFLAGS=/W3 /D_CONSOLE +LINK=link32 +LIBS=kernel32.lib libc.lib +!endif +!endif !endif +LINKFLAGS=-subsystem:console -entry:mainCRTStartup -templdef.exe: templdef.obj - link $(LINKFLAGS) templdef, templdef, NUL, $(LIBS); +!if "$(DEBUG)" == "1" +CPPFLAGS=$(CPPFLAGS) /D_DEBUG /Od /Zi +LINKFLAGS=$(LINKFLAGS) -debug:full -debugtype:cv +LIBS=nafxcrd.lib $(LIBS) !else +CPPFLAGS=$(CPPFLAGS) /Ox +LIBS=nafxcr.lib $(LIBS) +!endif -CONSOLE=1 -!include ..\ntsample.mak +.SUFFIXES : .cpp +.cpp.obj : + $(CPP) /c $(CPPFLAGS) $*.cpp templdef.exe: templdef.obj - $(LINK) $(CONFLAGS) -out:templdef.exe templdef.obj $(MFCLIB) $(CONLIBS) - -!endif + $(LINK) $(LINKFLAGS) -out:$*.exe templdef.obj $(LIBS) clean: -erase templdef.exe