diff options
| author | Nicholas Rodrigues Lordello <[email protected]> | 2026-09-28 17:06:58 +0200 |
|---|---|---|
| committer | Nicholas Rodrigues Lordello <[email protected]> | 2026-09-28 17:06:58 +0200 |
| commit | 4c075349a678119cc4bc08e5a969a3c773866cae (patch) | |
| tree | 4933e48eea514a849bfccde4d10fcd9056a87077 | |
| parent | 4a6403c6b682cf3b03f80a5ba3a6286e30555014 (diff) | |
Remove STB Static Library
We now build STB image library directly in the `cart` module, so
we no longer need to build it as a static library.
| -rw-r--r-- | Makefile | 19 | ||||
| -rw-r--r-- | lib/stb/stbi.c | 2 | ||||
| -rw-r--r-- | lib/stb/stbi.h | 12 | ||||
| -rw-r--r-- | src/picow.c | 1 |
4 files changed, 3 insertions, 31 deletions
@@ -16,14 +16,10 @@ TOOLS := build/tools SYSTEM := build/system PICOW_CFLAGS := $(CFLAGS) $(SDL3_CFLAGS) -Ilib/ -PICOW_LDFLAGS := $(LDFLAGS) $(SDL3_LIBS) -L$(TARGET) -lstb -lwamr +PICOW_LDFLAGS := $(LDFLAGS) $(SDL3_LIBS) -L$(TARGET) -lwamr PICOW_SRC := $(wildcard src/*.c) $(SYSTEM)/sysroot.c PICOW_OBJ := $(patsubst %.c,$(OUT)/%.o,$(PICOW_SRC:build/%=%)) -STB_CFLAGS := $(CFLAGS) $(SDL3_CFLAGS) -Wno-unused-function -STB_SRC := $(wildcard lib/stb/*.c) -STB_OBJ := $(patsubst %.c,$(OUT)/%.o,$(STB_SRC)) - WAMR_CFLAGS := $(CFLAGS) -Wno-unused-parameter \ -DBH_FREE=wasm_runtime_free \ -DBH_MALLOC=wasm_runtime_malloc \ @@ -44,7 +40,7 @@ CARTS := $(patsubst %,%.png,$(wildcard carts/*.p8)) .PHONY: all all: $(TARGET)/picow $(CARTS) ; -$(TARGET)/picow: $(PICOW_OBJ) $(TARGET)/libstb.a $(TARGET)/libwamr.a +$(TARGET)/picow: $(PICOW_OBJ) $(TARGET)/libwamr.a @ echo "CC\t$@" @ $(CC) $(PICOW_OBJ) -o $@ $(PICOW_LDFLAGS) @@ -57,15 +53,6 @@ $(OUT)/system/%.o: $(SYSTEM)/%.c @ mkdir -p $(dir $@) @ $(CC) $(PICOW_CFLAGS) -Isrc/ -c $< -o $@ -$(TARGET)/libstb.a: $(STB_OBJ) - @ echo "AR\t$@" - @ $(AR) rcs $@ $^ - -$(OUT)/lib/stb/%.o: lib/stb/%.c - @ echo "CC\t$@" - @ mkdir -p $(dir $@) - @ $(CC) $(STB_CFLAGS) -c $< -o $@ - $(TARGET)/libwamr.a: $(WAMR_OBJ) @ echo "AR\t$@" @ $(AR) rcs $@ $^ @@ -119,4 +106,4 @@ build/compile_commands.json: $(TOOLS)/ccj clean: rm -rf $(CARTS) build/ --include $(PICOW_OBJ:.o=.d) $(STB_OBJ:.o=.d) $(WAMR_OBJ:.o=.d) +-include $(PICOW_OBJ:.o=.d) $(WAMR_OBJ:.o=.d) diff --git a/lib/stb/stbi.c b/lib/stb/stbi.c deleted file mode 100644 index fdd51c4..0000000 --- a/lib/stb/stbi.c +++ /dev/null @@ -1,2 +0,0 @@ -#define STB_IMAGE_IMPLEMENTATION -#include "./stbi.h" diff --git a/lib/stb/stbi.h b/lib/stb/stbi.h deleted file mode 100644 index 651370d..0000000 --- a/lib/stb/stbi.h +++ /dev/null @@ -1,12 +0,0 @@ -#include <SDL3/SDL_stdinc.h> - -#define STBI_ONLY_PNG -#define STBI_MAX_DIMENSIONS (160 * 205) -#define STBI_NO_FAILURE_STRINGS -#define STBI_NO_LINEAR -#define STBI_NO_STDIO -#define STBI_NO_THREAD_LOCALS -#define STBI_MALLOC(sz) SDL_malloc(sz) -#define STBI_REALLOC(p, sz) SDL_realloc(p, sz) -#define STBI_FREE(p) SDL_free(p) -#include "./stb_image.h" diff --git a/src/picow.c b/src/picow.c index b44a91d..bf5a051 100644 --- a/src/picow.c +++ b/src/picow.c @@ -4,7 +4,6 @@ #include <SDL3/SDL.h> #include <SDL3/SDL_main.h> -#include <stb/stbi.h> #include <wamr/wamr.h> #include "cart.h" |
