diff options
| author | eunhhu <[email protected]> | 2026-09-29 07:06:27 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-29 07:06:27 +0100 |
| commit | a052b95c8135cdc5f9b91f8efc991cac80fbbe8b (patch) | |
| tree | 2b7b0d7a0ccd5bc6ceaa603a01eb87deb6c1f2e8 /Makefile | |
| parent | 0b4a9f7225b5873e606106b8eaf9174b254c0c0f (diff) | |
| download | pure-a052b95c8135cdc5f9b91f8efc991cac80fbbe8b.tar.gz pure-a052b95c8135cdc5f9b91f8efc991cac80fbbe8b.zip | |
Put the links and the crypto they use in link/, a part of their own
libpure-link.a holds them; pure-serve and the M5 harness link it instead
of naming its source files.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 32 |
1 files changed, 21 insertions, 11 deletions
@@ -10,24 +10,29 @@ BUILD ?= build # states as drafts; state.h and store.h are what it asks of storage. # store/ the tree store (one file; commits are one contiguous write and one # sync; formats PURETRE3 and PUREREC1). -# serve/ pure-serve: the HTTP host, outbound delivery, JSON in place; with -# pure-crypto.so beside it, OpenSSL's part (TLS to https receivers, -# sealed sends), mapped only by a server that uses one. +# link/ links without connections (UDP, sealed, no handshake) and the +# crypto they and sealed sends use; with pure-crypto.so beside it, +# OpenSSL's part (TLS to https receivers, sealing), mapped only by a +# process that uses one. +# serve/ pure-serve: the HTTP host, outbound delivery, JSON in place. # cli/ command-line hosts. # libpure.a is the app model with the tree store: what a host embeds (Vega's -# surfaces link it). prototypes/ keeps the earlier document runtime (000-077). +# surfaces link it); libpure-link.a is the links with the crypto loader. +# prototypes/ keeps the earlier document runtime (000-077). # Unit tests sit by their part (core/test-module.c, store/test-tree-store.c, # store/test-log.c, serve/test-message-json.c); # tests/check.py checks the hosts end to end. INCLUDES = -Icore MODEL = core/module.c core/module-list.c core/module-save.c core/module-text.c core/module-store.c core/flow.c STORE = store/store-tree.c store/store-log.c -SERVE = serve/serve.c serve/deliver.c serve/link.c serve/message-json.c serve/crypto.c -HEADERS = $(wildcard core/*.h) $(wildcard serve/*.h) $(wildcard store/*.h) +LINK = link/link.c link/crypto.c +SERVE = serve/serve.c serve/deliver.c serve/message-json.c +HEADERS = $(wildcard core/*.h) $(wildcard link/*.h) $(wildcard serve/*.h) $(wildcard store/*.h) OBJECTS = $(patsubst %.c,$(BUILD)/obj/%.o,$(MODEL) $(STORE)) +LINK_OBJECTS = $(patsubst %.c,$(BUILD)/obj/%.o,$(LINK)) .PHONY: all check -all: $(BUILD)/libpure.a $(BUILD)/pure-serve $(BUILD)/pure-crypto.so $(BUILD)/pure-run $(BUILD)/pure-edit-module +all: $(BUILD)/libpure.a $(BUILD)/libpure-link.a $(BUILD)/pure-serve $(BUILD)/pure-crypto.so $(BUILD)/pure-run $(BUILD)/pure-edit-module $(BUILD)/obj/%.o: %.c $(HEADERS) @mkdir -p $(dir $@) @@ -37,15 +42,20 @@ $(BUILD)/libpure.a: $(OBJECTS) rm -f $@ $(AR) rcs $@ $^ +$(BUILD)/libpure-link.a: $(LINK_OBJECTS) + rm -f $@ + $(AR) rcs $@ $^ + # The runtime's tickets and budgets, with effects completed off the owner thread. # It links after the library, last as it always was, so code keeps its place. # The app model's functions are exported for a surface it maps (serve/surface.h). -$(BUILD)/pure-serve: $(SERVE) core/runtime.c $(BUILD)/libpure.a $(HEADERS) - $(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDES) -Iserve -DPURE_ASYNC_EFFECTS $(SERVE) $(BUILD)/libpure.a core/runtime.c \ +$(BUILD)/pure-serve: $(SERVE) core/runtime.c $(BUILD)/libpure.a $(BUILD)/libpure-link.a $(HEADERS) + $(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDES) -Ilink -Iserve -DPURE_ASYNC_EFFECTS $(SERVE) $(BUILD)/libpure-link.a \ + $(BUILD)/libpure.a core/runtime.c \ $(LDFLAGS) -Wl,--export-dynamic-symbol='pure_*' -lm -pthread $(LDLIBS) -o $@ -$(BUILD)/pure-crypto.so: serve/crypto-openssl.c $(HEADERS) - $(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDES) -Iserve -fPIC -shared serve/crypto-openssl.c $(LDFLAGS) -lssl -lcrypto \ +$(BUILD)/pure-crypto.so: link/crypto-openssl.c $(HEADERS) + $(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -shared link/crypto-openssl.c $(LDFLAGS) -lssl -lcrypto \ $(LDLIBS) -o $@ $(BUILD)/pure-run: cli/pure-run.c $(BUILD)/libpure.a $(HEADERS) |
