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>
31 lines
652 B
Makefile
31 lines
652 B
Makefile
CC := gcc
|
|
CFLAGS := -std=c11 -Wall -Wextra -pedantic -fvisibility=hidden \
|
|
-I../../include \
|
|
$(shell sdl2-config --cflags)
|
|
LDFLAGS := $(shell sdl2-config --libs)
|
|
|
|
BUILD := ../../build
|
|
LIB_SO := $(BUILD)/libtinyblocks-sdl2.so
|
|
LIB_A := $(BUILD)/libtinyblocks-sdl2.a
|
|
OBJ := $(BUILD)/tb_sdl2.o
|
|
|
|
.PHONY: all clean shared static
|
|
|
|
all: shared static
|
|
|
|
shared: $(LIB_SO)
|
|
static: $(LIB_A)
|
|
|
|
$(OBJ): src/tb_sdl2.c include/tb_sdl2.h
|
|
@mkdir -p $(BUILD)
|
|
$(CC) $(CFLAGS) -fPIC -c src/tb_sdl2.c -o $@
|
|
|
|
$(LIB_SO): $(OBJ)
|
|
$(CC) -shared -o $@ $^ $(LDFLAGS)
|
|
|
|
$(LIB_A): $(OBJ)
|
|
ar rcs $@ $^
|
|
|
|
clean:
|
|
$(RM) $(OBJ) $(LIB_SO) $(LIB_A)
|