ファイル
rocm-systems/samples/0_Intro/square/Makefile
T

25 行
447 B
Makefile
Raw 通常表示 履歴

2016-04-18 10:15:35 +05:30
HIP_PATH?= $(wildcard /opt/rocm/hip)
2017-12-05 11:54:50 +05:30
ifeq (,$(HIP_PATH))
HIP_PATH=../../..
endif
HIP_PLATFORM=$(shell $(HIP_PATH)/bin/hipconfig --platform)
2016-01-26 20:14:33 -06:00
HIPCC=$(HIP_PATH)/bin/hipcc
2017-12-05 11:54:50 +05:30
ifeq (${HIP_PLATFORM}, nvcc)
SOURCES=square.cu
else
SOURCES=square.cpp
endif
all: square.out
2016-01-26 20:14:33 -06:00
# Step
2017-12-05 11:54:50 +05:30
square.cpp: square.cu
$(HIP_PATH)/bin/hipify-perl square.cu > square.cpp
2016-01-26 20:14:33 -06:00
2017-12-05 11:54:50 +05:30
square.out: $(SOURCES)
$(HIPCC) $(CXXFLAGS) $(SOURCES) -o $@
2017-04-24 08:50:43 +05:30
2016-01-26 20:14:33 -06:00
clean:
2017-12-05 11:54:50 +05:30
rm -f *.o *.out square.cpp