blob: da12ce5eb4f29ffdb1984e2fc6fb6c9b45fe4bd9 [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) $< -o $(BIN_DIR)/$@
$(BIN_DIR):
mkdir -p $@
clean:
rm -rf $(BIN_DIR)