2023-07-20 22:34:56 +02:00
|
|
|
SRC=src
|
|
|
|
BUILD=build
|
|
|
|
CFLAGS=-Wall -g
|
|
|
|
|
2024-01-24 12:16:17 +01:00
|
|
|
CLM_SOURCES=$(SRC)/clm.c $(SRC)/clm_util.c
|
|
|
|
CLM_SOURCES_CPU=$(CLM_SOURCES) $(SRC)/clm_gpu_cpu.c
|
|
|
|
CLM_SOURCES_OPENCL=$(CLM_SOURCES) $(SRC)/clm_gpu_opencl.c
|
|
|
|
|
2023-07-20 22:34:56 +02:00
|
|
|
.PHONY: all
|
|
|
|
all:
|
|
|
|
mkdir -p $(BUILD)
|
2024-01-24 12:16:17 +01:00
|
|
|
gcc -lOpenCL -lm $(CFLAGS) -o $(BUILD)/cltest $(SRC)/cltest.c $(CLM_SOURCES_OPENCL)
|
2023-07-20 22:34:56 +02:00
|
|
|
|
|
|
|
.PHONY: run
|
|
|
|
run: all
|
|
|
|
$(BUILD)/cltest
|
2023-10-29 01:15:22 +02:00
|
|
|
|
|
|
|
.PHONY: cl
|
|
|
|
cl:
|
|
|
|
mkdir -p $(BUILD)
|
2024-01-24 12:16:17 +01:00
|
|
|
gcc -lOpenCL -lm $(CFLAGS) -o $(BUILD)/cl $(SRC)/cl.c $(CLM_SOURCES_OPENCL)
|
2023-10-29 01:15:22 +02:00
|
|
|
|
|
|
|
.PHONY: cl_run
|
|
|
|
cl_run: cl
|
|
|
|
$(BUILD)/cl
|