Files
rocm-systems/projects/hip-tests/samples/0_Intro/square/Makefile
T
Vladislav Sytchenko 5bc903a0cd Revert "Merge branch 'amd-master-next' into amd-npi-next"
This reverts commit 873a2e33d3.

Reason for revert: <INSERT REASONING HERE>

Change-Id: I53322718dadde2c98f96140b8e260ec7ee9ef721


[ROCm/hip-tests commit: 051c84bba3]
2020-10-05 13:02:39 -04:00

28 righe
563 B
Makefile

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
ifeq (${HIP_PLATFORM}, nvcc)
SOURCES=square.cu
else
SOURCES=square.cpp
endif
all: square.out square.out.static
# Step
square.cpp: square.cu
$(HIP_PATH)/bin/hipify-perl square.cu > square.cpp
square.out: $(SOURCES)
$(HIPCC) $(CXXFLAGS) $(SOURCES) -o $@
square.out.static: $(SOURCES)
$(HIPCC) -use-staticlib $(CXXFLAGS) $(SOURCES) -o $@
clean:
rm -f *.o *.out *.out.static square.cpp