vary r_drawparticles_drawdistance and r_drawdecals_drawdistance for
[divverent/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 EXE_CL=$(EXE_UNIXCL)
35 EXE_SV=$(EXE_UNIXSV)
36 EXE_SDL=$(EXE_UNIXSDL)
37 EXE_CLNEXUIZ=$(EXE_UNIXCLNEXUIZ)
38 EXE_SVNEXUIZ=$(EXE_UNIXSVNEXUIZ)
39 EXE_SDLNEXUIZ=$(EXE_UNIXSDLNEXUIZ)
40
41 .endif
42
43
44 ##### Sound configuration #####
45
46 .ifndef DP_SOUND_API
47 DP_SOUND_API=$(DEFAULT_SNDAPI)
48 .endif
49
50 # NULL: no sound
51 .if $(DP_SOUND_API) == "NULL"
52 OBJ_SOUND=$(OBJ_SND_NULL)
53 LIB_SOUND=$(LIB_SND_NULL)
54 .endif
55
56 # OSS: Open Sound System
57 .if $(DP_SOUND_API) == "OSS"
58 OBJ_SOUND=$(OBJ_SND_OSS)
59 LIB_SOUND=$(LIB_SND_OSS)
60 .endif
61
62 # BSD: BSD / Sun audio API
63 .if $(DP_SOUND_API) == "BSD"
64 OBJ_SOUND=$(OBJ_SND_BSD)
65 LIB_SOUND=$(LIB_SND_BSD)
66 .endif
67
68
69 ##### Extra CFLAGS #####
70
71 CFLAGS_MAKEDEP=-MD
72 .ifdef DP_FS_BASEDIR
73 CFLAGS_FS=-DDP_FS_BASEDIR='\"$(DP_FS_BASEDIR)\"'
74 .else
75 CFLAGS_FS=
76 .endif
77
78 CFLAGS_PRELOAD=
79 .ifdef DP_PRELOAD_DEPENDENCIES
80 LDFLAGS_CL+=$(LDFLAGS_UNIXCL_PRELOAD)
81 LDFLAGS_SV+=$(LDFLAGS_UNIXSV_PRELOAD)
82 LDFLAGS_SDL+=$(LDFLAGS_UNIXSDL_PRELOAD)
83 CFLAGS_PRELOAD=$(CFLAGS_UNIX_PRELOAD)
84 .endif
85
86
87 ##### BSD Make specific definitions #####
88
89 MAKE:=$(MAKE) -f BSDmakefile
90
91 DO_LD=$(CC) -o $@ $> $(LDFLAGS)
92
93
94 ##### Definitions shared by all makefiles #####
95 .include "makefile.inc"
96
97
98 ##### Dependency files #####
99
100 DEPEND_FILES != ls *.d
101 .for i in $(DEPEND_FILES)
102 .       include "$i"
103 .endfor