fixed fast rule, added clean rule
parent
f736b81a44
commit
c69a780694
27
Makefile
27
Makefile
|
@ -19,18 +19,26 @@ timing ?= 0
|
|||
assume_safe ?= 0
|
||||
find_one ?= 0
|
||||
|
||||
# note: setting deleted to 0 doesn't get any extra words,
|
||||
# but does just about triple the execution time.
|
||||
# I do not recommend setting it to false.
|
||||
delete ?= 1
|
||||
|
||||
CC := clang
|
||||
|
||||
MACROS := -DPRINT_INTERMEDIATES=$(printing) -DTIME_SECTIONS=$(timing) -DASSUME_SAFE=$(assume_safe) -DFIND_ONE=$(find_one)
|
||||
MACROS := -DPRINT_INTERMEDIATES=$(printing) -DTIME_SECTIONS=$(timing) -DASSUME_SAFE=$(assume_safe) -DFIND_ONE=$(find_one) -DDELETE=$(delete)
|
||||
|
||||
FLAGS := -Ofast -Wall -Werror
|
||||
OUTPUT := -o bw
|
||||
|
||||
bw: solvedle.o
|
||||
$(CC) $(OUTPUT) $<
|
||||
bw: solvedle.o boilerplate.o
|
||||
$(CC) $(OUTPUT) $^
|
||||
|
||||
solvedle.o: solvedle.c
|
||||
$(CC) -c $(FLAGS) $(MACROS) $<
|
||||
$(CC) $(FLAGS) $(MACROS) -c $^
|
||||
|
||||
boilerplate.o: boilerplate.c
|
||||
$(CC) $(FLAGS) $(MACROS) -c $^
|
||||
|
||||
.PHONY: test
|
||||
test: bw abcde.txt
|
||||
|
@ -38,4 +46,13 @@ test: bw abcde.txt
|
|||
|
||||
.PHONY: run
|
||||
run: bw wordleWords.txt
|
||||
./bw wordleWords.txt
|
||||
./bw wordleWords.txt
|
||||
|
||||
.PHONY: fast
|
||||
fast: solvedle.c boilerplate.c
|
||||
$(CC) -c $(FLAGS) -DPRINT_INTERMEDIATES=0 -DTIME_SECTIONS=0 -DASSUME_SAFE=1 -DFIND_ONE=1 -DDELETE=1 $^
|
||||
make bw
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm *.o bw
|
Loading…
Reference in New Issue