]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
makefile: make DP_GLES into separate flag
authoruis <uis9936@gmail.com>
Wed, 14 Aug 2024 19:46:38 +0000 (22:46 +0300)
committeruis <uis9936@gmail.com>
Sat, 24 Aug 2024 17:54:03 +0000 (20:54 +0300)
Set DP_GLES to 2 to enable GLES2

makefile
makefile.inc

index 923c8d8e11e698f560f887b9e17d81b324693dbc..fc68e2634ab15bcaa4ec03b6ab26865609ddde08 100644 (file)
--- 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
index 9cfed413ec5fe295ed0054564e0c54bb1d470be5..5add73f31d19e4da907b07311e5352d0ce312bde 100644 (file)
@@ -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