From ddecd63027d3ce5f7624d143daf4943e5ac4f789 Mon Sep 17 00:00:00 2001 From: Orestis <orestis.malaspinas@pm.me> Date: Thu, 18 Nov 2021 11:14:53 +0100 Subject: [PATCH] added makefile gitignore --- source_codes/complexity/.gitignore | 4 ++++ source_codes/complexity/Makefile | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/source_codes/complexity/.gitignore b/source_codes/complexity/.gitignore index 549fd57..a391e6c 100644 --- a/source_codes/complexity/.gitignore +++ b/source_codes/complexity/.gitignore @@ -1,2 +1,6 @@ search sum +sum_one +sum_one_opt +sum_thousand +sum_thousand_opt diff --git a/source_codes/complexity/Makefile b/source_codes/complexity/Makefile index ad9ba71..38ea338 100644 --- a/source_codes/complexity/Makefile +++ b/source_codes/complexity/Makefile @@ -5,7 +5,7 @@ LDFLAGS:=-lm $(SAN) EXECS := $(shell find . -type f -iname '*.c' | sed 's/\.c//g') -all: $(EXECS) +all: $(EXECS) sum_one sum_one_opt sum_thousand sum_thousand_opt $(EXECS): %: %.c $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) @@ -20,19 +20,23 @@ bench: sum_one sum_one_opt sum_thousand sum_thousand_opt sum_one: sum.c $(CC) $(CFLAGS) -DSIZE=1000000 -DNUM_TIMES=1 -o $@ $< $(LDFLAGS) + @echo $@ >> .gitignore sum_one_opt: sum.c $(CC) $(CFLAGS) -O3 -DSIZE=1000000 -DNUM_TIMES=1 -o $@ $< $(LDFLAGS) + @echo $@ >> .gitignore sum_thousand: sum.c $(CC) $(CFLAGS) -DSIZE=1000000 -DNUM_TIMES=1000 -o $@ $< $(LDFLAGS) + @echo $@ >> .gitignore sum_thousand_opt: sum.c $(CC) $(CFLAGS) -O3 -DSIZE=1000000 -DNUM_TIMES=1000 -o $@ $< $(LDFLAGS) + @echo $@ >> .gitignore .PHONY: clean all clean: - rm -f *.o $(EXECS) .gitignore + rm -f *.o $(EXECS) .gitignore sum_one sum_one_opt sum_thousand sum_thousand_opt -- GitLab