CFLAGS ?= -std=c99 -Wall -Werror -static -g -O0 .DEFAULT_GOAL := all BOOTSTRAP_SOURCES = boot/catboot.c boot/common.c boot/lex.c boot/tree.c boot/visit.c boot/parse.c BOOTSTRAP_TEST_SOURCES = boot/tests/test.c SOURCES = src/catskill.csk build/catskill: build $(SOURCES) echo "No catskill compiler exists yet. Building empty file." touch ./build/catskill build/catboot: build $(BOOTSTRAP_SOURCES) $(CC) $(CFLAGS) -o ./build/catboot ./boot/catboot.c build/catboot-test: build $(BOOTSTRAP_TEST_SOURCES) $(CC) $(CFLAGS) -o ./build/catboot-test ./boot/tests/test.c build: mkdir -p ./build .PHONY: all run run-boot clean test test-all all: build/catskill build/catboot build/catboot-test run: build/catskill echo "Not implemented yet." run-boot: build/catboot ./build/catboot $(ARGS) test: build/catboot-test ./build/catboot-test $(ARGS) test-all: build/catboot-test ./build/catboot-test all clean: rm -rf build/*