Adiciona registro de formatos no core e tinyblocks-image (ops genericas + Load/Save)
This commit is contained in:
1 parent
fca7aa2f63
commit
f4e2556110
11 files changed
+479
-9
No files matched your search
@@ -29,6 +29,7 @@ CV_DIR := $(LIBDIR)/tinyblocks-curves
|
||||
PPM_DIR := $(LIBDIR)/tinyblocks-ppm
|
||||
BMP_DIR := $(LIBDIR)/tinyblocks-bmp
|
||||
PNG_DIR := $(LIBDIR)/tinyblocks-png
|
||||
IMG_DIR := $(LIBDIR)/tinyblocks-image
|
||||
API_DIR := $(LIBDIR)/tinyblocks-api
|
||||
LIBM_DIR := $(LIBDIR)/tinyblocks-libman
|
||||
ED_DIR := $(LIBDIR)/tinyblocks-editor
|
||||
@@ -84,12 +85,12 @@ LIB_LDFLAGS := -L$(ED_DIR)/build -L$(GX_DIR)/build -L$(SD_DIR)/build \
|
||||
.PHONY: all help debug release static shared example sdl2 clean run python-lib mcp-lib json \
|
||||
editor run-editor run-sdl2 mylib vector customappearance graphics sdl2-backend test-editor \
|
||||
appdir appimage run-appimage icon \
|
||||
test-toml test-plugin test-blueprint test-base64 test-curves test-ppm test-bmp test-png \
|
||||
test-toml test-plugin test-blueprint test-base64 test-curves test-ppm test-bmp test-png test-image \
|
||||
category-libs category-sos libs \
|
||||
lib-events lib-control lib-operators lib-variables lib-appearance lib-pen lib-fs \
|
||||
lib-environ \
|
||||
lib-editor lib-graphics lib-sdl2 lib-python lib-mcp lib-toml \
|
||||
lib-json lib-xml lib-csv lib-blueprint lib-base64 lib-curves lib-ppm lib-bmp lib-png lib-api lib-libman \
|
||||
lib-json lib-xml lib-csv lib-blueprint lib-base64 lib-curves lib-ppm lib-bmp lib-png lib-image lib-api lib-libman \
|
||||
test-libman test-environ
|
||||
|
||||
all: static example ## Compila a biblioteca estática e o exemplo hello (padrão)
|
||||
@@ -180,6 +181,9 @@ lib-bmp:
|
||||
lib-png:
|
||||
$(MAKE) -C $(PNG_DIR)
|
||||
|
||||
lib-image:
|
||||
$(MAKE) -C $(IMG_DIR)
|
||||
|
||||
lib-api:
|
||||
$(MAKE) -C $(API_DIR)
|
||||
|
||||
@@ -200,8 +204,8 @@ lib-mcp:
|
||||
|
||||
libs: static lib-events lib-control lib-operators lib-variables \
|
||||
lib-appearance lib-pen lib-fs lib-environ lib-graphics lib-sdl2 lib-toml \
|
||||
lib-json lib-xml lib-csv lib-blueprint lib-base64 lib-curves lib-ppm lib-bmp lib-png lib-api lib-libman lib-editor
|
||||
@echo "Libraries OK: category + graphics + sdl2 + toml + json + xml + csv + blueprint + base64 + curves + ppm + bmp + png + api + libman + editor"
|
||||
lib-json lib-xml lib-csv lib-blueprint lib-base64 lib-curves lib-ppm lib-bmp lib-png lib-image lib-api lib-libman lib-editor
|
||||
@echo "Libraries OK: category + graphics + sdl2 + toml + json + xml + csv + blueprint + base64 + curves + ppm + bmp + png + image + api + libman + editor"
|
||||
|
||||
category-libs: static $(foreach l,$(CAT_LIBS),lib-$(l)) ## Compila as libraries de categoria (.a/.so)
|
||||
@echo "Build category libs OK"
|
||||
@@ -252,7 +256,7 @@ run-editor: editor ## Compila e abre o editor visual
|
||||
|
||||
# ── Empacotamento AppImage ──────────────────────────────────────────────
|
||||
# Libraries com blocos (categoria) que vao empacotadas como extensoes.
|
||||
APPIMAGE_LIBS := $(CAT_LIBS) toml json xml csv blueprint base64 curves ppm bmp png
|
||||
APPIMAGE_LIBS := $(CAT_LIBS) toml json xml csv blueprint base64 curves ppm bmp png image
|
||||
|
||||
APP_NAME := TinyBlocks
|
||||
APP_VER := 0.1.0
|
||||
@@ -497,6 +501,17 @@ $(BUILD)/png_test: tests/png_test.c $(PNG_DIR)/src/tb_png.c static
|
||||
test-png: $(BUILD)/png_test ## Roda o teste da png (ASan/UBSan)
|
||||
./$(BUILD)/png_test
|
||||
|
||||
# -- Teste da library image (ops genericas + registro de formatos) ---
|
||||
$(BUILD)/image_test: tests/image_test.c $(IMG_DIR)/src/tb_imglib.c $(PPM_DIR)/src/tb_ppm.c $(BMP_DIR)/src/tb_bmp.c static
|
||||
@mkdir -p $(BUILD)
|
||||
$(CC) $(CFLAGS_DBG) -I$(IMG_DIR)/include -I$(PPM_DIR)/include -I$(BMP_DIR)/include \
|
||||
$(IMG_DIR)/src/tb_imglib.c $(PPM_DIR)/src/tb_ppm.c $(BMP_DIR)/src/tb_bmp.c \
|
||||
tests/image_test.c -o $@ \
|
||||
-Wl,--start-group $(LIB_A) -Wl,--end-group -lm
|
||||
|
||||
test-image: $(BUILD)/image_test ## Roda o teste da image (ASan/UBSan)
|
||||
./$(BUILD)/image_test
|
||||
|
||||
# -- Teste de plugin .so standalone ---
|
||||
FS_SO := $(FS_DIR)/build/libtinyblocks-fs.so
|
||||
|
||||
@@ -513,7 +528,7 @@ clean: ## Remove os diretórios build/ (raiz e libraries)
|
||||
$(RM) -r $(BUILD)
|
||||
@for d in $(EV_DIR) $(CT_DIR) $(OP_DIR) $(VR_DIR) $(AP_DIR) $(PN_DIR) $(FS_DIR) \
|
||||
$(TOML_DIR) $(JSON_DIR) $(XML_DIR) $(CSV_DIR) $(BP_DIR) \
|
||||
$(B64_DIR) $(CV_DIR) $(PPM_DIR) $(BMP_DIR) $(PNG_DIR) \
|
||||
$(B64_DIR) $(CV_DIR) $(PPM_DIR) $(BMP_DIR) $(PNG_DIR) $(IMG_DIR) \
|
||||
$(API_DIR) $(LIBM_DIR) \
|
||||
$(ED_DIR) $(GX_DIR) $(SD_DIR) $(PY_DIR) $(MC_DIR); do \
|
||||
$(MAKE) -C $$d clean >/dev/null 2>&1 || true; \
|
||||
|
||||
Reference in new issue
Block a user