# --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
CFLAGS_SND_XMP=-DUSEXMP
endif
+# GLES
+ifeq ($(DP_GLES),2)
+ LIB_GLES=-lGLESv2
+ CFLAGS_GLES=-DUSE_GLES2
+endif
##### Extra CFLAGS #####
ifdef DP_FS_BASEDIR
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
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