From: uis Date: Wed, 14 Aug 2024 19:46:38 +0000 (+0300) Subject: makefile: make DP_GLES into separate flag X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=18117f42aada575538b1789896b2f2f6c4cecdf7;p=xonotic%2Fdarkplaces.git makefile: make DP_GLES into separate flag Set DP_GLES to 2 to enable GLES2 --- diff --git a/makefile b/makefile index 923c8d8e..fc68e263 100644 --- a/makefile +++ b/makefile @@ -116,19 +116,18 @@ ifeq ($(DP_MAKE_TARGET), wasm) # --use-port=libpng \ # --use-port=libjpeg \ # --use-port=zlib \ -# -DNOSUPPORTIPV6 \ -# -DUSE_GLES2 +# -DNOSUPPORTIPV6 CFLAGS_EXTRA+=-s USE_SDL=2 \ -s USE_LIBPNG=1 \ -s USE_LIBJPEG=1 \ -s USE_ZLIB=1 \ - -DNOSUPPORTIPV6 \ - -DUSE_GLES2 + -DNOSUPPORTIPV6 SDLCONFIG_CFLAGS=$(SDLCONFIG_UNIXCFLAGS) $(SDLCONFIG_UNIXCFLAGS_X11) SDLCONFIG_LIBS=$(SDLCONFIG_UNIXLIBS) $(SDLCONFIG_UNIXLIBS_X11) SDLCONFIG_STATICLIBS=$(SDLCONFIG_UNIXSTATICLIBS) $(SDLCONFIG_UNIXSTATICLIBS_X11) DP_SSE=0 + DP_GLES=2 DP_LINK_SDL?=shared DP_LINK_ZLIB?=shared @@ -358,6 +357,11 @@ else ifeq ($(DP_LINK_XMP), dlopen) CFLAGS_SND_XMP=-DUSEXMP endif +# GLES +ifeq ($(DP_GLES),2) + LIB_GLES=-lGLESv2 + CFLAGS_GLES=-DUSE_GLES2 +endif ##### Extra CFLAGS ##### ifdef DP_FS_BASEDIR diff --git a/makefile.inc b/makefile.inc index 9cfed413..5add73f3 100644 --- a/makefile.inc +++ b/makefile.inc @@ -148,7 +148,7 @@ else CFLAGS_MAKEDEP?=-MMD endif -CFLAGS_COMMON=$(CFLAGS_STANDARD) $(CFLAGS_TCC) $(CFLAGS_MAKEDEP) $(CFLAGS_PRELOAD) $(CFLAGS_FS) $(CFLAGS_WARNINGS) $(CFLAGS_LIBZ) $(CFLAGS_LIBJPEG) $(CFLAGS_SND_XMP) $(CFLAGS_NET) $(CFLAGS_SDL) -D_FILE_OFFSET_BITS=64 -D__KERNEL_STRICT_NAMES -I../../../ +CFLAGS_COMMON=$(CFLAGS_STANDARD) $(CFLAGS_TCC) $(CFLAGS_MAKEDEP) $(CFLAGS_PRELOAD) $(CFLAGS_FS) $(CFLAGS_WARNINGS) $(CFLAGS_LIBZ) $(CFLAGS_LIBJPEG) $(CFLAGS_SND_XMP) $(CFLAGS_NET) $(CFLAGS_SDL) $(CFLAGS_GLES) -D_FILE_OFFSET_BITS=64 -D__KERNEL_STRICT_NAMES -I../../../ CFLAGS_CLIENT=-DCONFIG_MENU $(CFLAGS_VIDEO_CAPTURE) CFLAGS_SERVER= CFLAGS_DEBUG=-ggdb @@ -207,7 +207,7 @@ LDFLAGS_UNIXSV_PRELOAD=-lz -ljpeg -lpng -lcurl LDFLAGS_UNIXSDL_PRELOAD=-lz -ljpeg -lpng -logg -ltheora -lvorbis -lvorbisenc -lvorbisfile -lcurl -lxmp CFLAGS_UNIX_PRELOAD=-DPREFER_PRELOAD -LDFLAGS_UNIXSDL=$(SDL_LIBS) #-lGLESv2 +LDFLAGS_UNIXSDL=$(SDL_LIBS) $(LIB_GLES) EXE_UNIXSV=darkplaces-dedicated EXE_UNIXSDL=darkplaces-sdl EXE_UNIXSVNEXUIZ=nexuiz-dedicated