aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..fa03acf
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,19 @@
+CC ?= cc
+CFLAGS ?= -O2 -g
+CFLAGS += -std=c17 -Wall -Wextra -Wpedantic -Werror
+BUILD ?= build
+# The Pure checkout that owns module format v1; 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
+ python3 tests/check.py --aup $(BUILD)/aup --pure-run $(PURE)/build/pure-run