Adiciona libraries toml/fs, metadados .toml e build por library
- tinyblocks-toml: lexer + parser TOML (include/lexeme.h, include/ast.h, src/lexer.c, src/parser.c) e bloco Toml.Get. - tinyblocks-fs: categoria "Arquivos" com FS.Open/Read/Write/Append/Tell/Close. - library.toml em cada library com metadados (categoria, cor, descricao) e receita de build, sem precisar embutir isso no .so. - Makefiles proprios por library com build/ local; Makefile raiz delega. - Palco (tb_stage) movido para o core; pen deixa de depender do editor, o que torna os .so arrastaveis. - Editor linka com -rdynamic para resolver simbolos do core em .so via dlopen. - Testes: test-toml (parser) e test-plugin (dlopen de .so standalone).
This commit is contained in:
1 parent
90d47bf8a0
commit
dc23b92d15
48 files changed
+2405
-744
No files matched your search
@@ -0,0 +1,27 @@
|
||||
# Makefile da library python (embedding CPython)
|
||||
# Constroi build/libtinyblocks-python.so (soname unico p/ um so interpretador)
|
||||
CC := gcc
|
||||
BUILD := build
|
||||
|
||||
PYTHON_CFLAGS := $(shell python3-config --cflags --embed 2>/dev/null || python3-config --cflags)
|
||||
PYTHON_LIBS := $(shell python3-config --ldflags --embed 2>/dev/null || python3-config --ldflags)
|
||||
|
||||
CFLAGS := -std=c11 -Wall -Wextra -pedantic -fvisibility=hidden \
|
||||
-I../../include -Iinclude $(PYTHON_CFLAGS)
|
||||
|
||||
OBJ := $(BUILD)/tb_python_lib.o
|
||||
LIB_SO := $(BUILD)/libtinyblocks-python.so
|
||||
|
||||
.PHONY: all shared clean
|
||||
all: shared
|
||||
shared: $(LIB_SO)
|
||||
|
||||
$(OBJ): src/tb_python.c include/tinyblocks-python/tb_python.h
|
||||
@mkdir -p $(BUILD)
|
||||
$(CC) $(CFLAGS) -fPIC -c $< -o $@
|
||||
|
||||
$(LIB_SO): $(OBJ)
|
||||
$(CC) -shared -Wl,-soname,libtinyblocks-python.so -o $@ $^ $(PYTHON_LIBS)
|
||||
|
||||
clean:
|
||||
$(RM) -r $(BUILD)
|
||||
Reference in new issue
Block a user