aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 60f2d060f1b131eaf75c6da4c993e6f6b542d2d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CC ?= cc
CFLAGS ?= -O2 -g
CFLAGS += -std=c17 -Wall -Wextra -Wpedantic -Werror
BUILD ?= build
# The Pure checkout that owns the module format; tests load every module with it.
PURE ?= ../pure/prototypes/connections

.PHONY: all check
all: $(BUILD)/aup

$(BUILD):
	mkdir -p $@

$(BUILD)/aup: src/main.c src/compile.c src/aup.h | $(BUILD)
	$(CC) $(CPPFLAGS) $(CFLAGS) src/main.c src/compile.c $(LDFLAGS) $(LDLIBS) -o $@

check: $(BUILD)/aup
	$(MAKE) -C $(PURE) BUILD=build build/pure-run build/pure-edit-module build/pure-serve
	$(MAKE) -C $(PURE) BUILD=build/tree STORE=store-tree.c build/tree/pure-edit build/tree/pure-connections
	python3 tests/check.py --aup $(BUILD)/aup --pure-run $(PURE)/build/pure-run --pure $(PURE)