DP_LINK_ODE?=dlopen
DP_LINK_CRYPTO?=dlopen
DP_LINK_CRYPTO_RIJNDAEL?=dlopen
+ DP_LINK_XMP?=dlopen
+ DP_LINK_MODPLUG?=dlopen
endif
# Mac OS X configuration
DP_LINK_ODE?=dlopen
DP_LINK_CRYPTO?=dlopen
DP_LINK_CRYPTO_RIJNDAEL?=dlopen
+ DP_LINK_XMP?=dlopen
+ DP_LINK_MODPLUG?=dlopen
# on OS X, we don't build the CL by default because it uses deprecated
# and not-implemented-in-64bit Carbon
DP_LINK_ODE?=dlopen
DP_LINK_CRYPTO?=dlopen
DP_LINK_CRYPTO_RIJNDAEL?=dlopen
+ DP_LINK_XMP?=dlopen
+ DP_LINK_MODPLUG?=dlopen
endif
# BSD configuration
DP_LINK_ODE?=dlopen
DP_LINK_CRYPTO?=dlopen
DP_LINK_CRYPTO_RIJNDAEL?=dlopen
+ DP_LINK_XMP?=dlopen
+ DP_LINK_MODPLUG?=dlopen
endif
# Win32 configuration
DP_LINK_ODE?=dlopen
DP_LINK_CRYPTO?=dlopen
DP_LINK_CRYPTO_RIJNDAEL?=dlopen
+ DP_LINK_XMP?=dlopen
+ DP_LINK_MODPLUG?=dlopen
endif
# set these to "" if you want to use dynamic loading instead
CFLAGS_CRYPTO_RIJNDAEL=
endif
+# xmp
+ifeq ($(DP_LINK_XMP), shared)
+ CFLAGS_SND_XMP=-DLINK_TO_LIBXMP
+ LIB_SND_XMP=-lxmp
+endif
+ifeq ($(DP_LINK_XMP), dlopen)
+ CFLAGS_SND_XMP=
+ LIB_SND_XMP=
+endif
+
+ # modplug
+ ifeq ($(DP_LINK_MODPLUG), shared)
+ CFLAGS_SND_MODPLUG=-DLINK_TO_LIBMODPLUG
+ LIB_SND_MODPLUG=-lmodplug
+ endif
+ ifeq ($(DP_LINK_MODPLUG), dlopen)
+ CFLAGS_SND_MODPLUG=
+ LIB_SND_MODPLUG=
+ endif
+
+
##### Sound configuration #####
ifndef DP_SOUND_API
###### Sound and audio CD #####
- OBJ_SND_COMMON=snd_main.o snd_mem.o snd_mix.o snd_ogg.o snd_wav.o snd_xmp.o
-OBJ_SND_COMMON=snd_main.o snd_mem.o snd_mix.o snd_ogg.o snd_wav.o snd_modplug.o
++OBJ_SND_COMMON=snd_main.o snd_mem.o snd_mix.o snd_ogg.o snd_wav.o snd_xmp.o snd_modplug.o
# No sound
OBJ_SND_NULL=snd_null.o
# Open Sound System (Linux, FreeBSD and Solaris)
OBJ_SND_OSS=$(OBJ_SND_COMMON) snd_oss.o
- LIB_SND_OSS=$(LIB_SND_XMP)
-LIB_SND_OSS=$(LIB_SND_MODPLUG)
++LIB_SND_OSS=$(LIB_SND_XMP) $(LIB_SND_MODPLUG)
# Advanced Linux Sound Architecture (Linux)
OBJ_SND_ALSA=$(OBJ_SND_COMMON) snd_alsa.o
- LIB_SND_ALSA=-lasound $(LIB_SND_XMP)
-LIB_SND_ALSA=-lasound $(LIB_SND_MODPLUG)
++LIB_SND_ALSA=-lasound $(LIB_SND_XMP) $(LIB_SND_MODPLUG)
# Core Audio (Mac OS X)
OBJ_SND_COREAUDIO=$(OBJ_SND_COMMON) snd_coreaudio.o
- LIB_SND_COREAUDIO=-framework CoreAudio $(LIB_SND_XMP)
-LIB_SND_COREAUDIO=-framework CoreAudio $(LIB_SND_MODPLUG)
++LIB_SND_COREAUDIO=-framework CoreAudio $(LIB_SND_XMP) $(LIB_SND_MODPLUG)
# BSD / Sun audio API (NetBSD and OpenBSD)
OBJ_SND_BSD=$(OBJ_SND_COMMON) snd_bsd.o
- LIB_SND_BSD=$(LIB_SND_XMP)
-LIB_SND_BSD=$(LIB_SND_MODPLUG)
++LIB_SND_BSD=$(LIB_SND_XMP) $(LIB_SND_MODPLUG)
# DirectX and Win32 WAVE output (Win32)
OBJ_SND_WIN=$(OBJ_SND_COMMON) snd_win.o
- LIB_SND_WIN=$(LIB_SND_XMP)
-LIB_SND_WIN=$(LIB_SND_MODPLUG)
++LIB_SND_WIN=$(LIB_SND_XMP) $(LIB_SND_MODPLUG)
# Qantourisc's 3D Realtime Acoustic Lib (3D RAS)
OBJ_SND_3DRAS=snd_3dras.o
LDFLAGS_UNIXCOMMON=-lm $(LIB_ODE) $(LIB_Z) $(LIB_JPEG) $(LIB_CRYPTO) $(LIB_CRYPTO_RIJNDAEL)
LDFLAGS_UNIXCL=-L$(UNIX_X11LIBPATH) -lX11 -lXpm -lXext -lXxf86vm -pthread $(LIB_SOUND)
- LDFLAGS_UNIXCL_PRELOAD=-lz -ljpeg -lpng -logg -ltheora -lvorbis -lvorbisenc -lvorbisfile -lcurl -lxmp
-LDFLAGS_UNIXCL_PRELOAD=-lz -ljpeg -lpng -logg -ltheora -lvorbis -lvorbisenc -lvorbisfile -lcurl -lmodplug
++LDFLAGS_UNIXCL_PRELOAD=-lz -ljpeg -lpng -logg -ltheora -lvorbis -lvorbisenc -lvorbisfile -lcurl -lxmp -lmodplug
LDFLAGS_UNIXSV_PRELOAD=-lz -ljpeg -lpng -lcurl
- LDFLAGS_UNIXSDL_PRELOAD=-lz -ljpeg -lpng -logg -ltheora -lvorbis -lvorbisenc -lvorbisfile -lcurl -lxmp
-LDFLAGS_UNIXSDL_PRELOAD=-lz -ljpeg -lpng -logg -ltheora -lvorbis -lvorbisenc -lvorbisfile -lcurl -lmodplug
++LDFLAGS_UNIXSDL_PRELOAD=-lz -ljpeg -lpng -logg -ltheora -lvorbis -lvorbisenc -lvorbisfile -lcurl -lxmp -lmodplug
CFLAGS_UNIX_PRELOAD=-DPREFER_PRELOAD
- LDFLAGS_UNIXSDL=$(SDLCONFIG_LIBS) $(LIB_SND_XMP)
-LDFLAGS_UNIXSDL=$(SDLCONFIG_LIBS) $(LIB_SND_MODPLUG)
++LDFLAGS_UNIXSDL=$(SDLCONFIG_LIBS) $(LIB_SND_XMP) $(LIB_SND_MODPLUG)
EXE_UNIXCL=darkplaces-glx
EXE_UNIXSV=darkplaces-dedicated
EXE_UNIXSDL=darkplaces-sdl
# Link
LDFLAGS_BSDCL=$(LDFLAGS_UNIXCOMMON) -lutil $(LDFLAGS_UNIXCL)
--LDFLAGS_BSDSV=$(LDFLAGS_UNIXCOMMON)
++LDFLAGS_BSDSV=$(LDFLAGS_UNIXCOMMON)
LDFLAGS_BSDSDL=$(LDFLAGS_UNIXCOMMON) $(LDFLAGS_UNIXSDL)
# see LDFLAGS_WINCOMMON in makefile
LDFLAGS_WINCL=$(LDFLAGS_WINCOMMON) $(LIB_CRYPTO) $(LIB_CRYPTO_RIJNDAEL) -mwindows -lwinmm -luser32 -lgdi32 -ldxguid -ldinput -lcomctl32 -lws2_32 $(LDFLAGS_D3D) $(LIB_Z) $(LIB_JPEG)
LDFLAGS_WINSV=$(LDFLAGS_WINCOMMON) $(LIB_CRYPTO) $(LIB_CRYPTO_RIJNDAEL) -mconsole -lwinmm -lws2_32 $(LIB_Z) $(LIB_JPEG)
- LDFLAGS_WINSDL=$(LDFLAGS_WINCOMMON) $(LIB_CRYPTO) $(LIB_CRYPTO_RIJNDAEL) $(SDLCONFIG_LIBS) $(LIB_SND_XMP) -lwinmm -lws2_32 $(LIB_Z) $(LIB_JPEG)
-LDFLAGS_WINSDL=$(LDFLAGS_WINCOMMON) $(LIB_CRYPTO) $(LIB_CRYPTO_RIJNDAEL) $(SDLCONFIG_LIBS) $(LIB_SND_MODPLUG) -lwinmm -lws2_32 $(LIB_Z) $(LIB_JPEG)
++LDFLAGS_WINSDL=$(LDFLAGS_WINCOMMON) $(LIB_CRYPTO) $(LIB_CRYPTO_RIJNDAEL) $(SDLCONFIG_LIBS) $(LIB_SND_XMP) $(LIB_SND_MODPLUG) -lwinmm -lws2_32 $(LIB_Z) $(LIB_JPEG)
EXE_WINCL=darkplaces.exe
EXE_WINSV=darkplaces-dedicated.exe
EXE_WINSDL=darkplaces-sdl.exe
$(CMD_CP) makefile.inc $(BUILD_DIR)/
$(CMD_CP) $(MAKEFILE) $(BUILD_DIR)/
+snd_xmp.o: snd_xmp.c
+ $(CHECKLEVEL2)
+ $(DO_CC) $(CFLAGS_SND_XMP)
+
+ snd_modplug.o: snd_modplug.c
+ $(CHECKLEVEL2)
+ $(DO_CC) $(CFLAGS_SND_MODPLUG)
+
#this checks USEODE when compiling so it needs the ODE flags as well
prvm_cmds.o: prvm_cmds.c
$(CHECKLEVEL2)