<commit_before>CC=gcc
CFLAGS = -Wall -D__USE_GNU

LIBS+= luajit/src/libluajit.a -lnetfilter_log -lm -ldl
LDFLAGS+= -Wl,-E

luafiles := $(shell ls lua/*.lua)
LUAOBJS := $(addsuffix .o, $(luafiles))

OBJS = nflog_shim.o

debug:clean luajit $(OBJS) $(LUAOBJS)
	$(CC) $(CFLAGS) -g main.c $(OBJS) $(LUAOBJS) $(LIBS) -o nfsf $(LDFLAGS)
stable:clean luajit $(OBJS) $(LUAOBJS) nfsf.o
	$(CC) $(CFLAGS) main.c $(OBJS) $(LUAOBJS) $(LIBS) -o nfsf $(LDFLAGS)
clean:
	rm -vfr *~ nfsf

.PHONY: luajit
luajit:
	cd luajit && $(MAKE)

%.lua.h: %.lua
	luajit -bg $< $@

%.lua.o: %.lua
	luajit -bg $< $@<commit_msg>use included LuaJIT for embedding bytecodes<commit_after>CC=gcc
CFLAGS = -Wall -D__USE_GNU

LIBS+= luajit/src/libluajit.a -lnetfilter_log -lm -ldl
LDFLAGS+= -Wl,-E

luafiles := $(shell ls lua/*.lua)
LUAOBJS := $(addsuffix .o, $(luafiles))

OBJS = nflog_shim.o

debug:clean luajit $(OBJS) $(LUAOBJS)
	$(CC) $(CFLAGS) -g main.c $(OBJS) $(LUAOBJS) $(LIBS) -o nfsf $(LDFLAGS)
stable:clean luajit $(OBJS) $(LUAOBJS) nfsf.o
	$(CC) $(CFLAGS) main.c $(OBJS) $(LUAOBJS) $(LIBS) -o nfsf $(LDFLAGS)
clean:
	rm -vfr *~ nfsf

.PHONY: luajit
luajit:
	cd luajit && $(MAKE)

%.lua.h: %.lua
	LUA_PATH='./luajit/src/?.lua' luajit/src/luajit -bg $< $@

%.lua.o: %.lua
	LUA_PATH='./luajit/src/?.lua' luajit/src/luajit -bg $< $@
{'fraction_non_alphanumeric': 0.21658986175115208, 'fraction_numerical': 0.0, 'mean_word_length': 4.0115384615384615, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6127871', 'n_tokens_mistral': 654, 'n_tokens_neox': 635, 'n_words': 141}