1# Copyright (c) 2005-2020 Intel Corporation 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15# Common Makefile that builds and runs example. 16 17# Just specify your program basename 18run_cmd= 19PROG=fgbzip2 20ARGS=-b=9 -a=async_node $(PROG).exe 21PERF_RUN_ARGS=-b=9 -a=async_node $(PROG).exe 22 23# Trying to find if icl.exe is set 24CXX1 = $(TBB_CXX)- 25CXX2 = $(CXX1:icl.exe-=icl.exe) 26CXX = $(CXX2:-=cl.exe) 27 28# The C++ compiler options 29MYCXXFLAGS = /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_WARNINGS /D _CRT_NONSTDC_NO_DEPRECATE /wd4267 /wd4244 30MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS) 31 32all: release test 33 34release: 35 $(CXX) *.cpp /MD /O2 /Zi /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe 36 37debug: 38 $(CXX) *.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe 39 40profile: 41 $(CXX) *.cpp /MD /O2 /Zi /D NDEBUG $(MYCXXFLAGS) /D TBB_USE_THREADING_TOOLS /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe 42 43clean: 44 @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest *.bz2 45 46test: 47 $(PROG) $(ARGS) 48 49perf_build: release 50 51perf_run: 52 $(PROG) $(PERF_RUN_ARGS) 53 54