diff --git a/assignments/01/.gitignore b/assignments/01/.gitignore index 8401188..618dcec 100644 --- a/assignments/01/.gitignore +++ b/assignments/01/.gitignore @@ -1,6 +1,7 @@ lc_openmp lc_pthreads *.o +*.tar.gz dataset out.txt \ No newline at end of file diff --git a/assignments/01/Makefile b/assignments/01/Makefile index 87786a6..7c07104 100644 --- a/assignments/01/Makefile +++ b/assignments/01/Makefile @@ -1,4 +1,4 @@ -.PHONY: all +.PHONY: all watch-openmp clean CFLAGS := -std=c11 -fopenmp=libomp -I/opt/homebrew/opt/libomp/include LDFLAGS := -std=c11 -fopenmp=libomp -L/opt/homebrew/opt/libomp/lib @@ -6,6 +6,15 @@ RUST_SOURCES := $(shell find . -name "*.rs") all: lc_openmp lc_pthreads +clean: + rm -rf lc_openmp lc_pthreads zhan4854 zhan4854.tar.gz *.o + +zhan4854.tar.gz: common.c common.h lc_openmp.c lc_pthreads.c Makefile + mkdir -p zhan4854 + mv $^ zhan4854 + tar -czvf $@ zhan4854 + rm -r zhan4854 + watch-openmp: watchexec -c clear -e Makefile,c,h 'make lc_openmp && ./lc_openmp ./dataset/small_data.csv ./dataset/small_label.csv 10 2'