<commit_before>bin=terminibbles
version=1.2
distname=$(bin)-$(version)

PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin
CONFIG_FOLDER ?= $(HOME)/.config/$(bin)
LEVELDIR ?= $(PREFIX)/share/$(bin)/levels
MANDIR ?= $(PREFIX)/share/man

CFLAGS += -Wall -lncurses -D'LEVEL_DIR="$(LEVELDIR)"' -D'VERSION="$(version)"' -D'CONFIG_FOLDER="$(CONFIG_FOLDER)"'

tnibbles_src=gameboard.c terminibbles.c
tnibbles_obj=$(tnibbles_src:.c=.o)
distrib=$(tnibbles_src) gameboard.h terminibbles.1 levels \
		LICENSE.txt LEVELS.txt README.md Makefile

all: $(bin)

$(bin): $(tnibbles_obj)
	mkdir -p $(CONFIG_FOLDER)
	$(CC) $(CFLAGS) $(tnibbles_obj) -o $@

install: all
	install -d $(DESTDIR)/$(BINDIR)
	install $(bin) $(DESTDIR)/$(BINDIR)
	install -d $(DESTDIR)/$(LEVELDIR)
	install -m644 ./levels/* $(DESTDIR)/$(LEVELDIR)
	install -d $(DESTDIR)/$(MANDIR)/man1/
	install terminibbles.1 $(DESTDIR)/$(MANDIR)/man1/

tar: clean
	mkdir ./$(distname)
	cp -r $(distrib) ./$(distname)
	tar -czf $(distname).tar.gz ./$(distname)
	rm -r ./$(distname)

clean:
	rm -f $(tnibbles_obj)
	rm -f makefile.bak
	rm -f $(distname).tar.gz
	rm -f $(bin)

gameboard.o: gameboard.h
terminibbles.o: gameboard.h<commit_msg>Remove config dir (now auto-detected)<commit_after>bin=terminibbles
version=1.3
distname=$(bin)-$(version)

PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin
LEVELDIR ?= $(PREFIX)/share/$(bin)/levels
MANDIR ?= $(PREFIX)/share/man

CFLAGS += -Wall -lncurses -D'LEVEL_DIR="$(LEVELDIR)"' -D'VERSION="$(version)"'

tnibbles_src=gameboard.c terminibbles.c
tnibbles_obj=$(tnibbles_src:.c=.o)
distrib=$(tnibbles_src) gameboard.h terminibbles.1 levels \
		LICENSE.txt LEVELS.txt README.md Makefile

all: $(bin)

$(bin): $(tnibbles_obj)
	$(CC) $(CFLAGS) $(tnibbles_obj) -o $@

install: all
	install -d $(DESTDIR)/$(BINDIR)
	install $(bin) $(DESTDIR)/$(BINDIR)
	install -d $(DESTDIR)/$(LEVELDIR)
	install -m644 ./levels/* $(DESTDIR)/$(LEVELDIR)
	install -d $(DESTDIR)/$(MANDIR)/man1/
	install terminibbles.1 $(DESTDIR)/$(MANDIR)/man1/

tar: clean
	mkdir ./$(distname)
	cp -r $(distrib) ./$(distname)
	tar -czf $(distname).tar.gz ./$(distname)
	rm -r ./$(distname)

clean:
	rm -f $(tnibbles_obj)
	rm -f makefile.bak
	rm -f $(distname).tar.gz
	rm -f $(bin)

gameboard.o: gameboard.h
terminibbles.o: gameboard.h
{'fraction_non_alphanumeric': 0.20785525154457193, 'fraction_numerical': 0.00794351279788173, 'mean_word_length': 4.768447837150127, 'pattern_counts': {'":': 0, '<': 3, '<?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': '385778', 'n_tokens_mistral': 953, 'n_tokens_neox': 939, 'n_words': 185}