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.

58 lines
2.2 KiB

  1. # Copyright 2005-2013 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. # Common Makefile that builds and runs example.
  27. # Just specify your program basename
  28. PROG=binpack
  29. ARGS= 4 N=1000
  30. PERF_RUN_ARGS=auto N=1000 silent
  31. # Trying to find if icl.exe is set
  32. CXX1 = $(TBB_CXX)-
  33. CXX2 = $(CXX1:icl.exe-=icl.exe)
  34. CXX = $(CXX2:-=cl.exe)
  35. # The C++ compiler options
  36. MYCXXFLAGS = /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_DEPRECATE $(CXXFLAGS)
  37. MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS)
  38. all: release test
  39. release:
  40. $(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
  41. debug:
  42. $(CXX) *.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
  43. clean:
  44. @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest
  45. test:
  46. $(PROG) $(ARGS)
  47. compiler_check:
  48. @$(CXX) >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly"
  49. perf_build: release
  50. perf_run:
  51. $(PROG) $(PERF_RUN_ARGS)