generic changes
parent
a200e3a1a2
commit
e8cf287ebe
19
Makefile
19
Makefile
|
@ -21,16 +21,17 @@ find_one ?= 0
|
||||||
fancy ?= 0
|
fancy ?= 0
|
||||||
free ?= 0
|
free ?= 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
|
CC := clang
|
||||||
|
|
||||||
MACROS := -DPRINT_INTERMEDIATES=$(printing) -DTIME_SECTIONS=$(timing) -DASSUME_SAFE=$(assume) -DFIND_ONE=$(find_one) -DDELETE=$(delete) -DFANCYPRINT=$(fancy) -DFREE=$(free)
|
ifdef asm
|
||||||
|
override asm = -S
|
||||||
|
else
|
||||||
|
override asm =
|
||||||
|
endif
|
||||||
|
|
||||||
FLAGS := -Ofast -Wall -Werror
|
MACROS := -DPRINT_INTERMEDIATES=$(printing) -DTIME_SECTIONS=$(timing) -DASSUME_SAFE=$(assume) -DFIND_ONE=$(find_one) -DFANCYPRINT=$(fancy) -DFREE=$(free) $(asm)
|
||||||
|
|
||||||
|
FLAGS := -Wall -Werror -Ofast
|
||||||
OUTPUT := -o bw
|
OUTPUT := -o bw
|
||||||
|
|
||||||
bw: solvedle.o boilerplate.o
|
bw: solvedle.o boilerplate.o
|
||||||
|
@ -52,9 +53,9 @@ run: bw wordleWords.txt
|
||||||
|
|
||||||
.PHONY: fast
|
.PHONY: fast
|
||||||
fast: solvedle.c boilerplate.c
|
fast: solvedle.c boilerplate.c
|
||||||
$(CC) $(FLAGS) -DPRINT_INTERMEDIATES=0 -DTIME_SECTIONS=0 -DASSUME_SAFE=1 -DFIND_ONE=1 -DDELETE=1 -DFANCYPRINT=0 -DFREE=0 -c $^
|
$(CC) $(FLAGS) -DPRINT_INTERMEDIATES=0 -DTIME_SECTIONS=0 -DASSUME_SAFE=1 -DFIND_ONE=1 -DFANCYPRINT=0 -DFREE=0 -c $^
|
||||||
make bw
|
make bw
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm *.o bw
|
rm *.o *.s bw
|
|
@ -48,7 +48,7 @@ signature* makeArray(FILE * f, uint32_t* arrlen) {
|
||||||
uint32_t s = getsig(word);
|
uint32_t s = getsig(word);
|
||||||
if (s != 0) {
|
if (s != 0) {
|
||||||
// no duplicate word letters in word
|
// no duplicate word letters in word
|
||||||
sigs[i].word = strndup(word, 5);
|
memcpy(sigs[i].word, word, 5);
|
||||||
sigs[i].sign = s;
|
sigs[i].sign = s;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ uint32_t rawWC = 0;
|
||||||
/* </defines> */
|
/* </defines> */
|
||||||
|
|
||||||
typedef struct signature {
|
typedef struct signature {
|
||||||
char * word;
|
char word[5];
|
||||||
uint32_t sign;
|
uint32_t sign;
|
||||||
} signature;
|
} signature;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue