- tb_editor_internal.h e tb_editor_modules.h (antes em internal/) e tb_stage_widget.h (antes em src/) foram para libraries/tinyblocks-editor/include/. - Os três são API privada: só compilam com TB_EDITOR_PRIVATE_API (o editor, os módulos do bundle e o harness definem); fora disso um #error manda incluir tb_editor.h. - Includes viraram <tb_editor_internal.h> etc.; Makefiles sem -Isrc / -Iinternal; library.toml descreve os fontes e o define. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
44 lines
1.4 KiB
Makefile
44 lines
1.4 KiB
Makefile
# Makefile da library privada tinyblocks-editor-image
|
|
# Bundle "tinyblocks-editor". Constroi .a e .so.
|
|
CC := gcc
|
|
BUILD := build
|
|
|
|
CFLAGS := -std=c11 -Wall -Wextra -pedantic \
|
|
-DTB_EDITOR_IMAGE_BUILD \
|
|
-D_POSIX_C_SOURCE=200809L \
|
|
-I../../../../include -Iinclude \
|
|
-I../../include -DTB_EDITOR_PRIVATE_API \
|
|
-I../tinyblocks-editor-widgets/include \
|
|
-I../tinyblocks-editor-files/include \
|
|
-I../../../tinyblocks-graphics/include \
|
|
-I../../../tinyblocks-variables/include \
|
|
-I../../../tinyblocks-blueprint/include \
|
|
-I../../../tinyblocks-environ/include \
|
|
-I../../../tinyblocks-api/include \
|
|
-I../../../tinyblocks-libman/include \
|
|
-I../../../tinyblocks-syntax/include
|
|
|
|
OBJS := $(BUILD)/tb_editor_image.o
|
|
LIB_A := $(BUILD)/libtinyblocks-editor-image.a
|
|
LIB_SO := $(BUILD)/libtinyblocks-editor-image.so
|
|
|
|
.PHONY: all static shared clean
|
|
all: static shared
|
|
static: $(LIB_A)
|
|
shared: $(LIB_SO)
|
|
|
|
$(BUILD)/tb_editor_image.o: src/tb_editor_image.c include/tb_editor_image.h \
|
|
../../include/tb_editor_internal.h \
|
|
../tinyblocks-editor-widgets/include/tb_editor_widgets.h
|
|
@mkdir -p $(BUILD)
|
|
$(CC) $(CFLAGS) -fPIC -c $< -o $@
|
|
|
|
$(LIB_A): $(OBJS)
|
|
ar rcs $@ $^
|
|
|
|
$(LIB_SO): $(OBJS)
|
|
$(CC) -shared -o $@ $^ -Wl,-z,lazy
|
|
|
|
clean:
|
|
$(RM) -r $(BUILD)
|