tinyblocks-environ (categoria "Ambiente"): - blocos Environ.Get/Set/Has/Unset (store chave->valor; Get cai no getenv). - API C enumeravel (count/key/value_at/get/has/set/unset) e tb_environ_export_csv(path) com escape de CSV; tb_environ_reset. - library.toml com metadados; Makefile proprio (.a/.so). Editor: - biblioteca de settings no store da environ, com valores iniciais (autor, projeto, tema, escala, autosave). - tela "Configurações" (botao Config no menu): lista as chaves, edita o valor da linha (Enter confirma, Esc cancela), "+ Nova" cria chave, Delete remove, campo de caminho + botoes "Salvar" e "Exportar CSV". - Ctrl/scroll e foco de texto integrados ao mesmo fluxo do libman. Build/testes: - environ entra em CAT_LIBS (compila no editor, no harness e no libman). - make test-environ (store, fallback getenv, escape CSV, blocos). - harness: passo 18 cobre abrir Configuracoes, editar valor, salvar CSV e verificar o conteudo; Esc fecha.
50 lines
1.7 KiB
Makefile
50 lines
1.7 KiB
Makefile
# Makefile da library editor (editor visual estilo Scratch)
|
|
# Constroi build/libtinyblocks-editor.a e build/libtinyblocks-editor.so
|
|
# Inclui o widget Editor.Stage (tb_stage.c).
|
|
CC := gcc
|
|
BUILD := build
|
|
CORE := ../../build
|
|
|
|
CFLAGS := -std=c11 -Wall -Wextra -pedantic -fvisibility=hidden \
|
|
-D_POSIX_C_SOURCE=200809L \
|
|
-I../../include -Iinclude -Isrc \
|
|
-I../tinyblocks-graphics/include \
|
|
-I../tinyblocks-variables/include \
|
|
-I../tinyblocks-blueprint/include \
|
|
-I../tinyblocks-environ/include \
|
|
-I../tinyblocks-api/include \
|
|
-I../tinyblocks-libman/include
|
|
|
|
OBJ := $(BUILD)/tb_editor.o $(BUILD)/tb_stage_widget.o
|
|
LIB_A := $(BUILD)/libtinyblocks-editor.a
|
|
LIB_SO := $(BUILD)/libtinyblocks-editor.so
|
|
|
|
.PHONY: all static shared clean
|
|
all: static shared
|
|
static: $(LIB_A)
|
|
shared: $(LIB_SO)
|
|
|
|
$(BUILD)/tb_editor.o: src/tb_editor.c include/tb_editor.h src/tb_stage_widget.h \
|
|
../tinyblocks-graphics/include/tb_graphics.h \
|
|
../tinyblocks-variables/include/tb_variables.h \
|
|
../tinyblocks-blueprint/include/tb_blueprint.h \
|
|
../tinyblocks-environ/include/tb_environ.h \
|
|
../tinyblocks-api/include/tb_api.h \
|
|
../tinyblocks-libman/include/tb_libman.h
|
|
@mkdir -p $(BUILD)
|
|
$(CC) $(CFLAGS) -fPIC -c $< -o $@
|
|
|
|
$(BUILD)/tb_stage_widget.o: src/tb_stage_widget.c src/tb_stage_widget.h \
|
|
../tinyblocks-graphics/include/tb_graphics.h
|
|
@mkdir -p $(BUILD)
|
|
$(CC) $(CFLAGS) -fPIC -c $< -o $@
|
|
|
|
$(LIB_A): $(OBJ)
|
|
ar rcs $@ $^
|
|
|
|
$(LIB_SO): $(OBJ)
|
|
$(CC) -shared -o $@ $^ -ldl
|
|
|
|
clean:
|
|
$(RM) -r $(BUILD)
|