# perl highlighting LIBC = shared #MAPFILES = 1 CONSOLE = 1 OPTIMIZE = size PDB = 2 # keep enabled, executable is almost the same, except embedded link to pdb file OLDCRT = 1 #------------------------------------------------ # Compiler-specific options #------------------------------------------------ WARNINGS = # warnings for our source code (i.e. excluding thirs-parties), empty by default !if "$COMPILER" eq "VisualC" CPP_EXCEPT = 0 # used with WIN32_USE_SEH in Core.h OPTIONS = -GS- -GR- #?? VC8+ # -Wp64 enables 64-bit portability warnings. Note: this option is deprecated, it will display a command line warning. # More information here: # https://connect.microsoft.com/VisualStudio/feedback/details/806763/warnings-c4311-and-c4312-require-wp64-which-is-documented-as-deprecated # http://blogs.msdn.com/b/vcblog/archive/2014/06/13/compiler-switch-deprecation-removal-changes-in-visual-studio-14.aspx # OPTIONS += -Wp64 # 64-bit portability warnings; note: deprecated option, will display a command line warning # OPTIONS += -FS # VS2013+, required for parallel build to work (jom.exe) # WARNINGS += -W4 # maximal warning level for Visual C++ DEFINES += _USING_V110_SDK71_ # avoid some warnings, perhaps affects something else # see http://tedwvc.wordpress.com/2014/01/01/how-to-target-xp-with-vc2012-or-vc2013-and-continue-to-use-the-windows-8-x-sdk/ # it looks like VS2013 requires _USING_V120_SDK71_ !if "$OLDCRT" eq "1" DEFINES += OLDCRT WDKCRT = $R/../Libs/msvcrt !include $WDKCRT/msvcrt.project !endif !endif !if "$COMPILER" eq "GnuC" # linux/cygwin + GCC STDLIBS = stdc++ m GL # libm for math.h functions !if "$PLATFORM" ne "cygwin" STDLIBS += dl # dlopen() and friends !endif LIBC = shared OPTIONS = -msse2 # enable SSE instructions OPTIONS += -std=c++0x # allow C++11 features OPTIONS += -fno-strict-aliasing # required for our uint_cast()-based FP hacks OPTIONS += -fno-stack-protector # this will remove GLIBC_2.4 dependency OPTIONS += { # disable some warnings -Wno-invalid-offsetof #?? this flag is for C++ only, not for C } !endif # GCC debug build !if ("$COMPILER" eq "GnuC") && 0 #!! should disable "-s" option from linker command OPTIONS += -g3 -fno-omit-frame-pointer -funwind-tables -fstack-protector -fno-optimize-sibling-calls LINKFLAGS += -rdynamic !endif #OPTIONS += -analyze #------------------------------------------------ # Third-party libraries #------------------------------------------------ LIBINCLUDES = $R/libs/include OBJDIR = $R/obj/libs-$PLATFORM push(INCLUDES) INCLUDES = $R/libs/nvtt LIBINCLUDES += $R/libs/nvtt sources(NV_LIBS) = { # $R/libs/nvtt/nvcore/*.cpp $R/libs/nvtt/nvimage/*.cpp # $R/libs/nvtt/nvmath/*.cpp # $R/libs/nvtt/nvtt/bc6h/*.cpp # $R/libs/nvtt/nvtt/bc7/*.cpp } pop(INCLUDES) # defines for smaller zlib push(DEFINES) push(INCLUDES) DEFINES = DYNAMIC_CRC_TABLE BUILDFIXED NO_GZIP INCLUDES = $R/libs/include sources(UE3_LIBS) = { # ... lzo for compressed UE3 packages $R/libs/lzo/lzo_init.c $R/libs/lzo/lzo1x_d2.c # ... zlib for compressed UE3 packages $R/libs/zlib/*.c # ... lzx for compresses XBox360 UE3 packages $R/libs/mspack/lzxd.c } pop(INCLUDES) pop(DEFINES) sources(IOS_LIBS) = { $R/libs/PowerVR/*.cpp } LIBINCLUDES += $R/libs/PowerVR LIBINCLUDES += $R/libs/detex sources(UE3_LIBS) = { $R/libs/detex/*.cpp } #------------------------------------------------ # Project-specific options #------------------------------------------------ OBJDIR = $R/obj/$PRJ-$PLATFORM STDLIBS += SDL2 SDL2main INCLUDES += . $R/Core $R/Unreal $LIBINCLUDES OPTIONS += $WARNINGS !if "$PLATFORM" eq "win32" INCLUDES += $R/libs/includewin32 LIBRARIES = $R/libs/SDL2/x86 !elif "$PLATFORM" eq "win64" INCLUDES += $R/libs/includewin32 LIBRARIES = $R/libs/SDL2/x64 !endif