]> git.xonotic.org Git - xonotic/darkplaces.git/blob - BSDmakefile
23563cd3d29f08a2ac15cd0515a5156183ce6b3d
[xonotic/darkplaces.git] / BSDmakefile
1 #####  DP_MAKE_TARGET autodetection and arch specific variables #####
2
3 .ifndef DP_MAKE_TARGET
4
5 DP_MAKE_TARGET=bsd
6
7 .endif
8 DP_ARCH != uname
9
10 # Command used to delete files
11 CMD_RM=$(CMD_UNIXRM)
12
13 UNIX_X11LIBPATH=/usr/X11R6/lib
14
15 # BSD configuration
16 .if $(DP_MAKE_TARGET) == "bsd"
17
18 # FreeBSD uses OSS
19 .if $(DP_ARCH) == "FreeBSD"
20 DEFAULT_SNDAPI=OSS
21 .else
22 DEFAULT_SNDAPI=BSD
23 .endif
24 OBJ_CD=$(OBJ_BSDCD)
25
26 OBJ_CL=$(OBJ_GLX)
27 OBJ_ICON=
28 OBJ_ICON_NEXUIZ=
29
30 LDFLAGS_CL=$(LDFLAGS_BSDCL)
31 LDFLAGS_SV=$(LDFLAGS_BSDSV)
32 LDFLAGS_SDL=$(LDFLAGS_BSDSDL)
33
34 SDLCONFIG_CFLAGS=$(SDLCONFIG_UNIXCFLAGS)
35 SDLCONFIG_LIBS=$(SDLCONFIG_UNIXLIBS)
36 SDLCONFIG_STATICLIBS=$(SDLCONFIG_UNIXSTATICLIBS)
37
38 EXE_CL=$(EXE_UNIXCL)
39 EXE_SV=$(EXE_UNIXSV)
40 EXE_SDL=$(EXE_UNIXSDL)
41 EXE_CLNEXUIZ=$(EXE_UNIXCLNEXUIZ)
42 EXE_SVNEXUIZ=$(EXE_UNIXSVNEXUIZ)
43 EXE_SDLNEXUIZ=$(EXE_UNIXSDLNEXUIZ)
44
45 .endif
46
47
48 ##### Sound configuration #####
49
50 .ifndef DP_SOUND_API
51 DP_SOUND_API=$(DEFAULT_SNDAPI)
52 .endif
53
54 # NULL: no sound
55 .if $(DP_SOUND_API) == "NULL"
56 OBJ_SOUND=$(OBJ_SND_NULL)
57 LIB_SOUND=$(LIB_SND_NULL)
58 .endif
59
60 # OSS: Open Sound System
61 .if $(DP_SOUND_API) == "OSS"
62 OBJ_SOUND=$(OBJ_SND_OSS)
63 LIB_SOUND=$(LIB_SND_OSS)
64 .endif
65
66 # BSD: BSD / Sun audio API
67 .if $(DP_SOUND_API) == "BSD"
68 OBJ_SOUND=$(OBJ_SND_BSD)
69 LIB_SOUND=$(LIB_SND_BSD)
70 .endif
71
72
73 ##### Extra CFLAGS #####
74
75 CFLAGS_MAKEDEP=-MD
76 .ifdef DP_FS_BASEDIR
77 CFLAGS_FS=-DDP_FS_BASEDIR='\"$(DP_FS_BASEDIR)\"'
78 .else
79 CFLAGS_FS=
80 .endif
81
82 CFLAGS_PRELOAD=
83 .ifdef DP_PRELOAD_DEPENDENCIES
84 LDFLAGS_CL+=$(LDFLAGS_UNIXCL_PRELOAD)
85 LDFLAGS_SV+=$(LDFLAGS_UNIXSV_PRELOAD)
86 LDFLAGS_SDL+=$(LDFLAGS_UNIXSDL_PRELOAD)
87 CFLAGS_PRELOAD=$(CFLAGS_UNIX_PRELOAD)
88 .endif
89
90
91 ##### BSD Make specific definitions #####
92
93 MAKE:=$(MAKE) -f BSDmakefile
94
95 DO_LD=$(CC) -o $@ $> $(LDFLAGS)
96
97
98 ##### Definitions shared by all makefiles #####
99 .include "makefile.inc"