347 lines
7.2 KiB
Plaintext
347 lines
7.2 KiB
Plaintext
|
!include common.mkf
|
||
|
|
||
|
CS = $(CRT_BUILDDIR)\srcrel\$(CPUDIR)
|
||
|
|
||
|
!if "$(LLP64)" == "0" || "$(PA)" == "IA64" || "$(PA)" == "ALPHA64"
|
||
|
CC = cl
|
||
|
!else
|
||
|
# Doing a cross-compiler build. Make sure we use the native tools. Clear
|
||
|
# _CL_ just in case it includes -B1/-Bx/-B2 pointing to cross-compiling passes.
|
||
|
CC = $(DEVTOOLSBIN)\cl
|
||
|
_CL_=
|
||
|
!endif
|
||
|
|
||
|
DEF_NAME=msvcrt
|
||
|
DEFCPP_NAME=msvcprt
|
||
|
DEFIOS_NAME=msvcirt
|
||
|
|
||
|
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)"=="IA64" || ("$(PA)"=="x86" && "$(LLP64)"=="1")
|
||
|
|
||
|
FILES_CPU =
|
||
|
|
||
|
!elseif "$(PA)"=="x86"
|
||
|
|
||
|
FILES_CPU_DLL = \
|
||
|
$E\*\dllsupp.obj
|
||
|
|
||
|
FILES_CPU = \
|
||
|
$E\*\chkstk.obj \
|
||
|
$E\*\enable.obj \
|
||
|
$E\*\inp.obj \
|
||
|
$E\*\lldiv.obj \
|
||
|
$E\*\lldvrm.obj \
|
||
|
$E\*\llmul.obj \
|
||
|
$E\*\llrem.obj \
|
||
|
$E\*\llshl.obj \
|
||
|
$E\*\llshr.obj \
|
||
|
$E\*\memccpy.obj \
|
||
|
$E\*\memchr.obj \
|
||
|
$E\*\memcmp.obj \
|
||
|
$E\*\memcpy.obj \
|
||
|
$E\*\_memicmp.obj \
|
||
|
$E\*\memmove.obj \
|
||
|
$E\*\memset.obj \
|
||
|
$E\*\outp.obj \
|
||
|
$E\*\strcat.obj \
|
||
|
$E\*\strchr.obj \
|
||
|
$E\*\strcmp.obj \
|
||
|
$E\*\strcspn.obj \
|
||
|
$E\*\strdup.obj \
|
||
|
$E\*\_stricmp.obj \
|
||
|
$E\*\strlen.obj \
|
||
|
$E\*\strncat.obj \
|
||
|
$E\*\strncmp.obj \
|
||
|
$E\*\strncpy.obj \
|
||
|
$E\*\_strnicm.obj \
|
||
|
$E\*\strnset.obj \
|
||
|
$E\*\strpbrk.obj \
|
||
|
$E\*\strrchr.obj \
|
||
|
$E\*\strrev.obj \
|
||
|
$E\*\strset.obj \
|
||
|
$E\*\strspn.obj \
|
||
|
$E\*\strstr.obj \
|
||
|
$E\*\ulldiv.obj \
|
||
|
$E\*\ulldvrm.obj \
|
||
|
$E\*\ullrem.obj \
|
||
|
$E\*\ullshr.obj
|
||
|
|
||
|
!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\bldwin9x.bat \
|
||
|
$D\nmktobat.c
|
||
|
|
||
|
FILES_DLL_ALL = \
|
||
|
!if "$(PA)"=="x86" && "$(LLP64)"=="0"
|
||
|
$D\sample_i.rc \
|
||
|
$D\sample_p.rc \
|
||
|
$D\_sample_.rc
|
||
|
!endif
|
||
|
|
||
|
FILES_DLL_RELEASE = \
|
||
|
$(FILES_DLL_ALL) \
|
||
|
$D\sample_i.def \
|
||
|
$D\sample_p.def \
|
||
|
$E\_sample_.def
|
||
|
|
||
|
|
||
|
FILES_DLL_DEBUG = \
|
||
|
$(FILES_DLL_ALL) \
|
||
|
$D\sampld_i.def \
|
||
|
$D\sampld_p.def \
|
||
|
$E\_sampld_.def
|
||
|
|
||
|
FILES_BSKU = $E\*\bsku.obj
|
||
|
|
||
|
FILES_BST = $(FILES_BSKU:*=*st_lib)
|
||
|
|
||
|
FILES_BMT = $(FILES_BSKU:*=*mt_lib)
|
||
|
|
||
|
.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 $< $@
|
||
|
|
||
|
{$T\bst_obj}.obj{$E\bst_lib}.obj:
|
||
|
@echo Copying $< to $@
|
||
|
@copy $< $@
|
||
|
|
||
|
{$T\bst_obj}.lib{$E\bst_lib}.lib:
|
||
|
@echo Copying $< to $@
|
||
|
@copy $< $@
|
||
|
|
||
|
{$T\bmt_obj}.obj{$E\bmt_lib}.obj:
|
||
|
@echo Copying $< to $@
|
||
|
@copy $< $@
|
||
|
|
||
|
{$T\bmt_obj}.lib{$E\bmt_lib}.lib:
|
||
|
@echo Copying $< to $@
|
||
|
@copy $< $@
|
||
|
|
||
|
{$T\xbst_obj}.obj{$E\xbst_lib}.obj:
|
||
|
@echo Copying $< to $@
|
||
|
@copy $< $@
|
||
|
|
||
|
{$T\xbst_obj}.lib{$E\xbst_lib}.lib:
|
||
|
@echo Copying $< to $@
|
||
|
@copy $< $@
|
||
|
|
||
|
{$T\xbmt_obj}.obj{$E\xbmt_lib}.obj:
|
||
|
@echo Copying $< to $@
|
||
|
@copy $< $@
|
||
|
|
||
|
{$T\xbmt_obj}.lib{$E\xbmt_lib}.lib:
|
||
|
@echo Copying $< to $@
|
||
|
@copy $< $@
|
||
|
|
||
|
all: release debug
|
||
|
|
||
|
release: st mt dll $(FILES_ALL)
|
||
|
|
||
|
debug: xst xmt xdll $(FILES_ALL)
|
||
|
|
||
|
bbt: zst zmt zdll $(FILES_ALL)
|
||
|
|
||
|
book: bst bmt xbst xbmt $(FILES_ALL)
|
||
|
|
||
|
lego: bbt
|
||
|
|
||
|
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)
|
||
|
|
||
|
zst: $(FILES_LIBCST:*=z)
|
||
|
|
||
|
zmt: $(FILES_LIBCMT:*=z)
|
||
|
|
||
|
zdll: $(FILES_DLL:*=z) $(FILES_DLL_RELEASE)
|
||
|
|
||
|
bst: $(FILES_LIBCST:*=b) $(FILES_BST:*=b)
|
||
|
|
||
|
bmt: $(FILES_LIBCMT:*=b) $(FILES_BMT:*=b)
|
||
|
|
||
|
xbst: $(FILES_LIBCST:*=xb) $(FILES_BST:*=xb)
|
||
|
|
||
|
xbmt: $(FILES_LIBCMT:*=xb) $(FILES_BMT:*=xb)
|
||
|
|
||
|
$D\nmktobat.c: nmktobat.c
|
||
|
@echo Copying $** to $@
|
||
|
@copy $** $@
|
||
|
|
||
|
$D\bldnt.cmd: bldnt.cmd
|
||
|
@echo Copying $** to $@
|
||
|
@copy $** $@
|
||
|
|
||
|
$D\bldwin9x.bat: bldwin9x.bat
|
||
|
@echo Copying $** to $@
|
||
|
@copy $** $@
|
||
|
|
||
|
$D\ext_mkf: $D\makefile $(CS)\striplin.exe
|
||
|
@echo Translating $D\makefile into $@
|
||
|
@$(CS)\striplin < $D\makefile > $@
|
||
|
|
||
|
$D\ext_mkf.inc: $D\makefile.inc $(CS)\striplin.exe
|
||
|
@echo Translating $D\makefile.inc into $@
|
||
|
@$(CS)\striplin < $D\makefile.inc > $@
|
||
|
|
||
|
$D\ext_mkf.sub: $D\makefile.sub $(CS)\striplin.exe
|
||
|
@echo Translating $D\makefile.sub into $@
|
||
|
@$(CS)\striplin < $D\makefile.sub > $@
|
||
|
|
||
|
$D\_sample_.rc: _sample_.rc
|
||
|
@echo Copying $** to $@
|
||
|
@copy $** $@
|
||
|
|
||
|
$D\sample_i.rc: _sample_.rc
|
||
|
@echo Translating $** into $@
|
||
|
@sed -e "s/_SAMPLD_/SAMPLD_I/" -e "s/_SAMPLE_/SAMPLE_I/" $** > $@
|
||
|
|
||
|
$D\sample_p.rc: _sample_.rc
|
||
|
@echo Translating $** into $@
|
||
|
@sed -e "s/_SAMPLD_/SAMPLD_P/" -e "s/_SAMPLE_/SAMPLE_P/" $** > $@
|
||
|
|
||
|
$E\_sample_.def: $E\$(DEF_NAME).def $(CS)\striplin.exe
|
||
|
@echo Translating $E\$(DEF_NAME).def into $@
|
||
|
@$(CS)\striplin < $E\$(DEF_NAME).def | sed -e "s/MSVCR[0-9][0-9]D/_SAMPLD_/" -e "s/MSVCR[0-9][0-9]/_SAMPLE_/" > $@
|
||
|
|
||
|
$E\_sampld_.def: $E\$(DEF_NAME)d.def $(CS)\striplin.exe
|
||
|
@echo Translating $E\$(DEF_NAME)d.def into $@
|
||
|
@$(CS)\striplin < $E\$(DEF_NAME)d.def | sed -e "s/MSVCR[0-9][0-9]D/_SAMPLD_/" -e "s/MSVCR[0-9][0-9]/_SAMPLE_/" > $@
|
||
|
|
||
|
$D\sample_i.def: $D\$(DEFIOS_NAME).def $(CS)\striplin.exe
|
||
|
@echo Translating $D\$(DEFIOS_NAME).def into $@
|
||
|
@$(CS)\striplin < $D\$(DEFIOS_NAME).def | sed -e "s/MSVCI[0-9][0-9]D/SAMPLD_I/" -e "s/MSVCI[0-9][0-9]/SAMPLE_I/" > $@
|
||
|
|
||
|
$D\sampld_i.def: $D\$(DEFIOS_NAME)d.def $(CS)\striplin.exe
|
||
|
@echo Translating $D\$(DEFIOS_NAME)d.def into $@
|
||
|
@$(CS)\striplin < $D\$(DEFIOS_NAME)d.def | sed -e "s/MSVCI[0-9][0-9]D/SAMPLD_I/" -e "s/MSVCI[0-9][0-9]/SAMPLE_I/" > $@
|
||
|
|
||
|
$D\sample_p.def: $D\$(DEFCPP_NAME).def $(CS)\striplin.exe
|
||
|
@echo Translating $D\$(DEFCPP_NAME).def into $@
|
||
|
@$(CS)\striplin < $D\$(DEFCPP_NAME).def | sed -e "s/MSVCP[0-9][0-9]D/SAMPLD_P/" -e "s/MSVCP[0-9][0-9]/SAMPLE_P/" > $@
|
||
|
|
||
|
$D\sampld_p.def: $D\$(DEFCPP_NAME)d.def $(CS)\striplin.exe
|
||
|
@echo Translating $D\$(DEFCPP_NAME)d.def into $@
|
||
|
@$(CS)\striplin < $D\$(DEFCPP_NAME)d.def | sed -e "s/MSVCP[0-9][0-9]D/SAMPLD_P/" -e "s/MSVCP[0-9][0-9]/SAMPLE_P/" > $@
|
||
|
|
||
|
$(CS)\striplin.exe: striplin.c
|
||
|
$(CC) -nologo -Gi- -W3 -WX -Za -X -I$(DEVTOOLSINC) \
|
||
|
-Fo$(CS)\ -Fe$(CS)\ striplin.c \
|
||
|
-link -nod:libc.lib -nod:kernel32.lib \
|
||
|
$(DEVTOOLSLIB)\libc.lib $(DEVTOOLSSDKLIB)\kernel32.lib
|