From e650c341704e1b7f4c9d5a05bfa745c54002a599 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Sun, 27 Sep 2026 13:14:46 +0100 Subject: Link Pure's libpure.a instead of compiling its sources Pure builds the app model and the tree store as one library with headers in core/; Vega no longer lists Pure's files, so a new one there cannot break it. --- Makefile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d121123..9724e65 100644 --- a/Makefile +++ b/Makefile @@ -2,22 +2,25 @@ CC ?= cc CFLAGS ?= -O2 -g CFLAGS += -std=c17 -Wall -Wextra -Wpedantic -Werror BUILD ?= build -# Sibling checkouts: Pure runs the modules, aup builds them. -PURE ?= ../pure/prototypes/connections +# Sibling checkouts: Pure runs the modules (libpure.a: the app model and the +# tree store, headers in core/), aup builds them. +PURE ?= ../pure AUP ?= ../aup +LIBPURE = $(PURE)/build/libpure.a -PURE_SOURCES = $(PURE)/module.c $(PURE)/module-list.c $(PURE)/module-save.c $(PURE)/module-store.c \ - $(PURE)/module-text.c $(PURE)/store-tree.c SOURCES = src/screen.c src/draw.c src/width.c src/web.c src/main.c -.PHONY: all check +.PHONY: all check FORCE all: $(BUILD)/vega $(BUILD)/vega-symbols $(BUILD): mkdir -p $@ -$(BUILD)/vega: $(SOURCES) src/vega.h $(PURE_SOURCES) | $(BUILD) - $(CC) $(CPPFLAGS) $(CFLAGS) -I$(PURE) $(SOURCES) $(PURE_SOURCES) $(LDFLAGS) -lm $(LDLIBS) -o $@ +$(LIBPURE): FORCE + $(MAKE) -C $(PURE) build/libpure.a + +$(BUILD)/vega: $(SOURCES) src/vega.h $(LIBPURE) | $(BUILD) + $(CC) $(CPPFLAGS) $(CFLAGS) -I$(PURE)/core $(SOURCES) $(LIBPURE) $(LDFLAGS) -lm $(LDLIBS) -o $@ # Building symbol files reads fonts through FreeType; reading them does not. FREETYPE_CFLAGS ?= $(shell pkg-config --cflags freetype2) -- cgit v1.2.3