patch from div0 to make universal-binary builds of darkplaces possible on Mac OS X
[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 CFLAGS_MAKEDEP=-MD
11
12 # Command used to delete files
13 CMD_RM=$(CMD_UNIXRM)
14
15 UNIX_X11LIBPATH=/usr/X11R6/lib
16
17 # BSD configuration
18 .if $(DP_MAKE_TARGET) == "bsd"
19
20 # FreeBSD uses OSS
21 .if $(DP_ARCH) == "FreeBSD"
22 DEFAULT_SNDAPI=OSS
23 .else
24 DEFAULT_SNDAPI=BSD
25 .endif
26 OBJ_CD=$(OBJ_BSDCD)
27
28 OBJ_CL=$(OBJ_GLX)
29 OBJ_ICON=
30 OBJ_ICON_NEXUIZ=
31
32 LDFLAGS_CL=$(LDFLAGS_BSDCL)
33 LDFLAGS_SV=$(LDFLAGS_BSDSV)
34 LDFLAGS_SDL=$(LDFLAGS_BSDSDL)
35
36 EXE_CL=$(EXE_UNIXCL)
37 EXE_SV=$(EXE_UNIXSV)
38 EXE_SDL=$(EXE_UNIXSDL)
39 EXE_CLNEXUIZ=$(EXE_UNIXCLNEXUIZ)
40 EXE_SVNEXUIZ=$(EXE_UNIXSVNEXUIZ)
41 EXE_SDLNEXUIZ=$(EXE_UNIXSDLNEXUIZ)
42
43 .endif
44
45
46 ##### Sound configuration #####
47
48 .ifndef DP_SOUND_API
49 DP_SOUND_API=$(DEFAULT_SNDAPI)
50 .endif
51
52 # NULL: no sound
53 .if $(DP_SOUND_API) == "NULL"
54 OBJ_SOUND=$(OBJ_SND_NULL)
55 LIB_SOUND=$(LIB_SND_NULL)
56 .endif
57
58 # OSS: Open Sound System
59 .if $(DP_SOUND_API) == "OSS"
60 OBJ_SOUND=$(OBJ_SND_OSS)
61 LIB_SOUND=$(LIB_SND_OSS)
62 .endif
63
64 # BSD: BSD / Sun audio API
65 .if $(DP_SOUND_API) == "BSD"
66 OBJ_SOUND=$(OBJ_SND_BSD)
67 LIB_SOUND=$(LIB_SND_BSD)
68 .endif
69
70
71 ##### BSD Make specific definitions #####
72
73 MAKE:=$(MAKE) -f BSDmakefile
74
75 DO_LD=$(CC) -o $@ $> $(LDFLAGS)
76
77
78 ##### Definitions shared by all makefiles #####
79 .include "makefile.inc"
80
81
82 ##### Dependency files #####
83
84 DEPEND_FILES != ls *.d
85 .for i in $(DEPEND_FILES)
86 .       include "$i"
87 .endfor