##
## Copyright 2005 Intel Corporation.
##
##
## This software and the related documents are Intel copyrighted materials, and your use of them is governed by
## the express license under which they were provided to you ('License'). Unless the License provides otherwise,
## you may not use, modify, copy, publish, distribute, disclose or transmit this software or the related
## documents without Intel's prior written permission.
## This software and the related documents are provided as is, with no express or implied warranties, other than
## those that are expressly stated in the License.
##

# GNU Makefile that builds and runs example.
NAME=ipp_blur_rotate
ARGS=auto
PERF_RUN_ARGS=auto 1 1000000 silent
LIGHT_ARGS=auto 1 1000

# The icpx C++ compiler if available
ifneq (,$(shell which icpx 2>/dev/null))
CXX=icpx
endif # icpx

ifeq ($(shell uname), Linux)
LIBS+= -lrt
endif

GUIFOLDER=./src/gui

include $(GUIFOLDER)/Makefile.gmake

SOURCES= $(GUIFOLDER)/$(UI)video.cpp ./src/bmpreader.cpp ./src/ipp_blur_rotate.cpp ./src/main.cpp

override CXXFLAGS += $(UI_CXXFLAGS)

all:	release

release: $(SOURCES)
	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(EXE) $(SOURCES) $(MACUIOBJS) -lippcore -lippvm -lippi -lipps $(LIBS)

debug: resources
	$(CXX) -g -O0 $(CXXFLAGS) -o $(EXE) $(SOURCES) $(MACUIOBJS) -lippcore -lippvm -lippi -lipps $(LIBS)

clean:
	$(RM) $(EXE) *.o *.d

run:
	echo $(EXE) $(ARGS)
	@PATH=.:$(PATH) $(run_cmd) $(EXE) $(ARGS)
