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