<commit_before>hide = @

BOOTSTRAP = \
	cowboot bootstrap/bootstrap.lua bootstrap/cowgol.c bootstrap/cowgol.h

TEST_SRCS =	\
	$(wildcard tests/*.test.cow) \
	$(wildcard src/*.test.cow)

TEST_BINS = $(patsubst %.test.cow,.obj/%.test.exe,$(TEST_SRCS))
TEST_STAMPS = $(patsubst %.test.cow,.obj/%.stamp,$(TEST_SRCS))

TOKENISER_SRCS = \
	src/string_lib.cow \
	src/ctype_lib.cow \
	src/numbers_lib.cow \
	src/things.cow \
	src/tokeniser/strings.cow \
	src/tokeniser/lexer.cow \
	src/_token_names.cow \
	src/tokeniser/tokeniser.cow \
	src/_token_maker.cow \
	src/tokeniser/main.cow

PARSER_SRCS = \
	src/string_lib.cow \
	src/ctype_lib.cow \
	src/numbers_lib.cow \
	src/things.cow \
	src/_token_names.cow \
	src/utils/stringtable.cow \
	src/iops.cow \
	src/parser/globals.cow \
	src/parser/symbols.cow \
	src/utils/symbols.cow \
	src/parser/iopwriter.cow \
	src/parser/tokenreader.cow \
	src/parser/constant.cow \
	src/utils/types.cow \
	src/parser/types.cow \
	src/parser/expression.cow \
	src/parser/main.cow

TYPECHECKER_SRCS = \
	src/string_lib.cow \
	src/things.cow \
	src/iops.cow \
	src/utils/stringtable.cow \
	src/utils/iopreader.cow \
	src/utils/iopwriter.cow \
	src/utils/symbols.cow \
	src/_token_names.cow \
	src/utils/types.cow \
	src/typechecker/temporaries.cow \
	src/typechecker/tree.cow \
	src/typechecker/init.cow \
	src/arch/bbc/simplifier.cow \
	src/typechecker/simplifier.cow \
	src/typechecker/main.cow

CODEGEN_SRCS = \
	src/string_lib.cow \
	src/things.cow \
	src/iops.cow \
	src/utils/stringtable.cow \
	src/utils/iopreader.cow \
	src/utils/iopwriter.cow \
	src/_token_names.cow \
	src/utils/symbols.cow \
	src/codegen/temporaries.cow \
	src/codegen/ea.cow \
	src/codegen/tree.cow \
	src/codegen/queue.cow \
	src/arch/bbc/globals.cow \
	src/arch/bbc/codegen.cow \
	src/codegen/codegen.cow \
	src/codegen/main.cow

THINGSHOWER_SRCS = \
	src/string_lib.cow \
	src/things.cow \
	src/utils/stringtable.cow \
	src/thingshower/thingshower.cow

IOPSHOWER_SRCS = \
	src/string_lib.cow \
	src/things.cow \
	src/iops.cow \
	src/utils/stringtable.cow \
	src/iopshower/iopreader.cow \
	src/iopshower/iopshower.cow

all: tests bin/tokeniser bin/parser bin/typechecker bin/codegen bin/thingshower bin/iopshower

bin/tokeniser: $(TOKENISER_SRCS) $(BOOTSTRAP)
	@echo BUILD $@
	@mkdir -p $(dir $@)
	$(hide) ./cowboot -o $@ $(TOKENISER_SRCS)

bin/parser: $(PARSER_SRCS) $(BOOTSTRAP)
	@echo BUILD $@
	@mkdir -p $(dir $@)
	$(hide) ./cowboot -o $@ $(PARSER_SRCS)

bin/typechecker: $(TYPECHECKER_SRCS) $(BOOTSTRAP)
	@echo BUILD $@
	@mkdir -p $(dir $@)
	$(hide) ./cowboot -o $@ $(TYPECHECKER_SRCS)

bin/codegen: $(CODEGEN_SRCS) $(BOOTSTRAP)
	@echo BUILD $@
	@mkdir -p $(dir $@)
	$(hide) ./cowboot -o $@ $(CODEGEN_SRCS)

bin/thingshower: $(THINGSHOWER_SRCS) $(BOOTSTRAP)
	@echo BUILD $@
	@mkdir -p $(dir $@)
	$(hide) ./cowboot -o $@ $(THINGSHOWER_SRCS)

bin/iopshower: $(IOPSHOWER_SRCS) $(BOOTSTRAP)
	@echo BUILD $@
	@mkdir -p $(dir $@)
	$(hide) ./cowboot -o $@ $(IOPSHOWER_SRCS)

.phony: tests
tests: $(TEST_STAMPS)

$(TEST_BINS) parser: cowboot bootstrap/bootstrap.lua bootstrap/cowgol.c bootstrap/cowgol.h
$(TEST_BINS): tests/_test.cow
.obj/src/numbers_lib.test.exe: src/numbers_lib.cow
.obj/src/string_lib.test.exe: src/string_lib.cow<commit_msg>Update makefile to build bbctube now.<commit_after>hide = @

BOOTSTRAP = \
	cowboot bootstrap/bootstrap.lua bootstrap/cowgol.c bootstrap/cowgol.h

TEST_SRCS =	\
	$(wildcard tests/*.test.cow) \
	$(wildcard src/*.test.cow)

TEST_BINS = $(patsubst %.test.cow,.obj/%.test.exe,$(TEST_SRCS))
TEST_STAMPS = $(patsubst %.test.cow,.obj/%.stamp,$(TEST_SRCS))

TOKENISER_SRCS = \
	src/string_lib.cow \
	src/ctype_lib.cow \
	src/numbers_lib.cow \
	src/things.cow \
	src/tokeniser/strings.cow \
	src/tokeniser/lexer.cow \
	src/_token_names.cow \
	src/tokeniser/tokeniser.cow \
	src/_token_maker.cow \
	src/tokeniser/main.cow

PARSER_SRCS = \
	src/string_lib.cow \
	src/ctype_lib.cow \
	src/numbers_lib.cow \
	src/things.cow \
	src/_token_names.cow \
	src/utils/stringtable.cow \
	src/iops.cow \
	src/parser/globals.cow \
	src/parser/symbols.cow \
	src/utils/symbols.cow \
	src/parser/iopwriter.cow \
	src/parser/tokenreader.cow \
	src/parser/constant.cow \
	src/utils/types.cow \
	src/parser/types.cow \
	src/parser/expression.cow \
	src/parser/main.cow

TYPECHECKER_SRCS = \
	src/string_lib.cow \
	src/things.cow \
	src/iops.cow \
	src/utils/stringtable.cow \
	src/utils/iopreader.cow \
	src/utils/iopwriter.cow \
	src/utils/symbols.cow \
	src/_token_names.cow \
	src/utils/types.cow \
	src/typechecker/temporaries.cow \
	src/typechecker/tree.cow \
	src/typechecker/init.cow \
	src/arch/bbc/simplifier.cow \
	src/typechecker/simplifier.cow \
	src/typechecker/main.cow

CODEGEN_SRCS = \
	src/string_lib.cow \
	src/things.cow \
	src/iops.cow \
	src/utils/stringtable.cow \
	src/utils/iopreader.cow \
	src/utils/iopwriter.cow \
	src/_token_names.cow \
	src/utils/symbols.cow \
	src/codegen/temporaries.cow \
	src/codegen/ea.cow \
	src/codegen/tree.cow \
	src/codegen/queue.cow \
	src/arch/bbc/globals.cow \
	src/arch/bbc/codegen.cow \
	src/codegen/codegen.cow \
	src/codegen/main.cow

THINGSHOWER_SRCS = \
	src/string_lib.cow \
	src/things.cow \
	src/utils/stringtable.cow \
	src/thingshower/thingshower.cow

IOPSHOWER_SRCS = \
	src/string_lib.cow \
	src/things.cow \
	src/iops.cow \
	src/utils/stringtable.cow \
	src/iopshower/iopreader.cow \
	src/iopshower/iopshower.cow

BBCTUBE_SRCS = \
	emu/bbctube/bbctube.c \
	emu/bbctube/lib6502.c

all: tests \
	bin/tokeniser bin/parser bin/typechecker bin/thingshower \
	bin/iopshower bin/bbctube

bin/tokeniser: $(TOKENISER_SRCS) $(BOOTSTRAP)
	@echo BUILD $@
	@mkdir -p $(dir $@)
	$(hide) ./cowboot -o $@ $(TOKENISER_SRCS)

bin/parser: $(PARSER_SRCS) $(BOOTSTRAP)
	@echo BUILD $@
	@mkdir -p $(dir $@)
	$(hide) ./cowboot -o $@ $(PARSER_SRCS)

bin/typechecker: $(TYPECHECKER_SRCS) $(BOOTSTRAP)
	@echo BUILD $@
	@mkdir -p $(dir $@)
	$(hide) ./cowboot -o $@ $(TYPECHECKER_SRCS)

bin/codegen: $(CODEGEN_SRCS) $(BOOTSTRAP)
	@echo BUILD $@
	@mkdir -p $(dir $@)
	$(hide) ./cowboot -o $@ $(CODEGEN_SRCS)

bin/thingshower: $(THINGSHOWER_SRCS) $(BOOTSTRAP)
	@echo BUILD $@
	@mkdir -p $(dir $@)
	$(hide) ./cowboot -o $@ $(THINGSHOWER_SRCS)

bin/iopshower: $(IOPSHOWER_SRCS) $(BOOTSTRAP)
	@echo BUILD $@
	@mkdir -p $(dir $@)
	$(hide) ./cowboot -o $@ $(IOPSHOWER_SRCS)

bin/bbctube: $(BBCTUBE_SRCS)
	@echo BUILD $@
	@mkdir -p $(dir $@)
	$(hide) gcc -Og -g -o $@ $(BBCTUBE_SRCS)

.phony: tests
tests: $(TEST_STAMPS)

$(TEST_BINS) parser: cowboot bootstrap/bootstrap.lua bootstrap/cowgol.c bootstrap/cowgol.h
$(TEST_BINS): tests/_test.cow
.obj/src/numbers_lib.test.exe: src/numbers_lib.cow
.obj/src/string_lib.test.exe: src/string_lib.cow
{'fraction_non_alphanumeric': 0.16634313871882933, 'fraction_numerical': 0.0005972823652381663, 'mean_word_length': 3.4269662921348316, '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': '4562830', 'n_tokens_mistral': 3004, 'n_tokens_neox': 3070, 'n_words': 394}