Files
Thun/implementations/C/Makefile
T
Simon Forman 4be1cc5767 Use gperf to save memory.
We check terms to see if they're in the wordlist, if they are we reuse
the string from the wordlist instead of allocating a new one.

(I've always wanted to use Gperf so I'm pretty stoked about this!)
2023-02-02 16:58:44 -08:00

17 lines
577 B
Makefile

OBJS=joy.o keywords.o
STATIC_GCLIB=/usr/local/lib/libgc.a /usr/local/lib/libgmp.a
CFLAGS = -ansi -Wall -Wextra -Werror -pedantic -Wstrict-overflow -fno-strict-aliasing -pedantic-errors -I/usr/local/include
#COPTS=-I/usr/local/include
# $(STATIC_GCLIB)
GPERF_OPTS = --readonly-tables --enum --includes --global-table
joy: ${OBJS} $(STATIC_GCLIB)
keywords.c: KEYWORDS.txt keywords.h
gperf --output-file=$@ --hash-function-name=keyword_hash $(GPERF_OPTS) KEYWORDS.txt
# keywords.c doesn't strictly depend on keywords.h, but I want make to
# remake if keywords.h is touched.