adding stb to submodule

This commit is contained in:
NishiOwO 2025-04-03 21:07:18 +09:00
parent 4e0adbfb1c
commit ebc311e182
No known key found for this signature in database
GPG Key ID: 27EF69B208EB9343
5 changed files with 12 additions and 9 deletions

3
.gitmodules vendored
View File

@ -2,3 +2,6 @@
path = external/lua
url = https://github.com/lua/lua
branch = v5.4
[submodule "external/stb"]
path = external/stb
url = https://github.com/nothings/stb

View File

@ -10,15 +10,19 @@ LUA_CFLAGS = -DLUA_COMPAT_5_2 -DLUA_USE_C89 -I../external/lua
LUA_LDFLAGS =
LUA_LIBS =
STB_CFLAGS = -I../external/stb
STB_LDFLAGS =
STB_LIBS =
CXX_LIBS = -lstdc++
AR = $(TARGET_PREFIX)ar
CC = $(TARGET_PREFIX)gcc
OBJDUMP = $(TARGET_PREFIX)objdump
STRIP = $(TARGET_PREFIX)strip
CFLAGS = -D_DEFAULT_SOURCE -DUSE_$(BACKEND) -DDRV_$(DRIVER) -I../engine/include $(ODE_CFLAGS) $(GL_CFLAGS) $(LUA_CFLAGS)
LDFLAGS = $(LUA_LDFLAGS)
LIBS = $(ODE_LIBS) $(GL_LIBS) $(SOCKET_LIBS) $(LUA_LIBS) $(CXX_LIBS)
CFLAGS = -D_DEFAULT_SOURCE -DUSE_$(BACKEND) -DDRV_$(DRIVER) -I../engine/include $(ODE_CFLAGS) $(GL_CFLAGS) $(LUA_CFLAGS) $(STB_CFLAGS)
LDFLAGS = $(LUA_LDFLAGS) $(STB_LDFLAGS)
LIBS = $(ODE_LIBS) $(GL_LIBS) $(SOCKET_LIBS) $(LUA_LIBS) $(CXX_LIBS) $(STB_LIBS)
.PHONY: all format clean ./engine ./src print-deps pack

View File

@ -10,8 +10,3 @@ include ../common.mk
$(TARGET): $(OBJS)
$(AR) rcs $@ $(OBJS)
nb_stb_image.c nb_draw.c: ext_stb_image.h
ext_stb_image.h:
wget https://github.com/nothings/stb/raw/refs/heads/master/stb_image.h -O $@

View File

@ -1,2 +1,2 @@
#define STB_IMAGE_IMPLEMENTATION
#include "ext_stb_image.h"
#include <stb_image.h>

1
external/stb vendored Submodule

@ -0,0 +1 @@
Subproject commit f0569113c93ad095470c54bf34a17b36646bbbb5