csci5451/assignments/01/Makefile

23 lines
642 B
Makefile
Raw Normal View History

2023-09-23 04:37:36 +00:00
.PHONY: all
2023-10-08 00:49:58 +00:00
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")
2023-09-23 05:04:06 +00:00
2023-09-23 04:37:36 +00:00
all: lc_openmp lc_pthreads
2023-10-08 00:49:58 +00:00
watch-openmp:
watchexec -c clear -e Makefile,c,h 'make lc_openmp && ./lc_openmp ./dataset/small_data.csv ./dataset/small_label.csv 10 2'
2023-09-23 05:04:06 +00:00
lc_openmp: lc_openmp.o common.o
2023-10-08 00:49:58 +00:00
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
2023-09-23 05:04:06 +00:00
lc_pthreads: lc_pthreads.o common.o
2023-10-08 00:49:58 +00:00
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
2023-09-23 04:37:36 +00:00
2023-09-23 05:04:06 +00:00
%.o: %.c
2023-10-08 00:49:58 +00:00
$(CC) $(CFLAGS) -o $@ -c $<
rust: $(RUST_SOURCES)
cargo run -- ${BASE_PATH}/dataset/{small_data.csv,small_label.csv} 10 2