sdl-gup: add submodule, and make

Signed-off-by: matthias <uso.cosmo.ray@gmail.com>
This commit is contained in:
Matthias Gatto 2021-04-19 03:45:50 +02:00
parent 07c1325946
commit e9a24c4f6b
5 changed files with 18 additions and 3 deletions

3
.gitmodules vendored
View File

@ -8,3 +8,6 @@
[submodule "SDL_mixer"]
path = SDL_mixer
url = https://github.com/libsdl-org/SDL_mixer.git
[submodule "sdl-gpu"]
path = sdl-gpu
url = https://github.com/grimfang4/sdl-gpu.git

View File

@ -77,6 +77,7 @@ GEN_LOADER_OBJ = $(GEN_LOADER_SRC:.c=.o)
LDFLAGS += $(TCC_LIB_PATH)$(TCC_LIB_NAME)
LDFLAGS += $(SDL_MIXER_LDFLAGS) # $(shell $(PKG_CONFIG) --libs SDL2_mixer)
LDFLAGS += $(SDL_GPU_LDFLAGS)
LDFLAGS += -L./
LDFLAGS += $(shell $(PKG_CONFIG) --libs glib-2.0)
LDFLAGS += $(LUA_LIB)
@ -97,6 +98,7 @@ COMMON_CFLAGS += -I./$(DUCK_V)/ -I./$(DUCK_V)/src/ # <--- last one is here so I
COMMON_CFLAGS += -I./$(QUICKJS_PATH)
COMMON_CFLAGS += -fpic
COMMON_CFLAGS += $(LUA_CFLAGS)
COMMON_CFLAGS += -I$(SDL_GPU_CFLAGS)
COMMON_CFLAGS += $(WERROR) -Wall -Wextra -Wno-unused-function -Wno-unused-parameter -Wno-int-to-pointer-cast
COMMON_CFLAGS += -DYIRL_INCLUDE_PATH=\"$(YIRL_INCLUDE_PATH2)\"
@ -116,6 +118,12 @@ SCRIPT_DEP=$(PREFIX)/share/yirl/scripts-dependancies/
#this one is here so my screen don't cur the install line
ULPCS=Universal-LPC-spritesheet/
sdl-gpu-build:
cmake -B ./sdl-gpu-build ./sdl-gpu/
$(SDL_GPU_LDFLAGS): sdl-gpu-build
make -C sdl-gpu-build
$(QUICKJS_PATH):
git clone https://github.com/cosmo-ray/quickjs.git quickjs-$(QUICKJS_V)
@ -125,10 +133,10 @@ $(QUICKJS_LIB_PATH): $(QUICKJS_PATH)
$(SCRIPT_DIR)/s7.o:
$(CC) -c -o $(SCRIPT_DIR)/s7.o $(SCRIPT_DIR)/s7.c -Wno-implicit-fallthrough -fPIC -O0 -g
$(LIBNAME).a: $(OBJ) $(O_OBJ) $(OBJXX) $(QUICKJS_LIB_PATH)
$(LIBNAME).a: $(OBJ) $(O_OBJ) $(OBJXX) $(QUICKJS_LIB_PATH) $(SDL_GPU_LDFLAGS)
$(AR) -r -c -s $(LIBNAME).a $(OBJ) $(O_OBJ) $(OBJXX) $(QUICKJS_LIB_PATH)
$(LIBNAME).$(LIBEXTENSION): $(OBJ) $(O_OBJ) $(OBJXX) $(QUICKJS_LIB_PATH)
$(LIBNAME).$(LIBEXTENSION): $(OBJ) $(O_OBJ) $(OBJXX) $(QUICKJS_LIB_PATH) $(SDL_GPU_LDFLAGS)
$(CC) -shared -o $(LIBNAME).$(LIBEXTENSION) $(OBJ) $(O_OBJ) $(OBJXX) $(LDFLAGS)
yirl-loader: $(YIRL_LINKING) $(GEN_LOADER_OBJ)

3
configure vendored
View File

@ -80,6 +80,9 @@ parse_args $@
var_add SDL_MIXER_LDFLAGS "$PWD/SDL_mixer/build/.libs/libSDL2_mixer.a"
var_add SDL_GPU_LDFLAGS "$PWD/sdl-gpu-build/SDL_gpu/lib/libSDL2_gpu.a"
var_add SDL_GPU_CFLAGS "$PWD/sdl-gpu-build/SDL_gpu/include/"
var_add AR ar
var_add PKG_CONFIG pkg-config
var_add SCRIPT_DIR "core/script"

View File

@ -8,7 +8,7 @@ RUN wget http://www.nosuchhost.net/~cheese/fedora/packages/epel-7/x86_64/cheese-
RUN rpm -Uvh cheese-release*rpm
RUN yum update -y
RUN yum install -y lua-devel git autoconf make json-c-devel ncurses-devel centos-release-scl-rh mpg123-devel
RUN yum install -y lua-devel git autoconf make cmake json-c-devel ncurses-devel centos-release-scl-rh mpg123-devel
RUN yum install -y glib2-devel SDL2-devel SDL2_mixer-devel SDL2_ttf-devel SDL2_image-devel devtoolset-9-gcc-c++ devtoolset-8-gcc-c++
RUN yum clean all

1
sdl-gpu Submodule

@ -0,0 +1 @@
Subproject commit 47a3e2b2a9326c33ad6f177794705987399de8cf