- 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).
35 lines
879 B
Makefile
35 lines
879 B
Makefile
# Makefile da library sdl2 (backend grafico SDL2)
|
|
# Constroi build/libtinyblocks-sdl2.a e build/libtinyblocks-sdl2.so
|
|
CC := gcc
|
|
BUILD := build
|
|
|
|
SDL2_CFLAGS := $(shell sdl2-config --cflags)
|
|
SDL2_LIBS := $(shell sdl2-config --libs)
|
|
|
|
CFLAGS := -std=c11 -Wall -Wextra -pedantic -fvisibility=hidden \
|
|
-I../../include -I../tinyblocks-graphics/include -Iinclude \
|
|
$(SDL2_CFLAGS)
|
|
LDFLAGS := $(SDL2_LIBS) -lm
|
|
|
|
OBJ := $(BUILD)/tb_sdl2.o
|
|
LIB_A := $(BUILD)/libtinyblocks-sdl2.a
|
|
LIB_SO := $(BUILD)/libtinyblocks-sdl2.so
|
|
|
|
.PHONY: all static shared clean
|
|
all: static shared
|
|
static: $(LIB_A)
|
|
shared: $(LIB_SO)
|
|
|
|
$(OBJ): src/tb_sdl2.c include/tb_sdl2.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 $@ $^ $(LDFLAGS)
|
|
|
|
clean:
|
|
$(RM) -r $(BUILD)
|