blob: 1f6677b1ed26de6759321c8bde1c0237dd7d12c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
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
test: build/catboot-test
./build/catboot-test
test-all: build/catboot-test
./build/catboot-test all
clean:
rm -rf build/*
|