Comhaid
rocm-systems/samples/0_Intro/bit_extract/Makefile
T
Maneesh Gupta bd31d333e6 Fix bit_extract sample
Change-Id: I933f932bac26d9a9469d5d069973af166e11cbcd
2016-05-20 01:06:08 -04:00

28 línte
555 B
Makefile

#Dependencies : [MYHIP]/bin must be in user's path.
HIP_PATH?= $(wildcard /opt/rocm/hip)
ifeq (,$(HIP_PATH))
HIP_PATH=../../..
endif
HIP_PLATFORM=$(shell $(HIP_PATH)/bin/hipconfig --platform)
HIPCC=$(HIP_PATH)/bin/hipcc
# Show how to use PLATFORM to specify different options for each compiler:
ifeq (${HIP_PLATFORM}, nvcc)
HIPCC_FLAGS = -gencode=arch=compute_20,code=sm_20
endif
ifeq (${HIP_PLATFORM}, hcc)
HIPCC_FLAGS = -stdlib=libc++
endif
EXE=bit_extract
$(EXE): bit_extract.cpp
$(HIPCC) $(HIPCC_FLAGS) $< -o $@
clean:
rm -f *.o $(EXE)