- Nova library tinyblocks-scratchblocks: converte uma aba (TbBpTab da
blueprint) para o texto do fórum e de volta. Blocos com equivalente no
Scratch saem em inglês ("when flag clicked", "repeat (10)", "set [x v]
to (0)", "if <> then ... else ... end", listas, operadores, sensores);
os do TinyBlocks usam o rótulo em português com "::categoria". A
importação aceita as duas formas, comentários "//", "::categoria",
escapes e as tags [scratchblocks]. Forma, tipo dos campos e categoria
vêm por callbacks (a library não conhece o editor).
- Editor: "Exportar scratchblocks" no menu Exportar (aba atual -> .txt);
"Abrir" aceita .txt/.sb e cria uma aba com os scripts.
- test-scratchblocks + cenário de ida e volta no harness.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
812 B
Makefile
30 lines
812 B
Makefile
# Makefile da library scratchblocks (notacao de texto do forum do Scratch)
|
|
# Constroi build/libtinyblocks-scratchblocks.a e build/libtinyblocks-scratchblocks.so
|
|
CC := gcc
|
|
BUILD := build
|
|
|
|
CFLAGS := -std=c11 -Wall -Wextra -pedantic -fvisibility=hidden \
|
|
-I../../include -Iinclude -I../tinyblocks-blueprint/include
|
|
|
|
OBJ := $(BUILD)/tb_scratchblocks.o
|
|
LIB_A := $(BUILD)/libtinyblocks-scratchblocks.a
|
|
LIB_SO := $(BUILD)/libtinyblocks-scratchblocks.so
|
|
|
|
.PHONY: all static shared clean
|
|
all: static shared
|
|
static: $(LIB_A)
|
|
shared: $(LIB_SO)
|
|
|
|
$(OBJ): src/tb_scratchblocks.c include/tb_scratchblocks.h ../tinyblocks-blueprint/include/blueprint.h
|
|
@mkdir -p $(BUILD)
|
|
$(CC) $(CFLAGS) -fPIC -c $< -o $@
|
|
|
|
$(LIB_A): $(OBJ)
|
|
ar rcs $@ $^
|
|
|
|
$(LIB_SO): $(OBJ)
|
|
$(CC) -shared -o $@ $^
|
|
|
|
clean:
|
|
$(RM) -r $(BUILD)
|