mirror of
https://github.com/nillerusr/source-engine.git
synced 2024-12-22 14:16:50 +00:00
Fix Windows build with WAF
This commit is contained in:
parent
b296444d0c
commit
edbe1baceb
@ -18,13 +18,24 @@ def build(bld):
|
|||||||
source = [
|
source = [
|
||||||
'AppSystemGroup.cpp',
|
'AppSystemGroup.cpp',
|
||||||
'../public/filesystem_init.cpp',
|
'../public/filesystem_init.cpp',
|
||||||
# 'vguimatsysapp.cpp' [$WIN32]
|
|
||||||
# 'winapp.cpp' [$WIN32]
|
|
||||||
'posixapp.cpp',# [$POSIX]
|
|
||||||
'sdlmgr.cpp'# [$SDL]
|
|
||||||
# 'glmrendererinfo_osx.mm' [$OSXALL]
|
# 'glmrendererinfo_osx.mm' [$OSXALL]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if bld.env.SDL:
|
||||||
|
source += [
|
||||||
|
'sdlmgr.cpp'
|
||||||
|
]
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
source += [
|
||||||
|
'vguimatsysapp.cpp',
|
||||||
|
'winapp.cpp'
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
source += [
|
||||||
|
'posixapp.cpp',# [$POSIX]
|
||||||
|
]
|
||||||
|
|
||||||
includes = [
|
includes = [
|
||||||
'.',
|
'.',
|
||||||
'../public',
|
'../public',
|
||||||
|
@ -21,7 +21,6 @@ def build(bld):
|
|||||||
'float_bm.cpp',
|
'float_bm.cpp',
|
||||||
'float_bm2.cpp',
|
'float_bm2.cpp',
|
||||||
'float_bm3.cpp',
|
'float_bm3.cpp',
|
||||||
#'float_bm4.cpp', [$WINDOWS]
|
|
||||||
'float_bm_bilateral_filter.cpp',
|
'float_bm_bilateral_filter.cpp',
|
||||||
'float_cube.cpp',
|
'float_cube.cpp',
|
||||||
'imageformat.cpp',
|
'imageformat.cpp',
|
||||||
@ -31,6 +30,11 @@ def build(bld):
|
|||||||
'tgawriter.cpp',
|
'tgawriter.cpp',
|
||||||
'bitmap.cpp'
|
'bitmap.cpp'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
source += [
|
||||||
|
'float_bm4.cpp'
|
||||||
|
]
|
||||||
|
|
||||||
includes = [
|
includes = [
|
||||||
'.',
|
'.',
|
||||||
@ -43,6 +47,9 @@ def build(bld):
|
|||||||
defines = []
|
defines = []
|
||||||
|
|
||||||
libs = []
|
libs = []
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
libs += ['NVTC', 'ATI_COMPRESS_MT_VC10']
|
||||||
|
|
||||||
bld.stlib(
|
bld.stlib(
|
||||||
source = source,
|
source = source,
|
||||||
|
@ -24,11 +24,8 @@ def build(bld):
|
|||||||
'../common/SteamAppStartup.cpp',
|
'../common/SteamAppStartup.cpp',
|
||||||
'sys_common.cpp',
|
'sys_common.cpp',
|
||||||
'sys_ded.cpp',
|
'sys_ded.cpp',
|
||||||
#'sys_windows.cpp', [$WINDOWS]
|
|
||||||
'sys_linux.cpp', # [$POSIX]
|
|
||||||
'console/conproc.cpp',
|
'console/conproc.cpp',
|
||||||
'console/textconsole.cpp',
|
'console/textconsole.cpp',
|
||||||
'console/TextConsoleUnix.cpp', # [$POSIX]
|
|
||||||
'../filesystem/filetracker.cpp',
|
'../filesystem/filetracker.cpp',
|
||||||
'../filesystem/basefilesystem.cpp',
|
'../filesystem/basefilesystem.cpp',
|
||||||
'../filesystem/packfile.cpp',
|
'../filesystem/packfile.cpp',
|
||||||
@ -36,9 +33,19 @@ def build(bld):
|
|||||||
'../filesystem/filesystem_stdio.cpp',
|
'../filesystem/filesystem_stdio.cpp',
|
||||||
'../filesystem/QueuedLoader.cpp',
|
'../filesystem/QueuedLoader.cpp',
|
||||||
'../public/zip_utils.cpp',
|
'../public/zip_utils.cpp',
|
||||||
'../filesystem/linux_support.cpp' # [$POSIX]
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32'
|
||||||
|
source += [
|
||||||
|
'sys_windows.cpp'
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
source += [
|
||||||
|
'sys_linux.cpp', # [$POSIX]
|
||||||
|
'console/TextConsoleUnix.cpp', # [$POSIX]
|
||||||
|
'../filesystem/linux_support.cpp' # [$POSIX]
|
||||||
|
]
|
||||||
|
|
||||||
includes = [
|
includes = [
|
||||||
'.',
|
'.',
|
||||||
'../public',
|
'../public',
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
// Fix for VS 2010 build errors copied from Dota
|
// Fix for VS 2010 build errors copied from Dota
|
||||||
#if !defined( NEW_DXSDK ) && ( _MSC_VER >= 1600 )
|
#if !defined( NEW_DXSDK ) && ( _MSC_VER >= 1600 )
|
||||||
#undef KSDATAFORMAT_SUBTYPE_WAVEFORMATEX
|
#undef KSDATAFORMAT_SUBTYPE_WAVEFORMATEX
|
||||||
#undef KSDATAFORMAT_SUBTYPE_PCM
|
//#undef KSDATAFORMAT_SUBTYPE_PCM
|
||||||
#undef KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
|
#undef KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
|
||||||
#endif
|
#endif
|
||||||
#include <ksmedia.h>
|
#include <ksmedia.h>
|
||||||
|
@ -171,7 +171,6 @@ def build(bld):
|
|||||||
'sys_dll.cpp',
|
'sys_dll.cpp',
|
||||||
'sys_dll2.cpp',
|
'sys_dll2.cpp',
|
||||||
'sys_engine.cpp',
|
'sys_engine.cpp',
|
||||||
'sys_linuxwind.cpp', #[$POSIX]
|
|
||||||
'testscriptmgr.cpp',
|
'testscriptmgr.cpp',
|
||||||
'traceinit.cpp',
|
'traceinit.cpp',
|
||||||
'../public/vallocator.cpp',
|
'../public/vallocator.cpp',
|
||||||
@ -193,21 +192,34 @@ def build(bld):
|
|||||||
'EngineSoundServer.cpp',
|
'EngineSoundServer.cpp',
|
||||||
'audio/private/voice_wavefile.cpp',
|
'audio/private/voice_wavefile.cpp',
|
||||||
'audio/private/vox.cpp',
|
'audio/private/vox.cpp',
|
||||||
'audio/private/snd_posix.cpp', # [$POSIX]
|
|
||||||
#'audio/private/snd_dev_direct.cpp', [$WINDOWS]/
|
|
||||||
#'audio/private/snd_dev_wave.cpp', [$WINDOWS]/
|
|
||||||
#'audio/private/voice_mixer_controls.cpp', [$WINDOWS] /
|
|
||||||
#'audio/private/voice_record_dsound.cpp', [$WINDOWS] /
|
|
||||||
|
|
||||||
#'audio/private/snd_dev_xaudio.cpp',[$X360]
|
#'audio/private/snd_dev_xaudio.cpp',[$X360]
|
||||||
#'audio/private/snd_wave_mixer_xma.cpp', [$X360]
|
#'audio/private/snd_wave_mixer_xma.cpp', [$X360]
|
||||||
|
|
||||||
'audio/private/snd_dev_sdl.cpp', #[$SDL && !$OSXALL]
|
|
||||||
#'audio/private/snd_dev_openal.cpp', # [$OSXALL]
|
#'audio/private/snd_dev_openal.cpp', # [$OSXALL]
|
||||||
#'audio/private/snd_dev_mac_audioqueue.cpp',# [$OSXALL]
|
#'audio/private/snd_dev_mac_audioqueue.cpp',# [$OSXALL]
|
||||||
#'audio/private/voice_record_mac_audioqueue.cpp', #[$OSXALL]
|
#'audio/private/voice_record_mac_audioqueue.cpp', #[$OSXALL]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if bld.env.SDL:
|
||||||
|
source += [
|
||||||
|
'audio/private/snd_dev_sdl.cpp' #[$SDL && !$OSXALL]
|
||||||
|
]
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
source += [
|
||||||
|
'../public/tier0/memoverride.cpp',
|
||||||
|
'audio/private/snd_dev_direct.cpp',
|
||||||
|
'audio/private/snd_dev_wave.cpp',
|
||||||
|
'audio/private/voice_mixer_controls.cpp',
|
||||||
|
'audio/private/voice_record_dsound.cpp',
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
source += [
|
||||||
|
'sys_linuxwind.cpp',
|
||||||
|
'audio/private/snd_posix.cpp',
|
||||||
|
]
|
||||||
|
|
||||||
if bld.env.DEDICATED:
|
if bld.env.DEDICATED:
|
||||||
source += ['cl_null.cpp']
|
source += ['cl_null.cpp']
|
||||||
else:
|
else:
|
||||||
@ -295,8 +307,6 @@ def build(bld):
|
|||||||
'audio/private/VBRHeader.cpp', #[!$X360]
|
'audio/private/VBRHeader.cpp', #[!$X360]
|
||||||
'audio/private/voice.cpp', #[!$X360]
|
'audio/private/voice.cpp', #[!$X360]
|
||||||
'audio/private/voice_sound_engine_interface.cpp', #[!$X360]
|
'audio/private/voice_sound_engine_interface.cpp', #[!$X360]
|
||||||
'audio/private/voice_mixer_controls_openal.cpp', #[$OSXALL||$LINUXALL]
|
|
||||||
'audio/private/voice_record_openal.cpp', #[$OSXALL||$LINUXALL]
|
|
||||||
'../public/vgui_controls/vgui_controls.cpp',
|
'../public/vgui_controls/vgui_controls.cpp',
|
||||||
'../common/vgui/vgui_basebudgetpanel.cpp',
|
'../common/vgui/vgui_basebudgetpanel.cpp',
|
||||||
'../common/vgui/vgui_budgetbargraphpanel.cpp',
|
'../common/vgui/vgui_budgetbargraphpanel.cpp',
|
||||||
@ -314,6 +324,12 @@ def build(bld):
|
|||||||
'vgui_vprofpanel.cpp',
|
'vgui_vprofpanel.cpp',
|
||||||
'toolframework.cpp'
|
'toolframework.cpp'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if bld.env.DEST_OS != 'win32':
|
||||||
|
source += [
|
||||||
|
'audio/private/voice_mixer_controls_openal.cpp', #[$OSXALL||$LINUXALL]
|
||||||
|
'audio/private/voice_record_openal.cpp' #[$OSXALL||$LINUXALL]
|
||||||
|
]
|
||||||
|
|
||||||
includes = [
|
includes = [
|
||||||
'.',
|
'.',
|
||||||
@ -332,7 +348,9 @@ def build(bld):
|
|||||||
|
|
||||||
if bld.env.DEST_OS == 'android':
|
if bld.env.DEST_OS == 'android':
|
||||||
libs += ['SSL', 'CRYPTO'] # android curl was built with openssl
|
libs += ['SSL', 'CRYPTO'] # android curl was built with openssl
|
||||||
|
elif bld.env.DEST_OS == 'win32':
|
||||||
|
libs += ['USER32', 'WINMM', 'WININET', 'DSOUND', 'DXGUID', 'GDI32', 'bzip2']
|
||||||
|
|
||||||
install_path = bld.env.LIBDIR
|
install_path = bld.env.LIBDIR
|
||||||
|
|
||||||
bld.shlib(
|
bld.shlib(
|
||||||
|
@ -28,10 +28,14 @@ def build(bld):
|
|||||||
'../public/kevvaluescompiler.cpp',
|
'../public/kevvaluescompiler.cpp',
|
||||||
'../public/zip_utils.cpp',
|
'../public/zip_utils.cpp',
|
||||||
'QueuedLoader.cpp',
|
'QueuedLoader.cpp',
|
||||||
'linux_support.cpp', # [$POSIX]
|
|
||||||
'../public/tier0/memoverride.cpp'
|
'../public/tier0/memoverride.cpp'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if bld.env.DEST_OS != 'win32':
|
||||||
|
source += [
|
||||||
|
'linux_support.cpp'
|
||||||
|
]
|
||||||
|
|
||||||
includes = [
|
includes = [
|
||||||
'.',
|
'.',
|
||||||
'../public',
|
'../public',
|
||||||
@ -43,6 +47,9 @@ def build(bld):
|
|||||||
defines = []
|
defines = []
|
||||||
|
|
||||||
libs = ['tier0','tier1','tier2','vstdlib','vpklib']
|
libs = ['tier0','tier1','tier2','vstdlib','vpklib']
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
libs += ['SHELL32']
|
||||||
|
|
||||||
install_path = bld.env.LIBDIR
|
install_path = bld.env.LIBDIR
|
||||||
|
|
||||||
|
@ -66,8 +66,11 @@ def build(bld):
|
|||||||
if bld.env.DEST_OS != 'android':
|
if bld.env.DEST_OS != 'android':
|
||||||
install_path += '/'+bld.env.GAMES+'/bin'
|
install_path += '/'+bld.env.GAMES+'/bin'
|
||||||
|
|
||||||
source = [ 'touch.cpp', 'arch.c' ]
|
source = [ 'arch.c' ]
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
source += [ '../../public/tier0/memoverride.cpp' ]
|
||||||
|
libs += ['USER32']
|
||||||
|
|
||||||
if bld.env.DEST_OS == 'android':
|
if bld.env.DEST_OS == 'android':
|
||||||
source += [
|
source += [
|
||||||
'third/minizip/mz_zip.c',
|
'third/minizip/mz_zip.c',
|
||||||
|
@ -54,6 +54,8 @@ def build(bld):
|
|||||||
defines = []
|
defines = []
|
||||||
|
|
||||||
libs = ['tier0','particles','dmxloader','tier1','tier2','tier3','mathlib','vstdlib','choreoobjects','steam_api']
|
libs = ['tier0','particles','dmxloader','tier1','tier2','tier3','mathlib','vstdlib','choreoobjects','steam_api']
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
libs += ['USER32']
|
||||||
|
|
||||||
install_path = bld.env.PREFIX
|
install_path = bld.env.PREFIX
|
||||||
if bld.env.DEST_OS != 'android':
|
if bld.env.DEST_OS != 'android':
|
||||||
@ -63,6 +65,9 @@ def build(bld):
|
|||||||
includes += game["includes"]
|
includes += game["includes"]
|
||||||
defines = game["defines"]
|
defines = game["defines"]
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
source += ['../../public/tier0/memoverride.cpp']
|
||||||
|
|
||||||
defines.remove('PROTECTED_THINGS_ENABLE')
|
defines.remove('PROTECTED_THINGS_ENABLE')
|
||||||
|
|
||||||
bld.shlib(
|
bld.shlib(
|
||||||
|
@ -21,7 +21,6 @@ def build(bld):
|
|||||||
'BasePanel.cpp',
|
'BasePanel.cpp',
|
||||||
'GameConsole.cpp',
|
'GameConsole.cpp',
|
||||||
'GameUI_Interface.cpp',
|
'GameUI_Interface.cpp',
|
||||||
# 'LogoFile.cpp', [!$POSIX]
|
|
||||||
'ModInfo.cpp',
|
'ModInfo.cpp',
|
||||||
'MouseMessageForwardingPanel.cpp',
|
'MouseMessageForwardingPanel.cpp',
|
||||||
'../common/GameUI/ObjectList.cpp',
|
'../common/GameUI/ObjectList.cpp',
|
||||||
@ -66,7 +65,6 @@ def build(bld):
|
|||||||
'LoadCommentaryDialog.cpp',
|
'LoadCommentaryDialog.cpp',
|
||||||
'LoadingDialog.cpp',
|
'LoadingDialog.cpp',
|
||||||
'BaseSaveGameDialog.cpp',
|
'BaseSaveGameDialog.cpp',
|
||||||
#'ChangeGameDialog.cpp', [!$POSIX]
|
|
||||||
'CreateMultiplayerGameBotPage.cpp',
|
'CreateMultiplayerGameBotPage.cpp',
|
||||||
'CreateMultiplayerGameDialog.cpp',
|
'CreateMultiplayerGameDialog.cpp',
|
||||||
'CreateMultiplayerGameGameplayPage.cpp',
|
'CreateMultiplayerGameGameplayPage.cpp',
|
||||||
@ -87,7 +85,6 @@ def build(bld):
|
|||||||
'OptionsSubAudio.cpp',
|
'OptionsSubAudio.cpp',
|
||||||
'OptionsSubDifficulty.cpp',
|
'OptionsSubDifficulty.cpp',
|
||||||
'OptionsSubGame.cpp',
|
'OptionsSubGame.cpp',
|
||||||
#'OptionsSubHaptics.cpp', [$WIN32] [$WIN32]
|
|
||||||
'OptionsSubKeyboard.cpp',
|
'OptionsSubKeyboard.cpp',
|
||||||
'OptionsSubMouse.cpp',
|
'OptionsSubMouse.cpp',
|
||||||
'OptionsSubMultiplayer.cpp',
|
'OptionsSubMultiplayer.cpp',
|
||||||
@ -96,6 +93,14 @@ def build(bld):
|
|||||||
'OptionsSubVoice.cpp',
|
'OptionsSubVoice.cpp',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
source += [
|
||||||
|
'../public/tier0/memoverride.cpp',
|
||||||
|
'LogoFile.cpp',
|
||||||
|
'ChangeGameDialog.cpp',
|
||||||
|
'OptionsSubHaptics.cpp'
|
||||||
|
]
|
||||||
|
|
||||||
includes = [
|
includes = [
|
||||||
'.',
|
'.',
|
||||||
'../public',
|
'../public',
|
||||||
@ -109,6 +114,9 @@ def build(bld):
|
|||||||
|
|
||||||
libs = ['tier0','vgui_controls','tier1','tier2','tier3','vstdlib','vtf','bitmap','mathlib','SDL2','steam_api','matsys_controls','JPEG','PNG','ZLIB']
|
libs = ['tier0','vgui_controls','tier1','tier2','tier3','vstdlib','vtf','bitmap','mathlib','SDL2','steam_api','matsys_controls','JPEG','PNG','ZLIB']
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
libs += ['USER32', 'GDI32']
|
||||||
|
|
||||||
install_path = bld.env.LIBDIR
|
install_path = bld.env.LIBDIR
|
||||||
|
|
||||||
bld.shlib(
|
bld.shlib(
|
||||||
|
@ -19,11 +19,15 @@ def build(bld):
|
|||||||
'inputsystem.cpp',
|
'inputsystem.cpp',
|
||||||
'joystick_sdl.cpp',
|
'joystick_sdl.cpp',
|
||||||
'touch_sdl.cpp',
|
'touch_sdl.cpp',
|
||||||
#'novint.cpp', # [$WIN32]
|
|
||||||
'key_translation.cpp',
|
'key_translation.cpp',
|
||||||
'steamcontroller.cpp'
|
'steamcontroller.cpp'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
source += [
|
||||||
|
'novint.cpp'
|
||||||
|
]
|
||||||
|
|
||||||
includes = [
|
includes = [
|
||||||
'.',
|
'.',
|
||||||
'../common',
|
'../common',
|
||||||
@ -35,6 +39,9 @@ def build(bld):
|
|||||||
|
|
||||||
libs = ['tier0','tier1','tier2','vstdlib','SDL2','steam_api']
|
libs = ['tier0','tier1','tier2','vstdlib','SDL2','steam_api']
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
libs += ['USER32']
|
||||||
|
|
||||||
install_path = bld.env.LIBDIR
|
install_path = bld.env.LIBDIR
|
||||||
|
|
||||||
bld.shlib(
|
bld.shlib(
|
||||||
|
2
ivp
2
ivp
@ -1 +1 @@
|
|||||||
Subproject commit 82849306f728db57868d7a82fe7bcff333eb468c
|
Subproject commit 5dc57228f12ac1deca3bb2d20ef3eaa290d65586
|
@ -19,9 +19,13 @@ def build(bld):
|
|||||||
'../public/filesystem_init.cpp',
|
'../public/filesystem_init.cpp',
|
||||||
'launcher.cpp',
|
'launcher.cpp',
|
||||||
'reslistgenerator.cpp',
|
'reslistgenerator.cpp',
|
||||||
'android.cpp'
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'android':
|
||||||
|
source += [
|
||||||
|
'android.cpp'
|
||||||
|
]
|
||||||
|
|
||||||
includes = [
|
includes = [
|
||||||
'.',
|
'.',
|
||||||
'../public',
|
'../public',
|
||||||
@ -33,6 +37,9 @@ def build(bld):
|
|||||||
defines = []
|
defines = []
|
||||||
|
|
||||||
libs = ['tier0','tier1','tier2','tier3','vstdlib','steam_api','appframework','SDL2','togl']
|
libs = ['tier0','tier1','tier2','tier3','vstdlib','steam_api','appframework','SDL2','togl']
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
libs += ['USER32', 'OLE32', 'SHELL32']
|
||||||
|
|
||||||
install_path = bld.env.LIBDIR
|
install_path = bld.env.LIBDIR
|
||||||
|
|
||||||
|
@ -18,9 +18,13 @@ def configure(conf):
|
|||||||
#'PROTECTED_THINGS_ENABLE', # conflicts with stlport
|
#'PROTECTED_THINGS_ENABLE', # conflicts with stlport
|
||||||
'strncpy=use_Q_strncpy_instead',
|
'strncpy=use_Q_strncpy_instead',
|
||||||
'_snprintf=use_Q_snprintf_instead',
|
'_snprintf=use_Q_snprintf_instead',
|
||||||
'GL_GLEXT_PROTOTYPES',
|
|
||||||
'DX_TO_GL_ABSTRACTION'
|
|
||||||
])
|
])
|
||||||
|
|
||||||
|
if conf.env.DEST_OS == 'win32' and not conf.env.GL:
|
||||||
|
conf.env.append_unique('DEFINES',[
|
||||||
|
'USE_ACTUAL_DX',
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
def build(bld):
|
def build(bld):
|
||||||
source = [
|
source = [
|
||||||
@ -29,7 +33,6 @@ def build(bld):
|
|||||||
'hardwareconfig.cpp',
|
'hardwareconfig.cpp',
|
||||||
'meshbase.cpp',
|
'meshbase.cpp',
|
||||||
'meshdx8.cpp',
|
'meshdx8.cpp',
|
||||||
#'recording.cpp', [$WIN32 && !$GL]
|
|
||||||
'shaderapidx8.cpp',
|
'shaderapidx8.cpp',
|
||||||
'shaderdevicebase.cpp',
|
'shaderdevicebase.cpp',
|
||||||
'shaderapibase.cpp',
|
'shaderapibase.cpp',
|
||||||
@ -40,11 +43,20 @@ def build(bld):
|
|||||||
'cvballoctracker.cpp',
|
'cvballoctracker.cpp',
|
||||||
'vertexdecl.cpp',
|
'vertexdecl.cpp',
|
||||||
'vertexshaderdx8.cpp',
|
'vertexshaderdx8.cpp',
|
||||||
#'wmi.cpp', [$WIN32 && !$GL]
|
|
||||||
#'textureheap.cpp', [$X360]
|
#'textureheap.cpp', [$X360]
|
||||||
'winutils.cpp'# [!$WIN32]
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32' and not bld.env.GL:
|
||||||
|
source += [
|
||||||
|
'recording.cpp',
|
||||||
|
'wmi.cpp'
|
||||||
|
]
|
||||||
|
|
||||||
|
if bld.env.DEST_OS != 'win32':
|
||||||
|
source += ['winutils.cpp']
|
||||||
|
else:
|
||||||
|
source += ['../../public/tier0/memoverride.cpp']
|
||||||
|
|
||||||
includes = [
|
includes = [
|
||||||
'.',
|
'.',
|
||||||
'../../public',
|
'../../public',
|
||||||
@ -60,7 +72,9 @@ def build(bld):
|
|||||||
|
|
||||||
if bld.env.DEST_OS == 'android':
|
if bld.env.DEST_OS == 'android':
|
||||||
libs += ['ANDROID_SUPPORT']
|
libs += ['ANDROID_SUPPORT']
|
||||||
|
elif bld.env.DEST_OS == 'win32' and not bld.env.GL:
|
||||||
|
libs += ['D3D9', 'D3DX9', 'bzip2']
|
||||||
|
|
||||||
install_path = bld.env.LIBDIR
|
install_path = bld.env.LIBDIR
|
||||||
|
|
||||||
bld.shlib(
|
bld.shlib(
|
||||||
|
@ -447,7 +447,8 @@ extern "C"
|
|||||||
|
|
||||||
void CShaderSystem::VerifyBaseShaderDLL( CSysModule *pModule )
|
void CShaderSystem::VerifyBaseShaderDLL( CSysModule *pModule )
|
||||||
{
|
{
|
||||||
#if defined( _WIN32 ) && !defined( _X360 )
|
//#if defined( _WIN32 ) && !defined( _X360 )
|
||||||
|
#if 0
|
||||||
const char *pErrorStr = "Corrupt save data settings.";
|
const char *pErrorStr = "Corrupt save data settings.";
|
||||||
|
|
||||||
unsigned char *testData1 = new unsigned char[SHADER_DLL_VERIFY_DATA_LEN1];
|
unsigned char *testData1 = new unsigned char[SHADER_DLL_VERIFY_DATA_LEN1];
|
||||||
|
@ -47,6 +47,9 @@ def build(bld):
|
|||||||
'ctexturecompositor.cpp'
|
'ctexturecompositor.cpp'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
source += ['../public/tier0/memoverride.cpp']
|
||||||
|
|
||||||
includes = [
|
includes = [
|
||||||
'.',
|
'.',
|
||||||
'../../public',
|
'../../public',
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#ifdef IS_WINDOWS_PC
|
#ifdef IS_WINDOWS_PC
|
||||||
// ETW support should be compiled in for all Windows PC platforms. It isn't
|
// ETW support should be compiled in for all Windows PC platforms. It isn't
|
||||||
// supported on Windows XP but that is determined at run-time.
|
// supported on Windows XP but that is determined at run-time.
|
||||||
#define ETW_MARKS_ENABLED
|
//#define ETW_MARKS_ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ETW_MARKS_ENABLED
|
#ifdef ETW_MARKS_ENABLED
|
||||||
|
@ -47,13 +47,13 @@ LINKFLAGS = {
|
|||||||
CFLAGS = {
|
CFLAGS = {
|
||||||
'common': {
|
'common': {
|
||||||
# disable thread-safe local static initialization for C++11 code, as it cause crashes on Windows XP
|
# disable thread-safe local static initialization for C++11 code, as it cause crashes on Windows XP
|
||||||
'msvc': ['/D_USING_V110_SDK71_', '/Zi', '/FS', '/Zc:threadSafeInit-', '/MT'],
|
'msvc': ['/D_USING_V110_SDK71_', '/Zi', '/FS', '/Zc:threadSafeInit-'],
|
||||||
'clang': ['-g', '-gdwarf-2', '-fvisibility=hidden'],
|
'clang': ['-g', '-gdwarf-2', '-fvisibility=hidden'],
|
||||||
'gcc': ['-g', '-fvisibility=hidden'],
|
'gcc': ['-g', '-fvisibility=hidden'],
|
||||||
'owcc': ['-fno-short-enum', '-ffloat-store', '-g3']
|
'owcc': ['-fno-short-enum', '-ffloat-store', '-g3']
|
||||||
},
|
},
|
||||||
'fast': {
|
'fast': {
|
||||||
'msvc': ['/O2', '/Oy'],
|
'msvc': ['/O2', '/Oy', '/MT'],
|
||||||
'gcc': {
|
'gcc': {
|
||||||
'3': ['-O3', '-fomit-frame-pointer'],
|
'3': ['-O3', '-fomit-frame-pointer'],
|
||||||
'default': ['-Ofast', '-funsafe-math-optimizations', '-funsafe-loop-optimizations', '-fomit-frame-pointer']
|
'default': ['-Ofast', '-funsafe-math-optimizations', '-funsafe-loop-optimizations', '-fomit-frame-pointer']
|
||||||
@ -62,23 +62,23 @@ CFLAGS = {
|
|||||||
'default': ['-O3']
|
'default': ['-O3']
|
||||||
},
|
},
|
||||||
'fastnative': {
|
'fastnative': {
|
||||||
'msvc': ['/O2', '/Oy'],
|
'msvc': ['/O2', '/Oy', '/MT'],
|
||||||
'gcc': ['-Ofast', '-march=native', '-funsafe-math-optimizations', '-funsafe-loop-optimizations', '-fomit-frame-pointer'],
|
'gcc': ['-Ofast', '-march=native', '-funsafe-math-optimizations', '-funsafe-loop-optimizations', '-fomit-frame-pointer'],
|
||||||
'clang': ['-Ofast', '-march=native'],
|
'clang': ['-Ofast', '-march=native'],
|
||||||
'default': ['-O3']
|
'default': ['-O3']
|
||||||
},
|
},
|
||||||
'release': {
|
'release': {
|
||||||
'msvc': ['/O2'],
|
'msvc': ['/O2', '/MT'],
|
||||||
'owcc': ['-O3', '-foptimize-sibling-calls', '-fomit-leaf-frame-pointer', '-fomit-frame-pointer', '-fschedule-insns', '-funsafe-math-optimizations', '-funroll-loops', '-frerun-optimizer', '-finline-functions', '-finline-limit=512', '-fguess-branch-probability', '-fno-strict-aliasing', '-floop-optimize'],
|
'owcc': ['-O3', '-foptimize-sibling-calls', '-fomit-leaf-frame-pointer', '-fomit-frame-pointer', '-fschedule-insns', '-funsafe-math-optimizations', '-funroll-loops', '-frerun-optimizer', '-finline-functions', '-finline-limit=512', '-fguess-branch-probability', '-fno-strict-aliasing', '-floop-optimize'],
|
||||||
'default': ['-O3']
|
'default': ['-O3']
|
||||||
},
|
},
|
||||||
'debug': {
|
'debug': {
|
||||||
'msvc': ['/Od'],
|
'msvc': ['/Od', '/MTd'],
|
||||||
'owcc': ['-O0', '-fno-omit-frame-pointer', '-funwind-tables', '-fno-omit-leaf-frame-pointer'],
|
'owcc': ['-O0', '-fno-omit-frame-pointer', '-funwind-tables', '-fno-omit-leaf-frame-pointer'],
|
||||||
'default': ['-O0']
|
'default': ['-O0']
|
||||||
},
|
},
|
||||||
'sanitize': {
|
'sanitize': {
|
||||||
'msvc': ['/Od', '/RTC1'],
|
'msvc': ['/Od', '/RTC1', '/MT'],
|
||||||
'gcc': ['-Og', '-fsanitize=undefined', '-fsanitize=address'],
|
'gcc': ['-Og', '-fsanitize=undefined', '-fsanitize=address'],
|
||||||
'clang': ['-O0', '-fsanitize=undefined', '-fsanitize=address'],
|
'clang': ['-O0', '-fsanitize=undefined', '-fsanitize=address'],
|
||||||
'default': ['-O0']
|
'default': ['-O0']
|
||||||
|
@ -43,6 +43,11 @@ def build(bld):
|
|||||||
'../common/ServerBrowser/blacklisted_server_manager.cpp'
|
'../common/ServerBrowser/blacklisted_server_manager.cpp'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
source += [
|
||||||
|
'../public/tier0/memoverride.cpp'
|
||||||
|
]
|
||||||
|
|
||||||
includes = [
|
includes = [
|
||||||
'.',
|
'.',
|
||||||
'../public',
|
'../public',
|
||||||
|
@ -24,6 +24,9 @@ def build(bld):
|
|||||||
'../public/SoundParametersInternal.cpp'
|
'../public/SoundParametersInternal.cpp'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
source += ['../public/tier0/memoverride.cpp']
|
||||||
|
|
||||||
includes = [
|
includes = [
|
||||||
'.',
|
'.',
|
||||||
'../public',
|
'../public',
|
||||||
|
@ -121,4 +121,6 @@ END
|
|||||||
// ETW event manifest data from ValveETWProviders.man
|
// ETW event manifest data from ValveETWProviders.man
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#if 0
|
||||||
#include "ValveETWProviderEvents.rc"
|
#include "ValveETWProviderEvents.rc"
|
||||||
|
#endif
|
@ -18,15 +18,12 @@ def configure(conf):
|
|||||||
def build(bld):
|
def build(bld):
|
||||||
source = [
|
source = [
|
||||||
'assert_dialog.cpp',
|
'assert_dialog.cpp',
|
||||||
#'assert_dialog.rc', [$WINDOWS]
|
|
||||||
'commandline.cpp',
|
'commandline.cpp',
|
||||||
'cpu.cpp',
|
'cpu.cpp',
|
||||||
'cpumonitoring.cpp',
|
'cpumonitoring.cpp',
|
||||||
'cpu_posix.cpp', #[$POSIX]
|
|
||||||
'cpu_usage.cpp',
|
'cpu_usage.cpp',
|
||||||
'dbg.cpp',
|
'dbg.cpp',
|
||||||
'dynfunction.cpp',
|
'dynfunction.cpp',
|
||||||
#'etwprof.cpp', [$WINDOWS]
|
|
||||||
'fasttimer.cpp',
|
'fasttimer.cpp',
|
||||||
# 'InterlockedCompareExchange128.masm', [$WIN64]
|
# 'InterlockedCompareExchange128.masm', [$WIN64]
|
||||||
'mem.cpp',
|
'mem.cpp',
|
||||||
@ -36,11 +33,7 @@ def build(bld):
|
|||||||
'memvalidate.cpp',
|
'memvalidate.cpp',
|
||||||
'minidump.cpp',
|
'minidump.cpp',
|
||||||
'pch_tier0.cpp',
|
'pch_tier0.cpp',
|
||||||
#'platform.cpp', [$WINDOWS||$X360]
|
|
||||||
'platform_posix.cpp', # [$POSIX]
|
|
||||||
#'pmc360.cpp', [$X360]
|
#'pmc360.cpp', [$X360]
|
||||||
#'pme.cpp', [$WINDOWS]
|
|
||||||
'pme_posix.cpp', # [$POSIX]
|
|
||||||
'PMELib.cpp', #[$WINDOWS||$POSIX]
|
'PMELib.cpp', #[$WINDOWS||$POSIX]
|
||||||
'progressbar.cpp',
|
'progressbar.cpp',
|
||||||
'security.cpp',
|
'security.cpp',
|
||||||
@ -50,12 +43,26 @@ def build(bld):
|
|||||||
'threadtools.cpp',
|
'threadtools.cpp',
|
||||||
'tier0_strtools.cpp',
|
'tier0_strtools.cpp',
|
||||||
'tslist.cpp',
|
'tslist.cpp',
|
||||||
#'vcrmode.cpp', #[$WINDOWS]
|
|
||||||
'vcrmode_posix.cpp', #[$POSIX]
|
|
||||||
'vprof.cpp',
|
'vprof.cpp',
|
||||||
# 'win32consoleio.cpp', [$WINDOWS]
|
|
||||||
#'../tier1/pathmatch.cpp' # [$LINUXALL]
|
#'../tier1/pathmatch.cpp' # [$LINUXALL]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
source += [
|
||||||
|
'assert_dialog.rc',
|
||||||
|
#'etwprof.cpp', [$WINDOWS]
|
||||||
|
'platform.cpp',
|
||||||
|
'pme.cpp',
|
||||||
|
'vcrmode.cpp',
|
||||||
|
'win32consoleio.cpp'
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
source += [
|
||||||
|
'cpu_posix.cpp',
|
||||||
|
'platform_posix.cpp',
|
||||||
|
'pme_posix.cpp',
|
||||||
|
'vcrmode_posix.cpp'
|
||||||
|
]
|
||||||
|
|
||||||
includes = [
|
includes = [
|
||||||
'.',
|
'.',
|
||||||
@ -65,7 +72,10 @@ def build(bld):
|
|||||||
|
|
||||||
defines = []
|
defines = []
|
||||||
|
|
||||||
libs = ['DL', 'M', 'LOG']
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
libs = ['ADVAPI32', 'WS2_32']
|
||||||
|
else:
|
||||||
|
libs = ['DL', 'M', 'LOG']
|
||||||
|
|
||||||
install_path = bld.env.LIBDIR
|
install_path = bld.env.LIBDIR
|
||||||
|
|
||||||
|
@ -40,10 +40,6 @@ def build(bld):
|
|||||||
'memstack.cpp',
|
'memstack.cpp',
|
||||||
'NetAdr.cpp',
|
'NetAdr.cpp',
|
||||||
'newbitbuf.cpp',
|
'newbitbuf.cpp',
|
||||||
# 'pathmatch.cpp', # [$LINUXALL]
|
|
||||||
# 'processor_detect.cpp', # [$WINDOWS||$X360]
|
|
||||||
'processor_detect_linux.cpp', # [$POSIX]
|
|
||||||
'qsort_s.cpp', # [$LINUXALL||$PS3]
|
|
||||||
'rangecheckedvar.cpp',
|
'rangecheckedvar.cpp',
|
||||||
'reliabletimer.cpp',
|
'reliabletimer.cpp',
|
||||||
'snappy-sinksource.cpp',
|
'snappy-sinksource.cpp',
|
||||||
@ -64,6 +60,17 @@ def build(bld):
|
|||||||
'utlsymbol.cpp'
|
'utlsymbol.cpp'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
source += [
|
||||||
|
'processor_detect.cpp',
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
source += [
|
||||||
|
#'pathmatch.cpp',
|
||||||
|
'processor_detect_linux.cpp',
|
||||||
|
'qsort_s.cpp',
|
||||||
|
]
|
||||||
|
|
||||||
includes = [
|
includes = [
|
||||||
'.',
|
'.',
|
||||||
'../public',
|
'../public',
|
||||||
@ -75,7 +82,9 @@ def build(bld):
|
|||||||
defines = []
|
defines = []
|
||||||
|
|
||||||
libs = []
|
libs = []
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
libs += ['RPCRT4']
|
||||||
|
|
||||||
bld.stlib(
|
bld.stlib(
|
||||||
source = source,
|
source = source,
|
||||||
target = PROJECT_NAME,
|
target = PROJECT_NAME,
|
||||||
|
@ -12,8 +12,8 @@ def options(opt):
|
|||||||
return
|
return
|
||||||
|
|
||||||
def configure(conf):
|
def configure(conf):
|
||||||
conf.env.append_unique('CFLAGS',['-std=gnu11'])
|
if conf.env.DEST_OS != 'win32':
|
||||||
|
conf.env.append_unique('CFLAGS',['-std=gnu11'])
|
||||||
|
|
||||||
def build(bld):
|
def build(bld):
|
||||||
source = [
|
source = [
|
||||||
@ -39,8 +39,6 @@ def build(bld):
|
|||||||
|
|
||||||
libs = []
|
libs = []
|
||||||
|
|
||||||
install_path = bld.env.PREFIX
|
|
||||||
|
|
||||||
bld.stlib(
|
bld.stlib(
|
||||||
source = source,
|
source = source,
|
||||||
target = PROJECT_NAME,
|
target = PROJECT_NAME,
|
||||||
@ -49,7 +47,6 @@ def build(bld):
|
|||||||
includes = includes,
|
includes = includes,
|
||||||
defines = defines,
|
defines = defines,
|
||||||
use = libs,
|
use = libs,
|
||||||
install_path = install_path,
|
|
||||||
subsystem = bld.env.MSVC_SUBSYSTEM,
|
subsystem = bld.env.MSVC_SUBSYSTEM,
|
||||||
idx = bld.get_taskgen_count()
|
idx = bld.get_taskgen_count()
|
||||||
)
|
)
|
||||||
|
@ -28,9 +28,6 @@ def build(bld):
|
|||||||
'MemoryBitmap.cpp',
|
'MemoryBitmap.cpp',
|
||||||
'MessageListener.cpp',
|
'MessageListener.cpp',
|
||||||
'Scheme.cpp',
|
'Scheme.cpp',
|
||||||
#'Surface.cpp', [$WIN32]
|
|
||||||
#'System.cpp', [$WINDOWS||$X360]
|
|
||||||
'system_posix.cpp',# [$POSIX]
|
|
||||||
'../../public/UnicodeFileHelpers.cpp',
|
'../../public/UnicodeFileHelpers.cpp',
|
||||||
'vgui.cpp',
|
'vgui.cpp',
|
||||||
'vgui_internal.cpp',
|
'vgui_internal.cpp',
|
||||||
@ -40,6 +37,17 @@ def build(bld):
|
|||||||
'keyrepeat.cpp'
|
'keyrepeat.cpp'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
source += [
|
||||||
|
'Surface.cpp',
|
||||||
|
'System.cpp',
|
||||||
|
'../../public/tier0/memoverride.cpp'
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
source += [
|
||||||
|
'system_posix.cpp'
|
||||||
|
]
|
||||||
|
|
||||||
includes = [
|
includes = [
|
||||||
'.',
|
'.',
|
||||||
'../../public',
|
'../../public',
|
||||||
@ -52,6 +60,9 @@ def build(bld):
|
|||||||
|
|
||||||
libs = ['tier0','tier1','tier2','tier3','vstdlib','SDL2']
|
libs = ['tier0','tier1','tier2','tier3','vstdlib','SDL2']
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
libs += ['USER32', 'IMM32', 'GDI32', 'SHELL32', 'OLE32', 'SHLWAPI', 'vgui_surfacelib', 'WINMM']
|
||||||
|
|
||||||
install_path = bld.env.LIBDIR
|
install_path = bld.env.LIBDIR
|
||||||
|
|
||||||
bld.shlib(
|
bld.shlib(
|
||||||
|
@ -106,6 +106,9 @@ def build(bld):
|
|||||||
|
|
||||||
libs = []
|
libs = []
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
libs += ['SHELL32']
|
||||||
|
|
||||||
bld.stlib(
|
bld.stlib(
|
||||||
source = source,
|
source = source,
|
||||||
target = PROJECT_NAME,
|
target = PROJECT_NAME,
|
||||||
|
@ -20,11 +20,18 @@ def build(bld):
|
|||||||
'FontAmalgam.cpp',
|
'FontAmalgam.cpp',
|
||||||
'FontManager.cpp',
|
'FontManager.cpp',
|
||||||
'FontEffects.cpp',
|
'FontEffects.cpp',
|
||||||
#'Win32Font.cpp', [$WIN32 && !$X360]
|
|
||||||
#'Win32Font_x360.cpp', [$X360]
|
#'Win32Font_x360.cpp', [$X360]
|
||||||
#'osxfont.cpp', [$OSXALL]
|
#'osxfont.cpp', [$OSXALL]
|
||||||
'linuxfont.cpp' # [$LINUXALL]
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
source += [
|
||||||
|
'Win32Font.cpp'
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
source += [
|
||||||
|
'linuxfont.cpp'
|
||||||
|
]
|
||||||
|
|
||||||
includes = [
|
includes = [
|
||||||
'.',
|
'.',
|
||||||
|
@ -27,12 +27,17 @@ def build(bld):
|
|||||||
'Input.cpp',
|
'Input.cpp',
|
||||||
'MatSystemSurface.cpp',
|
'MatSystemSurface.cpp',
|
||||||
'asanstubs.cpp',
|
'asanstubs.cpp',
|
||||||
#'memorybitmap.cpp', [$WIN32]
|
|
||||||
'TextureDictionary.cpp',
|
'TextureDictionary.cpp',
|
||||||
'../vgui2/src/vgui_key_translation.cpp',
|
'../vgui2/src/vgui_key_translation.cpp',
|
||||||
'../public/vgui_controls/vgui_controls.cpp'
|
'../public/vgui_controls/vgui_controls.cpp'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
source += [
|
||||||
|
'../public/tier0/memoverride.cpp',
|
||||||
|
'memorybitmap.cpp'
|
||||||
|
]
|
||||||
|
|
||||||
includes = [
|
includes = [
|
||||||
'.',
|
'.',
|
||||||
'../public',
|
'../public',
|
||||||
@ -47,6 +52,8 @@ def build(bld):
|
|||||||
|
|
||||||
if bld.env.DEST_OS == 'android':
|
if bld.env.DEST_OS == 'android':
|
||||||
libs += ['EXPAT']
|
libs += ['EXPAT']
|
||||||
|
elif bld.env.DEST_OS == 'win32':
|
||||||
|
libs += ['USER32', 'GDI32']
|
||||||
|
|
||||||
install_path = bld.env.LIBDIR
|
install_path = bld.env.LIBDIR
|
||||||
|
|
||||||
|
@ -31,6 +31,9 @@ def build(bld):
|
|||||||
|
|
||||||
libs = ['tier0','tier1','tier2','tier3','vstdlib']
|
libs = ['tier0','tier1','tier2','tier3','vstdlib']
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
libs += ['USER32']
|
||||||
|
|
||||||
install_path = bld.env.LIBDIR
|
install_path = bld.env.LIBDIR
|
||||||
|
|
||||||
bld.shlib(
|
bld.shlib(
|
||||||
|
@ -22,11 +22,15 @@ def build(bld):
|
|||||||
'jobthread.cpp',
|
'jobthread.cpp',
|
||||||
'KeyValuesSystem.cpp',
|
'KeyValuesSystem.cpp',
|
||||||
'osversion.cpp',
|
'osversion.cpp',
|
||||||
#'processutils.cpp' # [$WINDOWS]
|
|
||||||
'random.cpp',
|
'random.cpp',
|
||||||
'vcover.cpp',
|
'vcover.cpp',
|
||||||
'../public/tier0/memoverride.cpp'
|
'../public/tier0/memoverride.cpp'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
source += [
|
||||||
|
'processutils.cpp'
|
||||||
|
]
|
||||||
|
|
||||||
includes = [
|
includes = [
|
||||||
'.',
|
'.',
|
||||||
|
@ -17,11 +17,15 @@ def configure(conf):
|
|||||||
def build(bld):
|
def build(bld):
|
||||||
source = [
|
source = [
|
||||||
'convert_x360.cpp',
|
'convert_x360.cpp',
|
||||||
#$File "s3tc_decode.cpp" # [$WINDOWS]
|
|
||||||
'vtf.cpp'
|
'vtf.cpp'
|
||||||
#$File "vtf_x360.cpp"# [$X360]
|
#$File "vtf_x360.cpp"# [$X360]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
source += [
|
||||||
|
's3tc_decode.cpp'
|
||||||
|
]
|
||||||
|
|
||||||
includes = [
|
includes = [
|
||||||
'.',
|
'.',
|
||||||
'../public',
|
'../public',
|
||||||
|
180
wscript
180
wscript
@ -153,7 +153,6 @@ def define_platform(conf):
|
|||||||
if conf.options.TOGLES:
|
if conf.options.TOGLES:
|
||||||
conf.env.append_unique('DEFINES', ['TOGLES'])
|
conf.env.append_unique('DEFINES', ['TOGLES'])
|
||||||
|
|
||||||
|
|
||||||
if conf.options.SDL:
|
if conf.options.SDL:
|
||||||
conf.define('USE_SDL', 1)
|
conf.define('USE_SDL', 1)
|
||||||
|
|
||||||
@ -166,8 +165,7 @@ def define_platform(conf):
|
|||||||
'NO_HOOK_MALLOC',
|
'NO_HOOK_MALLOC',
|
||||||
'_DLL_EXT=.so'
|
'_DLL_EXT=.so'
|
||||||
])
|
])
|
||||||
|
elif conf.env.DEST_OS == 'android':
|
||||||
if conf.env.DEST_OS == 'android':
|
|
||||||
conf.env.append_unique('DEFINES', [
|
conf.env.append_unique('DEFINES', [
|
||||||
'ANDROID=1', '_ANDROID=1',
|
'ANDROID=1', '_ANDROID=1',
|
||||||
'LINUX=1', '_LINUX=1',
|
'LINUX=1', '_LINUX=1',
|
||||||
@ -176,8 +174,20 @@ def define_platform(conf):
|
|||||||
'NO_HOOK_MALLOC',
|
'NO_HOOK_MALLOC',
|
||||||
'_DLL_EXT=.so'
|
'_DLL_EXT=.so'
|
||||||
])
|
])
|
||||||
|
elif conf.env.DEST_OS == 'win32':
|
||||||
|
conf.env.append_unique('DEFINES', [
|
||||||
|
'WIN32=1', '_WIN32=1',
|
||||||
|
'_WINDOWS',
|
||||||
|
'_DLL_EXT=.dll',
|
||||||
|
'_CRT_SECURE_NO_DEPRECATE',
|
||||||
|
'_CRT_NONSTDC_NO_DEPRECATE',
|
||||||
|
'_ALLOW_RUNTIME_LIBRARY_MISMATCH',
|
||||||
|
'_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH',
|
||||||
|
'_ALLOW_MSC_VER_MISMATCH',
|
||||||
|
'NO_X360_XDK'
|
||||||
|
])
|
||||||
|
|
||||||
if conf.options.DEBUG_ENGINE:
|
if conf.options.DEBUG_ENGINE or conf.options.BUILD_TYPE == 'debug':
|
||||||
conf.env.append_unique('DEFINES', [
|
conf.env.append_unique('DEFINES', [
|
||||||
'DEBUG', '_DEBUG'
|
'DEBUG', '_DEBUG'
|
||||||
])
|
])
|
||||||
@ -198,10 +208,10 @@ def options(opt):
|
|||||||
grp.add_option('-D', '--debug-engine', action = 'store_true', dest = 'DEBUG_ENGINE', default = False,
|
grp.add_option('-D', '--debug-engine', action = 'store_true', dest = 'DEBUG_ENGINE', default = False,
|
||||||
help = 'build with -DDEBUG [default: %default]')
|
help = 'build with -DDEBUG [default: %default]')
|
||||||
|
|
||||||
grp.add_option('--use-sdl', action = 'store', dest = 'SDL', type = 'int', default = True,
|
grp.add_option('--use-sdl', action = 'store', dest = 'SDL', type = 'int', default = sys.platform != 'win32',
|
||||||
help = 'build engine with SDL [default: %default]')
|
help = 'build engine with SDL [default: %default]')
|
||||||
|
|
||||||
grp.add_option('--use-togl', action = 'store', dest = 'GL', type = 'int', default = True,
|
grp.add_option('--use-togl', action = 'store', dest = 'GL', type = 'int', default = sys.platform != 'win32',
|
||||||
help = 'build engine with ToGL [default: %default]')
|
help = 'build engine with ToGL [default: %default]')
|
||||||
|
|
||||||
grp.add_option('--build-games', action = 'store', dest = 'GAMES', type = 'string', default = 'hl2',
|
grp.add_option('--build-games', action = 'store', dest = 'GAMES', type = 'string', default = 'hl2',
|
||||||
@ -223,7 +233,7 @@ def options(opt):
|
|||||||
opt.load('reconfigure')
|
opt.load('reconfigure')
|
||||||
|
|
||||||
def configure(conf):
|
def configure(conf):
|
||||||
conf.load('fwgslib reconfigure')
|
conf.load('fwgslib reconfigure compiler_optimizations')
|
||||||
|
|
||||||
# Force XP compability, all build targets should add
|
# Force XP compability, all build targets should add
|
||||||
# subsystem=bld.env.MSVC_SUBSYSTEM
|
# subsystem=bld.env.MSVC_SUBSYSTEM
|
||||||
@ -231,7 +241,7 @@ def configure(conf):
|
|||||||
conf.env.MSVC_SUBSYSTEM = 'WINDOWS,5.01'
|
conf.env.MSVC_SUBSYSTEM = 'WINDOWS,5.01'
|
||||||
conf.env.MSVC_TARGETS = ['x86'] # explicitly request x86 target for MSVC
|
conf.env.MSVC_TARGETS = ['x86'] # explicitly request x86 target for MSVC
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
conf.load('msvc msvc_pdb msdev msvs')
|
conf.load('msvc_pdb msdev msvs')
|
||||||
conf.load('subproject xcompile compiler_c compiler_cxx gitversion clang_compilation_database strip_on_install waf_unit_test enforce_pic')
|
conf.load('subproject xcompile compiler_c compiler_cxx gitversion clang_compilation_database strip_on_install waf_unit_test enforce_pic')
|
||||||
|
|
||||||
define_platform(conf)
|
define_platform(conf)
|
||||||
@ -241,6 +251,9 @@ def configure(conf):
|
|||||||
elif conf.env.GL:
|
elif conf.env.GL:
|
||||||
projects['game'] += ['togl']
|
projects['game'] += ['togl']
|
||||||
|
|
||||||
|
if conf.env.DEST_OS == 'win32':
|
||||||
|
projects['game'] += ['utils/bzip2']
|
||||||
|
projects['dedicated'] += ['utils/bzip2']
|
||||||
|
|
||||||
if conf.env.DEST_OS in ['win32', 'linux', 'darwin'] and conf.env.DEST_CPU == 'x86_64':
|
if conf.env.DEST_OS in ['win32', 'linux', 'darwin'] and conf.env.DEST_CPU == 'x86_64':
|
||||||
conf.env.BIT32_MANDATORY = not conf.options.ALLOW64
|
conf.env.BIT32_MANDATORY = not conf.options.ALLOW64
|
||||||
@ -269,7 +282,8 @@ def configure(conf):
|
|||||||
|
|
||||||
cflags, linkflags = conf.get_optimization_flags()
|
cflags, linkflags = conf.get_optimization_flags()
|
||||||
|
|
||||||
flags = ['-fPIC']
|
if conf.env.DEST_OS != 'win32':
|
||||||
|
flags = ['-fPIC']
|
||||||
|
|
||||||
if conf.env.DEST_OS == 'android':
|
if conf.env.DEST_OS == 'android':
|
||||||
flags += [
|
flags += [
|
||||||
@ -289,15 +303,51 @@ def configure(conf):
|
|||||||
flags += ['-mcpu=cortex-a15', '-mtune=cortex-a15']
|
flags += ['-mcpu=cortex-a15', '-mtune=cortex-a15']
|
||||||
else:
|
else:
|
||||||
flags += ['-march=native', '-mtune=native']
|
flags += ['-march=native', '-mtune=native']
|
||||||
else:
|
elif conf.env.COMPILER_GCC:
|
||||||
flags += ['-march=native','-mtune=native','-mfpmath=sse', '-msse', '-msse2']
|
flags += ['-march=native','-mtune=native','-mfpmath=sse', '-msse', '-msse2']
|
||||||
|
|
||||||
|
|
||||||
cflags += flags
|
if conf.env.DEST_OS != 'win32':
|
||||||
linkflags += flags
|
cflags += flags
|
||||||
|
linkflags += flags
|
||||||
|
else:
|
||||||
|
cflags += [
|
||||||
|
'/I'+os.path.abspath('.')+'/thirdparty/SDL',
|
||||||
|
'/arch:SSE',
|
||||||
|
'/GF',
|
||||||
|
'/Gy',
|
||||||
|
'/fp:fast',
|
||||||
|
'/Zc:forScope',
|
||||||
|
'/Zc:wchar_t',
|
||||||
|
'/GR',
|
||||||
|
'/TP'
|
||||||
|
]
|
||||||
|
|
||||||
|
if conf.options.BUILD_TYPE == 'debug':
|
||||||
|
linkflags += [
|
||||||
|
'/INCREMENTAL:NO',
|
||||||
|
'/NODEFAULTLIB:libc',
|
||||||
|
'/NODEFAULTLIB:libcd',
|
||||||
|
'/NODEFAULTLIB:libcmt'
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
linkflags += [
|
||||||
|
'/INCREMENTAL',
|
||||||
|
'/NODEFAULTLIB:libc',
|
||||||
|
'/NODEFAULTLIB:libcd',
|
||||||
|
'/NODEFAULTLIB:libcmtd'
|
||||||
|
]
|
||||||
|
|
||||||
|
linkflags += [
|
||||||
|
'/LIBPATH:'+os.path.abspath('.')+'/lib/public',
|
||||||
|
'/LIBPATH:'+os.path.abspath('.')+'/lib/common/win32/2015/release',
|
||||||
|
'/LIBPATH:'+os.path.abspath('.')+'/dx9sdk/lib'
|
||||||
|
]
|
||||||
|
|
||||||
# And here C++ flags starts to be treated separately
|
# And here C++ flags starts to be treated separately
|
||||||
cxxflags = list(cflags) + ['-std=c++11','-fpermissive']
|
cxxflags = list(cflags)
|
||||||
|
if conf.env.DEST_OS != 'win32':
|
||||||
|
cxxflags += ['-std=c++11','-fpermissive']
|
||||||
|
|
||||||
if conf.env.COMPILER_CC == 'gcc':
|
if conf.env.COMPILER_CC == 'gcc':
|
||||||
# wrapfunctions = ['freopen','creat','access','__xstat','stat','lstat','fopen64','open64',
|
# wrapfunctions = ['freopen','creat','access','__xstat','stat','lstat','fopen64','open64',
|
||||||
@ -306,10 +356,13 @@ def configure(conf):
|
|||||||
|
|
||||||
# for func in wrapfunctions:
|
# for func in wrapfunctions:
|
||||||
# linkflags += ['-Wl,--wrap='+func]
|
# linkflags += ['-Wl,--wrap='+func]
|
||||||
|
|
||||||
|
|
||||||
conf.define('COMPILER_GCC', 1)
|
conf.define('COMPILER_GCC', 1)
|
||||||
|
elif conf.env.COMPILER_CC == 'msvc':
|
||||||
|
conf.define('COMPILER_MSVC', 1)
|
||||||
|
if conf.env.DEST_CPU == 'x86':
|
||||||
|
conf.define('COMPILER_MSVC32', 1)
|
||||||
|
elif conf.env.DEST_CPU == 'x86_64':
|
||||||
|
conf.define('COMPILER_MSVC64', 1)
|
||||||
|
|
||||||
if conf.env.COMPILER_CC != 'msvc':
|
if conf.env.COMPILER_CC != 'msvc':
|
||||||
conf.check_cc(cflags=cflags, linkflags=linkflags, msg='Checking for required C flags')
|
conf.check_cc(cflags=cflags, linkflags=linkflags, msg='Checking for required C flags')
|
||||||
@ -328,7 +381,59 @@ def configure(conf):
|
|||||||
conf.env.append_unique('LINKFLAGS', linkflags)
|
conf.env.append_unique('LINKFLAGS', linkflags)
|
||||||
conf.env.append_unique('INCLUDES', [os.path.abspath('common/')])
|
conf.env.append_unique('INCLUDES', [os.path.abspath('common/')])
|
||||||
|
|
||||||
if conf.env.DEST_OS != 'android':
|
if conf.env.DEST_OS == 'android':
|
||||||
|
conf.check(lib='SDL2', uselib_store='SDL2')
|
||||||
|
conf.check(lib='freetype2', uselib_store='FT2')
|
||||||
|
conf.check(lib='openal', uselib_store='OPENAL')
|
||||||
|
conf.check(lib='jpeg', uselib_store='JPEG')
|
||||||
|
conf.check(lib='png', uselib_store='PNG')
|
||||||
|
conf.check(lib='curl', uselib_store='CURL')
|
||||||
|
conf.check(lib='z', uselib_store='ZLIB')
|
||||||
|
conf.check(lib='crypto', uselib_store='CRYPTO')
|
||||||
|
conf.check(lib='ssl', uselib_store='SSL')
|
||||||
|
conf.check(lib='expat', uselib_store='EXPAT')
|
||||||
|
conf.check(lib='android_support', uselib_store='ANDROID_SUPPORT')
|
||||||
|
elif conf.env.DEST_OS == 'win32':
|
||||||
|
# Common Win32 libraries
|
||||||
|
# Don't check them more than once, to save time
|
||||||
|
# Usually, they are always available
|
||||||
|
# but we need them in uselib
|
||||||
|
a = [
|
||||||
|
'user32',
|
||||||
|
'shell32',
|
||||||
|
'gdi32',
|
||||||
|
'advapi32',
|
||||||
|
'dbghelp',
|
||||||
|
'psapi',
|
||||||
|
'ws2_32',
|
||||||
|
'rpcrt4',
|
||||||
|
'winmm',
|
||||||
|
'wininet',
|
||||||
|
'ole32',
|
||||||
|
'shlwapi',
|
||||||
|
'imm32'
|
||||||
|
]
|
||||||
|
|
||||||
|
if conf.env.COMPILER_CC == 'msvc':
|
||||||
|
for i in a:
|
||||||
|
conf.start_msg('Checking for MSVC library')
|
||||||
|
conf.check_lib_msvc(i)
|
||||||
|
conf.end_msg(i)
|
||||||
|
else:
|
||||||
|
for i in a:
|
||||||
|
conf.check_cc(lib = i)
|
||||||
|
|
||||||
|
conf.check(lib='libz', uselib_store='ZLIB')
|
||||||
|
conf.check(lib='nvtc', uselib_store='NVTC')
|
||||||
|
conf.check(lib='ati_compress_mt_vc10', uselib_store='ATI_COMPRESS_MT_VC10')
|
||||||
|
conf.check(lib='SDL2', uselib_store='SDL2')
|
||||||
|
conf.check(lib='libjpeg', uselib_store='JPEG')
|
||||||
|
conf.check(lib='libpng', uselib_store='PNG')
|
||||||
|
conf.check(lib='d3dx9', uselib_store='D3DX9')
|
||||||
|
conf.check(lib='d3d9', uselib_store='D3D9')
|
||||||
|
conf.check(lib='dsound', uselib_store='DSOUND')
|
||||||
|
conf.check(lib='dxguid', uselib_store='DXGUID')
|
||||||
|
else:
|
||||||
if conf.options.SDL:
|
if conf.options.SDL:
|
||||||
conf.check_cfg(package='sdl2', uselib_store='SDL2', args=['--cflags', '--libs'])
|
conf.check_cfg(package='sdl2', uselib_store='SDL2', args=['--cflags', '--libs'])
|
||||||
if conf.options.DEDICATED:
|
if conf.options.DEDICATED:
|
||||||
@ -341,18 +446,6 @@ def configure(conf):
|
|||||||
conf.check_cfg(package='libpng', uselib_store='PNG', args=['--cflags', '--libs'])
|
conf.check_cfg(package='libpng', uselib_store='PNG', args=['--cflags', '--libs'])
|
||||||
conf.check_cfg(package='libcurl', uselib_store='CURL', args=['--cflags', '--libs'])
|
conf.check_cfg(package='libcurl', uselib_store='CURL', args=['--cflags', '--libs'])
|
||||||
conf.check_cfg(package='zlib', uselib_store='ZLIB', args=['--cflags', '--libs'])
|
conf.check_cfg(package='zlib', uselib_store='ZLIB', args=['--cflags', '--libs'])
|
||||||
else:
|
|
||||||
conf.check(lib='SDL2', uselib_store='SDL2')
|
|
||||||
conf.check(lib='freetype2', uselib_store='FT2')
|
|
||||||
conf.check(lib='openal', uselib_store='OPENAL')
|
|
||||||
conf.check(lib='jpeg', uselib_store='JPEG')
|
|
||||||
conf.check(lib='png', uselib_store='PNG')
|
|
||||||
conf.check(lib='curl', uselib_store='CURL')
|
|
||||||
conf.check(lib='z', uselib_store='ZLIB')
|
|
||||||
conf.check(lib='crypto', uselib_store='CRYPTO')
|
|
||||||
conf.check(lib='ssl', uselib_store='SSL')
|
|
||||||
conf.check(lib='expat', uselib_store='EXPAT')
|
|
||||||
conf.check(lib='android_support', uselib_store='ANDROID_SUPPORT')
|
|
||||||
|
|
||||||
if conf.env.DEST_OS != 'win32':
|
if conf.env.DEST_OS != 'win32':
|
||||||
conf.check_cc(lib='dl', mandatory=False)
|
conf.check_cc(lib='dl', mandatory=False)
|
||||||
@ -361,31 +454,6 @@ def configure(conf):
|
|||||||
|
|
||||||
if not conf.env.LIB_M: # HACK: already added in xcompile!
|
if not conf.env.LIB_M: # HACK: already added in xcompile!
|
||||||
conf.check_cc(lib='m')
|
conf.check_cc(lib='m')
|
||||||
else:
|
|
||||||
# Common Win32 libraries
|
|
||||||
# Don't check them more than once, to save time
|
|
||||||
# Usually, they are always available
|
|
||||||
# but we need them in uselib
|
|
||||||
a = map(lambda x: {
|
|
||||||
# 'features': 'c',
|
|
||||||
# 'message': '...' + x,
|
|
||||||
'lib': x,
|
|
||||||
# 'uselib_store': x.upper(),
|
|
||||||
# 'global_define': False,
|
|
||||||
}, [
|
|
||||||
'user32',
|
|
||||||
'shell32',
|
|
||||||
'gdi32',
|
|
||||||
'advapi32',
|
|
||||||
'dbghelp',
|
|
||||||
'psapi',
|
|
||||||
'ws2_32'
|
|
||||||
])
|
|
||||||
|
|
||||||
for i in a:
|
|
||||||
conf.check_cc(**i)
|
|
||||||
|
|
||||||
# conf.multicheck(*a, run_all_tests = True, mandatory = True)
|
|
||||||
|
|
||||||
# indicate if we are packaging for Linux/BSD
|
# indicate if we are packaging for Linux/BSD
|
||||||
if conf.env.DEST_OS != 'android':
|
if conf.env.DEST_OS != 'android':
|
||||||
@ -407,6 +475,10 @@ def configure(conf):
|
|||||||
def build(bld):
|
def build(bld):
|
||||||
os.environ["CCACHE_DIR"] = os.path.abspath('.ccache/'+bld.env.COMPILER_CC+'/'+bld.env.DEST_OS+'/'+bld.env.DEST_CPU)
|
os.environ["CCACHE_DIR"] = os.path.abspath('.ccache/'+bld.env.COMPILER_CC+'/'+bld.env.DEST_OS+'/'+bld.env.DEST_CPU)
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'win32':
|
||||||
|
projects['game'] += ['utils/bzip2']
|
||||||
|
projects['dedicated'] += ['utils/bzip2']
|
||||||
|
|
||||||
if bld.env.DEDICATED:
|
if bld.env.DEDICATED:
|
||||||
bld.add_subproject(projects['dedicated'])
|
bld.add_subproject(projects['dedicated'])
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user