blob: ee863b884cb8f46a289b55d8c762496db4c7c71d [file] [log] [blame]
HIP_PATH?= /opt/rocm/hip
HIPCC=$(HIP_PATH)/bin/hipcc
SRC_DIR := src
BIN_DIR := bin
SOURCES := $(wildcard $(SRC_DIR)/*.cpp)
EXECUTABLES := $(basename $(notdir $(SOURCES)))
.PHONY: all clean
all: $(EXECUTABLES)
$(EXECUTABLES): %: $(SRC_DIR)/%.cpp | $(BIN_DIR)
$(HIPCC) --amdgpu-target=gfx801,gfx803 $< -o $(BIN_DIR)/$@
$(BIN_DIR):
mkdir -p $@
clean:
rm -rf $(BIN_DIR)