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.

82 lines
3.7 KiB

  1. # Copyright 2005-2014 Intel Corporation. All Rights Reserved.
  2. #
  3. # This file is part of Threading Building Blocks.
  4. #
  5. # Threading Building Blocks is free software; you can redistribute it
  6. # and/or modify it under the terms of the GNU General Public License
  7. # version 2 as published by the Free Software Foundation.
  8. #
  9. # Threading Building Blocks is distributed in the hope that it will be
  10. # useful, but WITHOUT ANY WARRANTY; without even the implied warranty
  11. # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with Threading Building Blocks; if not, write to the Free Software
  16. # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  17. #
  18. # As a special exception, you may use this file as part of a free software
  19. # library without restriction. Specifically, if other files instantiate
  20. # templates or use macros or inline functions from this file, or you compile
  21. # this file and link it with other files to produce an executable, this
  22. # file does not by itself cause the resulting executable to be covered by
  23. # the GNU General Public License. This exception does not however
  24. # invalidate any other reasons why the executable file might be covered by
  25. # the GNU General Public License.
  26. # Per-build Makefile rules (for recursive $(MAKE) calls from Makefile)
  27. # Base compile/link options
  28. MYCXXFLAGS = /nologo /EHsc /Zc:forScope /D WIN32 /D _MBCS /D _CRT_SECURE_NO_DEPRECATE /MP $(CXXFLAGS)
  29. MYLFLAGS = /link /incremental:no /fixed:no $(LFLAGS)
  30. CXXFLAGS_NDEBUG = /MD /O2 /Ot /Gy /D NDEBUG
  31. CXXFLAGS_DEBUG = /MDd /Od /Zi /D _DEBUG
  32. # Specify library directory for Direct X SDK
  33. DDLIB_DIR=$(DXSDK_DIR)\lib\$(XARCH:AMD64=x64)
  34. # Input and output files
  35. #SOURCE = v
  36. #RCNAME = specified externaly
  37. #EXE = ^
  38. # defaults on XARCH = x86
  39. UISRC = ../../common/gui/$(UI)video.cpp
  40. default:
  41. build_echo:
  42. -@echo Building$(DEBUG) $(EXE) with UI=$(UI) XARCH=$(XARCH)
  43. build_one: build_echo build_$(UI)$(DEBUG)
  44. build_con: $(SOURCE) $(UISRC) compiler_check
  45. $(CXX) $(CXXFLAGS_NDEBUG) $(MYCXXFLAGS) $(SOURCE) $(UISRC) $(MYLFLAGS) /subsystem:console /OUT:$(EXE)
  46. @cmd.exe /C del *.obj
  47. build_con_debug: $(SOURCE) $(UISRC) compiler_check
  48. $(CXX) $(CXXFLAGS_DEBUG) $(MYCXXFLAGS) $(SOURCE) $(UISRC) $(MYLFLAGS) /debug /subsystem:console /OUT:$(EXE)
  49. @cmd.exe /C del *.obj
  50. build_gdi: $(SOURCE) $(UISRC) msvs/$(RCNAME).res compiler_check
  51. $(CXX) $(CXXFLAGS_NDEBUG) /D _WINDOWS $(MYCXXFLAGS) $(SOURCE) $(UISRC) $(MYLFLAGS) msvs/$(RCNAME).res /subsystem:windows /machine:$(XARCH) /OUT:$(EXE)
  52. @cmd.exe /C del *.obj
  53. build_gdi_debug: $(SOURCE) $(UISRC) msvs/$(RCNAME).res compiler_check
  54. $(CXX) $(CXXFLAGS_DEBUG) /D _WINDOWS $(MYCXXFLAGS) $(SOURCE) $(UISRC) $(MYLFLAGS) msvs/$(RCNAME).res /debug /subsystem:windows /machine:$(XARCH) /OUT:$(EXE)
  55. @cmd.exe /C del *.obj
  56. build_dd: $(SOURCE) $(UISRC) msvs/$(RCNAME).res compiler_check
  57. -@echo Using DirectX SDK from "$(DDLIB_DIR)"
  58. $(CXX) $(CXXFLAGS_NDEBUG) /D _WINDOWS $(MYCXXFLAGS) /I "$(DXSDK_DIR)\include" $(SOURCE) $(UISRC) $(MYLFLAGS) /LIBPATH:"$(DDLIB_DIR)" msvs/$(RCNAME).res /subsystem:windows /machine:$(XARCH) /OUT:$(EXE)
  59. @cmd.exe /C del *.obj
  60. build_dd_debug: $(SOURCE) $(UISRC) msvs/$(RCNAME).res compiler_check
  61. -@echo Using DirectX SDK from "$(DDLIB_DIR)"
  62. $(CXX) $(CXXFLAGS_DEBUG) /D _WINDOWS $(MYCXXFLAGS) /I "$(DXSDK_DIR)\include" $(SOURCE) $(UISRC) $(MYLFLAGS) /LIBPATH:"$(DDLIB_DIR)" msvs/$(RCNAME).res /debug /subsystem:windows /machine:$(XARCH) /OUT:$(EXE)
  63. @cmd.exe /C del *.obj
  64. msvs/$(RCNAME).res:
  65. rc /r msvs/$(RCNAME)
  66. compiler_check:
  67. @echo compiler_test>compiler_test && @$(CXX) /E compiler_test >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly"
  68. @cmd.exe /C del compiler_test