Estado atual do TinyBlocks: editor estilo Scratch + graphics como interface
Snapshot do projeto antes de implementar o diálogo "Criar um Bloco": - runtime C block-based (src/, include/) - libraries: graphics (interface), sdl2 (backend), editor (estilo Scratch), python, mcp - exemplos (hello, sdl2, editor, vector, json, customappearance, python, mcp) - Makefile com alvo help e build do editor Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
commit
4950ad6006
49 files changed
+10596
No files matched your search
@@ -0,0 +1,43 @@
|
||||
CC := gcc
|
||||
BUILD := ../../build
|
||||
|
||||
SDL2_CFLAGS := $(shell sdl2-config --cflags)
|
||||
SDL2_LIBS := $(shell sdl2-config --libs)
|
||||
SDL2TTF_CFLAGS:= $(shell pkg-config --cflags SDL2_ttf 2>/dev/null)
|
||||
SDL2TTF_LIBS := $(shell pkg-config --libs SDL2_ttf 2>/dev/null)
|
||||
|
||||
ifeq ($(SDL2TTF_LIBS),)
|
||||
$(error SDL2_ttf não encontrado. Instale: sudo apt install libsdl2-ttf-dev)
|
||||
endif
|
||||
|
||||
CFLAGS := -std=c11 -Wall -Wextra -pedantic -fvisibility=hidden \
|
||||
-D_POSIX_C_SOURCE=200809L \
|
||||
-I../../include \
|
||||
-Iinclude \
|
||||
$(SDL2_CFLAGS) $(SDL2TTF_CFLAGS)
|
||||
|
||||
LDFLAGS := $(SDL2_LIBS) $(SDL2TTF_LIBS) -lm
|
||||
|
||||
OBJ := $(BUILD)/tb_editor.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)
|
||||
|
||||
$(OBJ): src/tb_editor.c include/tb_editor.h
|
||||
@mkdir -p $(BUILD)
|
||||
$(CC) $(CFLAGS) -fPIC -c $< -o $@
|
||||
|
||||
$(LIB_A): $(OBJ)
|
||||
ar rcs $@ $^
|
||||
|
||||
$(LIB_SO): $(OBJ)
|
||||
$(CC) -shared -o $@ $^ $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
$(RM) $(OBJ) $(LIB_A) $(LIB_SO)
|
||||
Reference in new issue
Block a user