Files
tinyblocks/libraries/tinyblocks-ssl/Makefile
T
mguinhosandClaude Opus 5.5 066bb295ed tinyblocks-socket, -ssl, -http e -archive: internet e arquivos compactados em blocos
socket: conexao TCP como TbStream (fluxo com classe read/write/close) e
blocos para conectar, enviar, receber e resolver endereco.
ssl: embrulha um TbStream TCP em TLS (OpenSSL), com SNI e certificado
conferido pelo sistema e pelo nome do host.
http: cliente HTTP/1.1 so sobre TbStream; https:// quando a ssl esta
carregada; Content-Length, chunked e redirecionamentos; GET e POST de
texto e download em segundo plano (.parte ate terminar) com progresso.
archive: lista e extrai .tar e .tar.gz (zlib), nomes longos GNU/pax;
recusa entradas com "../" ou caminho absoluto.

As camadas se acham pelas tabelas no lib_userdata, sem linkar umas com as
outras. test-http usa um servidor local (e a internet, se houver);
test-archive cria os arquivos com tar e Python.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 23:27:08 -03:00

31 lines
763 B
Makefile

# Makefile da library ssl (categoria "SSL")
# Constroi build/libtinyblocks-ssl.a e build/libtinyblocks-ssl.so
CC := gcc
BUILD := build
CFLAGS := -std=c11 -O2 -Wall -Wextra -pedantic -fvisibility=hidden \
-D_POSIX_C_SOURCE=200809L -I../../include -Iinclude -I../tinyblocks-socket/include
SRCS := src/tb_ssl.c
OBJS := $(BUILD)/tb_ssl.o
LIB_A := $(BUILD)/libtinyblocks-ssl.a
LIB_SO := $(BUILD)/libtinyblocks-ssl.so
.PHONY: all static shared clean
all: static shared
static: $(LIB_A)
shared: $(LIB_SO)
$(BUILD)/%.o: src/%.c $(wildcard include/*.h) $(wildcard src/*.h)
@mkdir -p $(BUILD)
$(CC) $(CFLAGS) -fPIC -c $< -o $@
$(LIB_A): $(OBJS)
ar rcs $@ $^
$(LIB_SO): $(OBJS)
$(CC) -shared -o $@ $^ -lssl -lcrypto
clean:
$(RM) -r $(BUILD)