+##### DP_MAKE_TARGET autodetection and arch specific variables #####
+
+ifndef DP_MAKE_TARGET
+
+# Win32
+ifdef windir
+ DP_MAKE_TARGET=mingw
+else
+
+# UNIXes
+DP_ARCH:=$(shell uname)
+ifneq ($(filter %BSD,$(DP_ARCH)),)
+ DP_MAKE_TARGET=bsd
+else
+ifeq ($(DP_ARCH), Darwin)
+ DP_MAKE_TARGET=macosx
+else
+ifeq ($(DP_ARCH), SunOS)
+ DP_MAKE_TARGET=sunos
+else
+ DP_MAKE_TARGET=linux
+
+endif # ifeq ($(DP_ARCH), SunOS)
+endif # ifeq ($(DP_ARCH), Darwin)
+endif # ifneq ($(filter %BSD,$(DP_ARCH)),)
+endif # ifdef windir
+endif # ifndef DP_MAKE_TARGET
+
+# If we're not on compiling for Win32, we need additional information
+ifneq ($(DP_MAKE_TARGET), mingw)
+ DP_ARCH:=$(shell uname)
+ DP_MACHINE:=$(shell uname -m)
+endif
+
+
+# Command used to delete files
+ifdef windir
+ CMD_RM=del
+else
+ CMD_RM=$(CMD_UNIXRM)
+endif
+
+# 64bits AMD CPUs use another lib directory
+ifeq ($(DP_MACHINE),x86_64)
+ UNIX_X11LIBPATH:=-L/usr/X11R6/lib64
+else
+ UNIX_X11LIBPATH:=-L/usr/X11R6/lib
+endif
+
+
+# Linux configuration
+ifeq ($(DP_MAKE_TARGET), linux)
+ OBJ_SOUND=$(OBJ_LINUXSOUND)
+ LIB_SOUND=$(LIB_LINUXSOUND)
+ OBJ_CD=$(OBJ_LINUXCD)