aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile17
-rw-r--r--README.md4
2 files changed, 12 insertions, 9 deletions
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)
diff --git a/README.md b/README.md
index 6e92981..23936f7 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@ Vega는 **인터페이스 구현자**이며 하나의 **aup 라이브러리**다
[설계 001](docs/design/001-first-component.md).
```sh
-make # build/vega (옆의 ../pure 체크아웃을 링크)
+make # build/vega (옆의 ../pure 체크아웃의 libpure.a를 링크)
AUP_PATH=lib ../aup/build/aup build examples/todo.aup -o todo.pmod
build/vega tui todo.pmod --store ~/.todo # 터미널. 글자 입력 후 Enter, Tab으로 키 모드, Ctrl-C로 끝.
# --store가 있으면 목록이 다음 실행에도 남는다(어느 표면이든)
@@ -24,7 +24,7 @@ make check # 참조 모델 대조, 프레임
```sh
AUP_PATH=lib ../aup/build/aup build examples/board.aup -o board.pmod
build/vega tui board.pmod --store ~/.board # 사람: 제목을 쓰고 Enter, Tab 뒤 ←→로 칸을 옮긴다
-../pure/prototypes/connections/build/pure-serve --module board.pmod --store ~/.board --threads 2 &
+../pure/build/pure-serve --module board.pmod --store ~/.board --threads 2 &
curl -s localhost:8767/views/counts # 1 to do, 1 doing, 0 done
curl -s -X POST -H 'Content-Type: application/json' -d '{"title": "ship it", "lane": 2}' localhost:8767/inputs/post
curl -s 'localhost:8767/views/cards_list?from=0&count=20'