aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-09-27 13:45:31 +0100
committereunhhu <[email protected]>2026-09-27 13:45:31 +0100
commit2920e389f624263efe515d9a5f33f6b822efff5e (patch)
tree098011662955822230b3baa3141b997092d96153 /Makefile
parente650c341704e1b7f4c9d5a05bfa745c54002a599 (diff)
downloadvega-2920e389f624263efe515d9a5f33f6b822efff5e.tar.gz
vega-2920e389f624263efe515d9a5f33f6b822efff5e.zip
Name Vega's parts: lib/, surfaces/ and symbols/
src/ held two parts, the surfaces that show modules to people and the symbol format with its CPU and GPU drawing. As in Pure (design 009), top level directories are now the parts, and the README says what each builds.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 9 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 9724e65..02d82f2 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,10 @@ PURE ?= ../pure
AUP ?= ../aup
LIBPURE = $(PURE)/build/libpure.a
-SOURCES = src/screen.c src/draw.c src/width.c src/web.c src/main.c
+# Parts: lib/ (the aup library: the interface vocabulary), surfaces/ (the vega
+# host: TUI, CLI, NUI sentences, web), symbols/ (glyphs and icons as one
+# format, drawn by CPU or GPU).
+SURFACES = surfaces/screen.c surfaces/draw.c surfaces/width.c surfaces/web.c surfaces/main.c
.PHONY: all check FORCE
all: $(BUILD)/vega $(BUILD)/vega-symbols
@@ -19,16 +22,17 @@ $(BUILD):
$(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 $@
+$(BUILD)/vega: $(SURFACES) surfaces/vega.h $(LIBPURE) | $(BUILD)
+ $(CC) $(CPPFLAGS) $(CFLAGS) -I$(PURE)/core $(SURFACES) $(LIBPURE) $(LDFLAGS) -lm $(LDLIBS) -o $@
# Building symbol files reads fonts through FreeType; reading them does not.
FREETYPE_CFLAGS ?= $(shell pkg-config --cflags freetype2)
FREETYPE_LIBS ?= $(shell pkg-config --libs freetype2)
# Drawing them on the GPU takes OpenGL ES 3.1 through EGL.
GL_LIBS ?= $(shell pkg-config --libs egl glesv2)
-$(BUILD)/vega-symbols: src/symbols-tool.c src/symbols.c src/symbols.h src/symbols-gl.c src/symbols-gl.h | $(BUILD)
- $(CC) $(CPPFLAGS) $(CFLAGS) $(FREETYPE_CFLAGS) src/symbols-tool.c src/symbols.c src/symbols-gl.c $(LDFLAGS) \
+SYMBOLS = symbols/symbols.c symbols/symbols-gl.c
+$(BUILD)/vega-symbols: symbols/symbols-tool.c $(SYMBOLS) symbols/symbols.h symbols/symbols-gl.h | $(BUILD)
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(FREETYPE_CFLAGS) symbols/symbols-tool.c $(SYMBOLS) $(LDFLAGS) \
$(FREETYPE_LIBS) $(GL_LIBS) -lm $(LDLIBS) -o $@
check: $(BUILD)/vega $(BUILD)/vega-symbols