PA = $(PROCESSOR_ARCHITECTURE) # Use a shorter name # if doing a 64-bit CRT build on a 32-bit system, use the native 32-bit # compiler, not a 64-bit-targetting cross-compiler !if "$(LLP64)" != "1" || "$(PA)" == "IA64" || "$(PA)" == "ALPHA64" CC = cl !else CC = $(V6TOOLS)\bin\cl !endif !if "$(PA)"=="x86" !if "$(LLP64)"=="1" CPUDIR = ia64 !else CPUDIR = intel !endif !elseif "$(PA)"=="ALPHA" !if "$(LLP64)"=="1" CPUDIR = alpha64 !else CPUDIR = alpha !endif !elseif "$(PA)"=="MIPS" CPUDIR = mips !elseif "$(PA)"=="PPC" CPUDIR = ppc !else !error objects.mkf: unknown host CPU !endif !if "$(BLD_SYSCRT)" != "1" DEF_NAME=msvcrt DEFCPP_NAME=msvcprt DEFIOS_NAME=msvcirt !else ! if "$(LLP64)" != "1" DEF_NAME=syscrt DEFCPP_NAME=sysprt DEFIOS_NAME=sysirt ! else DEF_NAME=msvcrt DEFCPP_NAME=msvcprt DEFIOS_NAME=msvcirt ! endif !endif D=$(CRT_BUILDDIR)\crt\src E=$D\$(CPUDIR) S=$(CRT_BUILDDIR)\crt\src T=$S\build\$(CPUDIR) !if "$(PA)"=="ALPHA" || "$(PA)"=="ALPHA64" FILES_CPU = !elseif "$(PA)"=="MIPS" FILES_CPU = !elseif "$(PA)"=="PPC" FILES_CPU = !elseif "$(PA)"=="x86" FILES_CPU_DLL = FILES_CPU = !endif FILES_LIBCST = $(FILES_CPU:*=*st_lib) FILES_LIBCMT = $(FILES_CPU:*=*mt_lib) FILES_DLL = $(FILES_CPU:*=*dll_lib) $(FILES_CPU_DLL:*=*dll_lib) FILES_ALL = \ $D\ext_mkf \ $D\ext_mkf.inc \ $D\ext_mkf.sub \ $D\bldnt.cmd \ $D\bldwin95.bat \ $D\nmktobat.c FILES_DLL_ALL = \ $D\sample_p.rc FILES_DLL_RELEASE = \ $(FILES_DLL_ALL) \ $D\sample_p.def FILES_DLL_DEBUG = \ $(FILES_DLL_ALL) \ $D\sampld_p.def .SUFFIXES: .SUFFIXES: .lib .obj {$T\st_obj}.obj{$E\st_lib}.obj: @echo Copying $< to $@ @copy $< $@ {$T\st_obj}.lib{$E\st_lib}.lib: @echo Copying $< to $@ @copy $< $@ {$T\st_obj}.lib{$E}.lib: @echo Copying $< to $@ @copy $< $@ {$T\xst_obj}.obj{$E\xst_lib}.obj: @echo Copying $< to $@ @copy $< $@ {$T\xst_obj}.lib{$E\xst_lib}.lib: @echo Copying $< to $@ @copy $< $@ {$T\zst_obj}.obj{$E\zst_lib}.obj: @echo Copying $< to $@ @copy $< $@ {$T\zst_obj}.lib{$E\zst_lib}.lib: @echo Copying $< to $@ @copy $< $@ {$T\mt_obj}.obj{$E\mt_lib}.obj: @echo Copying $< to $@ @copy $< $@ {$T\mt_obj}.lib{$E\mt_lib}.lib: @echo Copying $< to $@ @copy $< $@ {$T\xmt_obj}.obj{$E\xmt_lib}.obj: @echo Copying $< to $@ @copy $< $@ {$T\xmt_obj}.lib{$E\xmt_lib}.lib: @echo Copying $< to $@ @copy $< $@ {$T\zmt_obj}.obj{$E\zmt_lib}.obj: @echo Copying $< to $@ @copy $< $@ {$T\zmt_obj}.lib{$E\zmt_lib}.lib: @echo Copying $< to $@ @copy $< $@ {$T\dll_obj}.obj{$E\dll_lib}.obj: @echo Copying $< to $@ @copy $< $@ {$T\dll_obj}.lib{$E\dll_lib}.lib: @echo Copying $< to $@ @copy $< $@ {$T\dll_obj}.lib{$E}.lib: @echo Copying $< to $@ @copy $< $@ {$T\zdll_obj}.obj{$E\zdll_lib}.obj: @echo Copying $< to $@ @copy $< $@ {$T\zdll_obj}.lib{$E\zdll_lib}.lib: @echo Copying $< to $@ @copy $< $@ {$T\xdll_obj}.obj{$E\xdll_lib}.obj: @echo Copying $< to $@ @copy $< $@ {$T\xdll_obj}.lib{$E\xdll_lib}.lib: @echo Copying $< to $@ @copy $< $@ all: release debug release: st mt dll $(FILES_ALL) debug: xst xmt xdll $(FILES_ALL) st: $(FILES_LIBCST:*=) mt: $(FILES_LIBCMT:*=) dll: $(FILES_DLL:*=) $(FILES_DLL_RELEASE) xst: $(FILES_LIBCST:*=x) xmt: $(FILES_LIBCMT:*=x) xdll: $(FILES_DLL:*=x) $(FILES_DLL_DEBUG) $D\nmktobat.c: nmktobat.c @echo Copying $** to $@ @copy $** $@ $D\bldnt.cmd: bldnt.cmd @echo Copying $** to $@ @copy $** $@ $D\bldwin95.bat: bldwin95.bat @echo Copying $** to $@ @copy $** $@ $D\ext_mkf: $D\makefile striplin.exe @echo Translating $D\makefile into $@ @striplin < $D\makefile > $@ $D\ext_mkf.inc: $D\makefile.inc striplin.exe @echo Translating $D\makefile.inc into $@ @striplin < $D\makefile.inc > $@ $D\ext_mkf.sub: $D\makefile.sub striplin.exe @echo Translating $D\makefile.sub into $@ @striplin < $D\makefile.sub > $@ $D\sample_p.rc: _sample_.rc @echo Translating $** into $@ @sed -e "s/_SAMPLD_/SAMPLD_P/" -e "s/_SAMPLE_/SAMPLE_P/" $** > $@ $D\sample_p.def: $D\$(DEFCPP_NAME).def striplin.exe @echo Translating $D\$(DEFCPP_NAME).def into $@ @striplin < $D\$(DEFCPP_NAME).def | sed -e "s/MSVCP[R0-9][T0-9]D/SAMPLD_P/" -e "s/MSVCP[R0-9][T0-9]/SAMPLE_P/" > $@ $D\sampld_p.def: $D\$(DEFCPP_NAME)d.def striplin.exe @echo Translating $D\$(DEFCPP_NAME)d.def into $@ @striplin < $D\$(DEFCPP_NAME)d.def | sed -e "s/MSVCP[R0-9][T0-9]D/SAMPLD_P/" -e "s/MSVCP[R0-9][T0-9]/SAMPLE_P/" > $@ striplin.exe: striplin.c $(CC) -nologo -Gi- -W3 -WX -Za -X -I$(V6TOOLS)\include $*.c \ -link -nod:libc.lib -nod:kernel32.lib \ $(V6TOOLS)\lib\libc.lib $(V6TOOLS)\lib\kernel32.lib