1 ##### DP_MAKE_TARGET autodetection and arch specific variables #####
11 DP_ARCH:=$(shell uname)
12 ifneq ($(filter %BSD,$(DP_ARCH)),)
15 ifeq ($(DP_ARCH), Darwin)
18 ifeq ($(DP_ARCH), SunOS)
23 endif # ifeq ($(DP_ARCH), SunOS)
24 endif # ifeq ($(DP_ARCH), Darwin)
25 endif # ifneq ($(filter %BSD,$(DP_ARCH)),)
27 endif # ifndef DP_MAKE_TARGET
29 # If we're not on compiling for Win32, we need additional information
30 ifneq ($(DP_MAKE_TARGET), mingw)
31 DP_ARCH:=$(shell uname)
32 DP_MACHINE:=$(shell uname -m)
36 # Command used to delete files
43 # 64bits AMD CPUs use another lib directory
44 ifeq ($(DP_MACHINE),x86_64)
45 UNIX_X11LIBPATH:=-L/usr/X11R6/lib64
47 UNIX_X11LIBPATH:=-L/usr/X11R6/lib
52 ifeq ($(DP_MAKE_TARGET), linux)
58 LDFLAGS_CL=$(LDFLAGS_LINUXCL)
59 LDFLAGS_SV=$(LDFLAGS_LINUXSV)
60 LDFLAGS_SDL=$(LDFLAGS_LINUXSDL)
64 EXE_SDL=$(EXE_UNIXSDL)
67 # Mac OS X configuration
68 ifeq ($(DP_MAKE_TARGET), macosx)
69 DEFAULT_SNDAPI=COREAUDIO
70 OBJ_CD=$(OBJ_MACOSXCD)
74 LDFLAGS_CL=$(LDFLAGS_MACOSXCL)
75 LDFLAGS_SV=$(LDFLAGS_MACOSXSV)
76 LDFLAGS_SDL=$(LDFLAGS_MACOSXSDL)
80 EXE_SDL=$(EXE_UNIXSDL)
83 # SunOS configuration (Solaris)
84 ifeq ($(DP_MAKE_TARGET), sunos)
90 CFLAGS_EXTRA=$(CFLAGS_SUNOS)
92 LDFLAGS_CL=$(LDFLAGS_SUNOSCL)
93 LDFLAGS_SV=$(LDFLAGS_SUNOSSV)
94 LDFLAGS_SDL=$(LDFLAGS_SUNOSSDL)
98 EXE_SDL=$(EXE_UNIXSDL)
102 ifeq ($(DP_MAKE_TARGET), bsd)
103 ifeq ($(DP_ARCH),FreeBSD)
112 LDFLAGS_CL=$(LDFLAGS_BSDCL)
113 LDFLAGS_SV=$(LDFLAGS_BSDSV)
114 LDFLAGS_SDL=$(LDFLAGS_BSDSDL)
118 EXE_SDL=$(EXE_UNIXSDL)
121 # Win32 configuration
122 ifeq ($(DP_MAKE_TARGET), mingw)
128 LDFLAGS_CL=$(LDFLAGS_WINCL)
129 LDFLAGS_SV=$(LDFLAGS_WINSV)
130 LDFLAGS_SDL=$(LDFLAGS_WINSDL)
134 EXE_SDL=$(EXE_WINSDL)
138 ##### Sound configuration #####
141 DP_SOUND_API=$(DEFAULT_SNDAPI)
145 ifeq ($(DP_SOUND_API), NULL)
146 OBJ_SOUND=$(OBJ_SND_NULL)
147 LIB_SOUND=$(LIB_SND_NULL)
150 # OSS: Open Sound System
151 ifeq ($(DP_SOUND_API), OSS)
152 OBJ_SOUND=$(OBJ_SND_OSS)
153 LIB_SOUND=$(LIB_SND_OSS)
156 # ALSA: Advanced Linux Sound Architecture
157 ifeq ($(DP_SOUND_API), ALSA)
158 OBJ_SOUND=$(OBJ_SND_ALSA)
159 LIB_SOUND=$(LIB_SND_ALSA)
162 # COREAUDIO: Core Audio
163 ifeq ($(DP_SOUND_API), COREAUDIO)
164 OBJ_SOUND=$(OBJ_SND_COREAUDIO)
165 LIB_SOUND=$(LIB_SND_COREAUDIO)
168 # BSD: BSD / Sun audio API
169 ifeq ($(DP_SOUND_API), BSD)
170 OBJ_SOUND=$(OBJ_SND_BSD)
171 LIB_SOUND=$(LIB_SND_BSD)
174 # WIN: DirectX and Win32 WAVE output
175 ifeq ($(DP_SOUND_API), WIN)
176 OBJ_SOUND=$(OBJ_SND_WIN)
177 LIB_SOUND=$(LIB_SND_WIN)
181 ##### GNU Make specific definitions #####
183 DO_LD=$(CC) -o $@ $^ $(LDFLAGS)
186 ##### Definitions shared by all makefiles #####
190 ##### Dependency files #####