<commit_before>LBITS := $(shell getconf LONG_BIT)

all: test1 test2

run:
	./run.sh test2.bts

test1.asm: test1.bts
	<test1.bts ../battlestar -platform=$(LBITS) 2>/dev/null > test1.asm

test2.asm: test2.bts
	<test2.bts ../battlestar -platform=$(LBITS) 2>/dev/null > test2.asm

test1.o: test1.asm
	nasm -f elf$(LBITS) -o test1.o test1.asm

test2.o: test2.asm
	nasm -f elf$(LBITS) -o test2.o test2.asm

test1: test1.o
	ld -o test1 test1.o

test2: test2.o
	ld -o test2 test2.o

clean:
	rm -rf _obj *.o *~ *.6 *.gch a.out test *.asm test1 test2<commit_msg>Rewrote the makefile for testing the samples<commit_after>LBITS := $(shell getconf LONG_BIT)
SOURCES := $(sort $(wildcard *.bts))
ASMSOURCES := $(SOURCES:.bts=.asm)
OBJECTS := $(ASMSOURCES:.asm=.o)
TARGETS := $(OBJECTS:.o=.elf)

all: $(TARGETS)

%.asm: %.bts
	@echo "--- $< ---"
	@echo -en "\tGenerating $@ from $<... "
	@<$< ../battlestar -platform=$(LBITS) 2>/dev/null > $@ && echo ok

%.o: %.asm
	@echo -en "\tCompiling $<... "
	@nasm -f elf$(LBITS) -o $@ $< && echo ok

%.elf: %.o
	@echo -en "\tLinking $@... "
	@ld --fatal-warnings -pie -nostdlib --relax -o $@ $< && echo ok

clean:
	@echo 'Cleaning...'
	@rm -rf _obj *~ *.6 *.gch a.out $(ASMSOURCES) $(OBJECTS) $(TARGETS)
{'fraction_non_alphanumeric': 0.21969080553295361, 'fraction_numerical': 0.027664768104149716, 'mean_word_length': 3.1137123745819397, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 9, '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': '2047390', 'n_tokens_mistral': 582, 'n_tokens_neox': 530, 'n_words': 133}