-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJamrules.configure
125 lines (114 loc) · 3.56 KB
/
Jamrules.configure
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
PROJECT_NAME = I.V.A.N. ;
-configure-enable-disable-vars- +=
"sound" USE_SOUND "auto" "enable sound"
"zlib" USE_ZLIB "auto" "use ZLib"
"imlib2" USE_IMLIB2 "auto" "use imlib2"
"opengl" USE_OPENGL "auto" "use OpenGL renderer"
"libpng" USE_LIBPNG "auto" "use LibPNG to load graphics (this won't disable pcx)"
#
"wizard" USE_WIZARD "auto" "disable 'wizard' mode"
"global-saves" USE_GLOBAL_SAVES "auto" "enable saves in \$HOME"
"pngshots" USE_PNG_SHOTS "tan" "disable png savegame shots (use IPU)"
;
rule -configure-preinit- {
#USE_WIZARD
}
rule -configure- {
-configure-pkg-config-necessary-
"SDL" "sdl < 2"
;
local has-prefix = ;
for local ca in $(JAMCONFIGARGS) {
if [ Match '^--prefix=.+$' : $(ca) ] {
has-prefix = tan ;
break ;
}
}
if $(has-prefix) {
# this is 'install' version, fix options
if $(USE_WIZARD) == "auto" { USE_WIZARD = ; }
if $(USE_GLOBAL_SAVES) == "auto" { USE_GLOBAL_SAVES = tan ; }
} else {
if $(USE_WIZARD) == "auto" { USE_WIZARD = tan ; }
if $(USE_GLOBAL_SAVES) == "auto" { USE_GLOBAL_SAVES = ; }
}
#Echo "PREFIX:" $(has-prefix) ;
#Echo "USE_WIZARD:" $(USE_WIZARD) ;
#Echo "USE_GLOBAL_SAVES:" $(USE_GLOBAL_SAVES) ;
if ! $(USE_SOUND) {
-configure-add-line- "# sound disabled" ;
-configure-add-line- "DEFINES += DISABLE_SOUND ;" ;
} else {
-configure-pkg-config- "SDL Mixer" : SDL_mixer : : "DEFINES += DISABLE_SOUND ;" ;
-configure-pkg-config- "ALSA" : alsa : "DEFINES += ENABLE_ALSA ;" : ;
}
if ! $(USE_OPENGL) {
-configure-add-line- "# OpenGL disabled" ;
-configure-add-line- "DEFINES += DISABLE_OPENGL ;" ;
} else {
-configure-pkg-config- "OpenGL" : gl : : "DEFINES += DISABLE_OPENGL ;" ;
}
#
if ! $(USE_ZLIB) {
-configure-add-line- "# ZLib disabled" ;
} else {
if ! [ -configure-pkg-config- "ZLib" : zlib : "DEFINES += USE_ZLIB ;" ] { USE_ZLIB = ; }
}
#
# libpng 1.6
if $(USE_LIBPNG) {
if ! [ -configure-pkg-config- "libpng" : "libpng >= 1.6" ] {
if ! [ -configure-pkg-config- "libpng16" : "libpng16 >= 1.6" ] {
USE_LIBPNG = ;
}
}
}
if ! $(USE_LIBPNG) {
-configure-add-line- "# libpng disabled" ;
if ! $(USE_IMLIB2) {
-configure-add-line- "# imlib2 disabled" ;
} else {
#if ! [ -configure-pkg-config- "imlib2" : imlib2 : "DEFINES += HAVE_IMLIB2 ;" ] { USE_IMLIB2 = ; }
}
Exit "FATAL: LibPNG 1.6 not found!" ;
} else {
-configure-add-line- "DEFINES += HAVE_LIBPNG ;" ;
}
#
### if $(HAVE_LIBPNG) {
### Echo "MSG: libpng found" ;
### lib-config "pkg-config libpng" ;
### DEFINES += HAVE_LIBPNG ;
### }
#
if $(OSPLAT) = 'X86_64' {
Echo "MSG: 64bit arches aren't supported. forcing 32-bit build." ;
-configure-add-line- "# 64shit found" ;
-configure-add-line- "CFLAGS.all += -m32 ;" ;
-configure-add-line- "LINKFLAGS.all += -m32 ;" ;
}
-configure-add-line- "# other options" ;
if $(USE_WIZARD) {
Echo "CFG: wizard mode enabled" ;
-configure-add-line- "DEFINES += WIZARD ;" ;
}
#
if $(USE_GLOBAL_SAVES) {
Echo "CFG: using saves in \$HOME" ;
} else {
Echo "CFG: using local saves" ;
-configure-add-line- "DEFINES += LOCAL_SAVES ;" ;
}
#
if $(USE_ZLIB) {
Echo "CFG: support for compressed saves turned on" ;
}
# USE_LIBPNG
if $(USE_PNG_SHOTS) {
Echo "CFG: savegame screenshots will be in PNG format" ;
} else {
Echo "CFG: savegame screenshots will be in internal format" ;
-configure-add-line- "DEFINES += SGAME_SHOTS_IPU ;" ;
}
}
configure ;