Skip to content
Snippets Groups Projects
Verified Commit ddecd630 authored by orestis.malaspin's avatar orestis.malaspin
Browse files

added makefile gitignore

parent 5602f465
Branches
No related tags found
No related merge requests found
Pipeline #14930 failed
search
sum
sum_one
sum_one_opt
sum_thousand
sum_thousand_opt
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment