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.
83 lines
3.1 KiB
83 lines
3.1 KiB
!INCLUDE $(NTMAKEENV)\makefile.plt
|
|
|
|
WHWIN32TABSRC=..\..\kmode\services.tab
|
|
WHWIN32TAB=..\whwin32\$(O)\services.tab
|
|
WIN32TAB=..\whwin32\$(O)\guisvc.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)
|
|
CXX_COMPILER_NAME=$(CXX_COMPILER_NAME) $(WOW64_COMPILER_FLAGS) -DIN=__in_wow64 -DOUT=__out_wow64
|
|
!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)
|
|
CXX_COMPILER_NAME=$(CXX_COMPILER_NAME) $(WOW64_COMPILER_FLAGS) -DIN=__in_wow64 -DOUT=__out_wow64
|
|
!else
|
|
!error no target architecture.
|
|
!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
|
|
|
|
$(WHWIN32TAB): $(WHWIN32TABSRC)
|
|
@echo Creating $(WHWIN32TAB) from $(WHWIN32TABSRC)
|
|
$(C_PREPROCESSOR_NAME) $(WOW6432_PREPROCESSOR_FLAGS) $** > $@
|
|
|
|
$(WIN32TAB): $(WHWIN32TABSRC)
|
|
$(C_PREPROCESSOR_NAME) $(WOW6432_PREPROCESSOR_FLAGS) $** > $@
|
|
|
|
$(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: $(WHWIN32TAB) $(NT32HDR) $(PPMFILE) $(WIN32TAB)
|
|
|
|
cleanfiles:
|
|
-del $(O)\winincs.pp
|
|
-del $(O)\winincs2.pp
|
|
-del $(WHWIN32TAB)
|
|
-del $(WIN32TAB)
|
|
-del $(PPMFILE)
|
|
-del $(NT32HDR)
|
|
|
|
clean: cleanfiles thunks
|