diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -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) |
