NVCC ?= nvcc
PYTHON ?= python3
NVCCFLAGS ?= -O3 --use_fast_math -lineinfo
ARCH ?= native

.PHONY: all clean test

all: pearl-cuda

pearl-cuda: cuda/pearl_cuda.cu
	$(NVCC) $(NVCCFLAGS) -arch=$(ARCH) -o $@ $<

test: pearl-cuda
	$(PYTHON) scripts/self_test.py ./pearl-cuda

clean:
	rm -f pearl-cuda

