mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
3.0 KiB
84 lines
3.0 KiB
!INCLUDE $(NTMAKEENV)\makefile.plt
|
|
|
|
WHNT32TABSRC=..\..\ntos\ke\services.tab
|
|
WHNT32TAB=..\whnt32\$(O)\whnt32.tab
|
|
NT32TAB=..\whnt32\$(O)\kesvc.tab
|
|
|
|
#
|
|
# bash the 64-bit-targetted C compiler so it preprocesses using the
|
|
# 32-bit defines as we want 32-bit type information
|
|
#
|
|
!if $(IA64)
|
|
WOW64_COMPILER_FLAGS=$(CXX_COMPILER_FLAGS:_WIN64=_WIN32) -DSORTPP_PASS -DGUID_DEFINED
|
|
WOW64_COMPILER_FLAGS=$(WOW64_COMPILER_FLAGS:_M_IA64=_M_X86)
|
|
WOW64_COMPILER_FLAGS=$(WOW64_COMPILER_FLAGS:_IA64_=_X86_)
|
|
WOW64_COMPILER_FLAGS=$(WOW64_COMPILER_FLAGS:DIA64=DX86)
|
|
WOW64_COMPILER_FLAGS=$(WOW64_COMPILER_FLAGS) /U_WIN64 /Di386=1 /DBUILD_WOW6432
|
|
WOW6432_PREPROCESSOR_FLAGS=$(C_PREPROCESSOR_FLAGS:_WIN64=_WIN32)
|
|
WOW6432_PREPROCESSOR_FLAGS=$(WOW6432_PREPROCESSOR_FLAGS:_M_IA64=_M_X86)
|
|
WOW6432_PREPROCESSOR_FLAGS=$(WOW6432_PREPROCESSOR_FLAGS:_IA64_=_X86_)
|
|
WOW6432_PREPROCESSOR_FLAGS=$(WOW6432_PREPROCESSOR_FLAGS:DIA64=DX86)
|
|
WOW6432_PREPROCESSOR_FLAGS=/U_WIN64 /Di386=1 /DBUILD_WOW6432 $(WOW6432_PREPROCESSOR_FLAGS)
|
|
!elseif $(AMD64)
|
|
WOW64_COMPILER_FLAGS=$(CXX_COMPILER_FLAGS:_WIN64=_WIN32) -DSORTPP_PASS -DGUID_DEFINED
|
|
WOW64_COMPILER_FLAGS=$(WOW64_COMPILER_FLAGS:_M_AMD64=_M_X86)
|
|
WOW64_COMPILER_FLAGS=$(WOW64_COMPILER_FLAGS:_AMD64_=_X86_)
|
|
WOW64_COMPILER_FLAGS=$(WOW64_COMPILER_FLAGS:DAMD64=DX86)
|
|
WOW64_COMPILER_FLAGS=$(WOW64_COMPILER_FLAGS) /U_WIN64 /Di386=1 /DBUILD_WOW6432
|
|
WOW6432_PREPROCESSOR_FLAGS=$(C_PREPROCESSOR_FLAGS:_WIN64=_WIN32)
|
|
WOW6432_PREPROCESSOR_FLAGS=$(WOW6432_PREPROCESSOR_FLAGS:_M_AMD64=_M_X86)
|
|
WOW6432_PREPROCESSOR_FLAGS=$(WOW6432_PREPROCESSOR_FLAGS:_AMD64_=_X86_)
|
|
WOW6432_PREPROCESSOR_FLAGS=$(WOW6432_PREPROCESSOR_FLAGS:DAMD64=DX86)
|
|
WOW6432_PREPROCESSOR_FLAGS=/U_WIN64 /Di386=1 /DBUILD_WOW6432 $(WOW6432_PREPROCESSOR_FLAGS)
|
|
!else
|
|
!error no target cpu.
|
|
!endif
|
|
|
|
!if "$(WOW64_DEBUG_THUNKGEN)" == "1"
|
|
SORTPP_FLAGS=$(SORTPP_FLAGS) -l
|
|
!else
|
|
SORTPP_FLAGS=$(SORTPP_FLAGS)
|
|
!endif
|
|
|
|
PPMFILE=$(O)\winincs.ppm
|
|
NT32HDR=$(O)\nt32.h
|
|
|
|
CXX_COMPILER_NAME=$(CXX_COMPILER_NAME) $(WOW64_COMPILER_FLAGS) -noHRESULT -DIN=__in -DOUT=__out
|
|
|
|
$(WHNT32TAB): $(WHNT32TABSRC)
|
|
@echo Creating $(WHNT32TAB) from $(WHNT32TABSRC)
|
|
copy $(WHNT32TABSRC)+..\..\ntdll\wow6432\ntwow64.tab $(O)\whnt32.tmp
|
|
$(C_PREPROCESSOR_NAME) $(WOW6432_PREPROCESSOR_FLAGS) $(O)\whnt32.tmp > $(WHNT32TAB)
|
|
del $(O)\whnt32.tmp
|
|
|
|
$(NT32TAB): $(WHNT32TABSRC)
|
|
$(C_PREPROCESSOR_NAME) $(WOW6432_PREPROCESSOR_FLAGS) $(WHNT32TABSRC) > $(NT32TAB)
|
|
|
|
$(O)\winincs.pp: winincs.cpp cgenhdr.h
|
|
$(CXX_COMPILER_NAME) /C @<<$(O)\cl.rsp /E /FC winincs.cpp >$(O)\winincs2.pp
|
|
$(WOW64_COMPILER_FLAGS: =
|
|
)
|
|
<<NOKEEP
|
|
idlclean.exe $(O)\winincs2.pp $(O)\winincs2.cpp
|
|
$(CXX_COMPILER_NAME) @<<cl.rsp /E /FC $(O)\winincs2.cpp >$(O)\winincs.pp
|
|
$(WOW64_COMPILER_FLAGS: =
|
|
)
|
|
<<NOKEEP
|
|
|
|
$(PPMFILE): $(O)\winincs.pp
|
|
sortpp.exe $(SORTPP_FLAGS) -m$(PPMFILE) $(O)\winincs.pp
|
|
|
|
$(NT32HDR): $(PPMFILE)
|
|
gennt32t.exe $(PPMFILE) >$(NT32HDR)
|
|
|
|
thunks: $(WHNT32TAB) $(NT32HDR) $(PPMFILE) $(NT32TAB)
|
|
|
|
cleanfiles:
|
|
-del $(O)\winincs.pp
|
|
-del $(O)\winincs2.pp
|
|
-del $(WHNT32TAB)
|
|
-del $(NT32TAB)
|
|
-del $(PPMFILE)
|
|
-del $(NT32HDR)
|
|
|
|
clean: cleanfiles thunks
|