Can haz function pointers in my worldist.

This commit is contained in:
Simon Forman
2023-02-03 08:13:57 -08:00
parent cd98e01efc
commit fb40b11fb0
6 changed files with 215 additions and 147 deletions
+10 -5
View File
@@ -1,19 +1,24 @@
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
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
# Gperf doesn't add anything to '{""}' unused entries in the worlist.
# This causes "warning: missing field 'func' initializer [-Wmissing-field-initializers]"
# But we can turn off that warning for this here:
keywords.o: CFLAGS+=-Wno-missing-field-initializers
# keywords.c doesn't strictly depend on keywords.h, but I want make to
# remake if keywords.h is touched.
keywords.c: KEYWORDS.txt
gperf --output-file=$@ --hash-function-name=keyword_hash $(GPERF_OPTS) KEYWORDS.txt
clean:
rm -vf *.o