22 lines
642 B
Makefile
22 lines
642 B
Makefile
.PHONY: all
|
|
|
|
CFLAGS := -std=c11 -fopenmp=libomp -I/opt/homebrew/opt/libomp/include
|
|
LDFLAGS := -std=c11 -fopenmp=libomp -L/opt/homebrew/opt/libomp/lib
|
|
RUST_SOURCES := $(shell find . -name "*.rs")
|
|
|
|
all: lc_openmp lc_pthreads
|
|
|
|
watch-openmp:
|
|
watchexec -c clear -e Makefile,c,h 'make lc_openmp && ./lc_openmp ./dataset/small_data.csv ./dataset/small_label.csv 10 2'
|
|
|
|
lc_openmp: lc_openmp.o common.o
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
|
|
|
|
lc_pthreads: lc_pthreads.o common.o
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
rust: $(RUST_SOURCES)
|
|
cargo run -- ${BASE_PATH}/dataset/{small_data.csv,small_label.csv} 10 2
|