d4f3fb092a
Change-Id: I92d7b7a302e3fa0db84889fb5dc6b612e6a53c73
27 строки
553 B
Makefile
27 строки
553 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)
|