diff options
| author | Anders Betts <anders.betts@gmail.com> | 2026-09-17 21:26:20 +0200 |
|---|---|---|
| committer | Anders Betts <anders.betts@gmail.com> | 2026-09-17 21:26:20 +0200 |
| commit | ed1c15929d2eb2dbc6432986c26661bf1549964a (patch) | |
| tree | 4f04934edef686b19d16e1bb2f79bb5c15e142de /Makefile | |
| parent | 380195f7cd5e57acf2c1cf2bc41069e6b0b979ed (diff) | |
| download | bokf-d8175a8f76bc5eefa2524f2b245cb8a5b45864ba.tar.gz bokf-d8175a8f76bc5eefa2524f2b245cb8a5b45864ba.zip | |
Add native TLS transport, TLS clients and lego cert sidecarv0.1.1
- bokfd: optional TLS listener (OpenSSL), certificate reload on change
- clients: tls:host:port targets with chain and host verification
- compose: port 8788 and an INWX/lego renewal sidecar
- Makefile: header dependency tracking (-MMD -MP)
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 32 |
1 files changed, 20 insertions, 12 deletions
@@ -4,7 +4,8 @@ VERSION = 0.1.0-dev WARN = -Wall -Wextra -Wshadow -Wstrict-prototypes -Wmissing-prototypes \ -Wpointer-arith -Wvla -Wformat=2 -CPPFLAGS = -Isrc -Ivendor -Ivendor/argon2 +DEPFLAGS = -MMD -MP +CPPFLAGS = -Isrc -Iclients -Ivendor -Ivendor/argon2 DEFS = -D_GNU_SOURCE -DARGON2_NO_THREADS -DBOKF_VERSION=\"$(VERSION)\" BUILD = build @@ -23,40 +24,47 @@ CORE_OBJ = $(patsubst %.c,$(BUILD)/%.o,$(CORE_SRC)) all: $(BUILD)/bokfd $(BUILD)/bokfctl $(BUILD)/bokftui +SSL_LIBS = -lssl -lcrypto + $(BUILD)/bokfd: $(BUILD)/src/bokfd.o $(CORE_OBJ) $(VENDOR_OBJ) - $(CC) $(CFLAGS) -o $@ $^ -lm + $(CC) $(CFLAGS) -o $@ $^ -lm $(SSL_LIBS) -$(BUILD)/bokfctl: $(BUILD)/clients/bokfctl.o $(BUILD)/src/util.o \ - $(BUILD)/src/log.o $(BUILD)/vendor/yyjson.o \ +$(BUILD)/bokfctl: $(BUILD)/clients/bokfctl.o $(BUILD)/clients/client.o \ + $(BUILD)/src/util.o $(BUILD)/src/log.o $(BUILD)/vendor/yyjson.o \ $(BUILD)/vendor/sha256.o - $(CC) $(CFLAGS) -o $@ $^ -lm + $(CC) $(CFLAGS) -o $@ $^ -lm $(SSL_LIBS) $(BUILD)/bokftui: $(BUILD)/clients/bokftui.o $(BUILD)/clients/client.o \ $(BUILD)/src/util.o $(BUILD)/src/log.o $(BUILD)/src/formula.o \ $(BUILD)/vendor/yyjson.o $(BUILD)/vendor/sha256.o - $(CC) $(CFLAGS) -o $@ $^ -lm -lncursesw + $(CC) $(CFLAGS) -o $@ $^ -lm -lncursesw $(SSL_LIBS) -$(BUILD)/test_core: $(BUILD)/tests/test_core.o $(CORE_OBJ) $(VENDOR_OBJ) - $(CC) $(CFLAGS) -o $@ $^ -lm +$(BUILD)/test_core: $(BUILD)/tests/test_core.o $(BUILD)/clients/client.o \ + $(CORE_OBJ) $(VENDOR_OBJ) + $(CC) $(CFLAGS) -o $@ $^ -lm $(SSL_LIBS) test: $(BUILD)/test_core $(BUILD)/test_core $(BUILD)/vendor/%.o: vendor/%.c @mkdir -p $(dir $@) - $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -w -c $< -o $@ + $(CC) $(CFLAGS) $(DEPFLAGS) $(CPPFLAGS) $(DEFS) -w -c $< -o $@ $(BUILD)/src/%.o: src/%.c @mkdir -p $(dir $@) - $(CC) $(CFLAGS) $(WARN) $(CPPFLAGS) $(DEFS) -c $< -o $@ + $(CC) $(CFLAGS) $(DEPFLAGS) $(WARN) $(CPPFLAGS) $(DEFS) -c $< -o $@ $(BUILD)/clients/%.o: clients/%.c @mkdir -p $(dir $@) - $(CC) $(CFLAGS) $(WARN) $(CPPFLAGS) $(DEFS) -c $< -o $@ + $(CC) $(CFLAGS) $(DEPFLAGS) $(WARN) $(CPPFLAGS) $(DEFS) -c $< -o $@ $(BUILD)/tests/%.o: tests/%.c @mkdir -p $(dir $@) - $(CC) $(CFLAGS) $(WARN) $(CPPFLAGS) $(DEFS) -c $< -o $@ + $(CC) $(CFLAGS) $(DEPFLAGS) $(WARN) $(CPPFLAGS) $(DEFS) -c $< -o $@ + +-include $(VENDOR_OBJ:.o=.d) $(CORE_OBJ:.o=.d) $(BUILD)/src/bokfd.d \ + $(BUILD)/clients/bokfctl.d $(BUILD)/clients/bokftui.d \ + $(BUILD)/clients/client.d $(BUILD)/tests/test_core.d install: all install -d $(DESTDIR)/usr/local/bin $(DESTDIR)/usr/local/share/bokf |
