trunk/scripts/genie.lua
| r245377 | r245378 | |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | newoption { |
| 167 | trigger = "NOASM", |
| 168 | description = "Disable implementations based on assembler code", |
| 169 | allowed = { |
| 170 | { "0", "Enable assembler code" }, |
| 171 | { "1", "Disable assembler code" }, |
| 172 | }, |
| 173 | } |
| 174 | |
| 175 | newoption { |
| 167 | 176 | trigger = "FORCE_DRC_C_BACKEND", |
| 168 | 177 | description = "Force DRC C backend.", |
| 169 | 178 | } |
| r245377 | r245378 | |
| 180 | 189 | { "0", "Disabled" }, |
| 181 | 190 | { "1", "Enabled" }, |
| 182 | 191 | } |
| 183 | | } |
| 192 | } |
| 184 | 193 | |
| 185 | 194 | local os_version = str_to_version(_OPTIONS["os_version"]) |
| 186 | 195 | |
| 196 | if not _OPTIONS["NOASM"] then |
| 197 | if _OPTIONS["targetos"]=="emscripten" then |
| 198 | _OPTIONS["NOASM"] = "1" |
| 199 | else |
| 200 | _OPTIONS["NOASM"] = "0" |
| 201 | end |
| 202 | end |
| 203 | |
| 204 | if _OPTIONS["NOASM"]=="1" and not _OPTIONS["FORCE_DRC_C_BACKEND"] then |
| 205 | _OPTIONS["FORCE_DRC_C_BACKEND"] = "1" |
| 206 | end |
| 207 | |
| 187 | 208 | USE_BGFX = 1 |
| 188 | 209 | if (_OPTIONS["targetos"]=="macosx" and os_version < 100700) then |
| 189 | 210 | USE_BGFX = 0 |
| r245377 | r245378 | |
| 201 | 222 | solution (_OPTIONS["target"]) |
| 202 | 223 | else |
| 203 | 224 | solution (_OPTIONS["target"] .. _OPTIONS["subtarget"]) |
| 204 | | end |
| 205 | | configurations { |
| 206 | | "Debug", |
| 207 | | "Release", |
| 208 | | } |
| 225 | end |
| 209 | 226 | |
| 210 | | platforms { |
| 211 | | "x32", |
| 212 | | "x64", |
| 213 | | "Native", -- for targets where bitness is not specified |
| 214 | | } |
| 227 | configurations { |
| 228 | "Debug", |
| 229 | "Release", |
| 230 | } |
| 215 | 231 | |
| 216 | | language "C++" |
| 232 | platforms { |
| 233 | "x32", |
| 234 | "x64", |
| 235 | "Native", -- for targets where bitness is not specified |
| 236 | } |
| 217 | 237 | |
| 238 | language "C++" |
| 239 | |
| 240 | flags { |
| 241 | "StaticRuntime", |
| 242 | "Unicode", |
| 243 | "NoPCH", |
| 244 | } |
| 245 | |
| 246 | configuration { "vs*" } |
| 218 | 247 | flags { |
| 219 | | "StaticRuntime", |
| 220 | | "Unicode", |
| 221 | | "NoPCH", |
| 222 | | } |
| 223 | | |
| 224 | | configuration { "vs*" } |
| 225 | | flags { |
| 226 | 248 | "ExtraWarnings", |
| 227 | 249 | } |
| 228 | | if _OPTIONS["NOWERROR"]==nil then |
| 229 | | flags{ |
| 230 | | "FatalWarnings", |
| 231 | | } |
| 250 | if not _OPTIONS["NOWERROR"] then |
| 251 | flags{ |
| 252 | "FatalWarnings", |
| 253 | } |
| 232 | 254 | end |
| 233 | 255 | |
| 234 | 256 | |
| 235 | | configuration { "Debug", "vs*" } |
| 236 | | flags { |
| 237 | | "Symbols", |
| 238 | | } |
| 239 | | configuration {} |
| 257 | configuration { "Debug", "vs*" } |
| 258 | flags { |
| 259 | "Symbols", |
| 260 | } |
| 261 | |
| 262 | configuration {} |
| 240 | 263 | |
| 241 | 264 | --aftercompilefile ("\t$(SILENT) gawk -f ../../../../../scripts/depfilter.awk $(@:%.o=%.d) > $(@:%.o=%.dep)\n\t$(SILENT) mv $(@:%.o=%.dep) $(@:%.o=%.d)") |
| 242 | 265 | |
| r245377 | r245378 | |
| 305 | 328 | |
| 306 | 329 | |
| 307 | 330 | if _OPTIONS["targetos"]=="windows" then |
| 308 | | configuration { "x64" } |
| 309 | | defines { |
| 310 | | "X64_WINDOWS_ABI", |
| 311 | | } |
| 312 | | configuration { } |
| 331 | configuration { "x64" } |
| 332 | defines { |
| 333 | "X64_WINDOWS_ABI", |
| 334 | } |
| 335 | configuration { } |
| 313 | 336 | end |
| 314 | 337 | |
| 315 | 338 | -- Avoid error when invoking genie --help. |
| r245377 | r245378 | |
| 349 | 372 | } |
| 350 | 373 | |
| 351 | 374 | configuration { } |
| 352 | | -- CR/LF setup: use both on win32/os2, CR only on everything else |
| 353 | | if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="os2" then |
| 354 | | defines { |
| 355 | | "CRLF=3", |
| 356 | | } |
| 357 | | else |
| 358 | | defines { |
| 359 | | "CRLF=2", |
| 360 | | } |
| 361 | | end |
| 362 | 375 | |
| 376 | -- CR/LF setup: use both on win32/os2, CR only on everything else |
| 377 | if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="os2" then |
| 378 | defines { |
| 379 | "CRLF=3", |
| 380 | } |
| 381 | else |
| 382 | defines { |
| 383 | "CRLF=2", |
| 384 | } |
| 385 | end |
| 363 | 386 | |
| 364 | | -- define LSB_FIRST if we are a little-endian target |
| 387 | |
| 388 | -- define LSB_FIRST if we are a little-endian target |
| 389 | defines { |
| 390 | "LSB_FIRST", |
| 391 | } |
| 392 | |
| 393 | -- define USE_NETWORK if networking is enabled (not OS/2 and hasn't been disabled) |
| 394 | if not _OPTIONS["targetos"]=="os2" then |
| 365 | 395 | defines { |
| 366 | | "LSB_FIRST", |
| 396 | "USE_NETWORK", |
| 367 | 397 | } |
| 398 | end |
| 399 | -- need to ensure FLAC functions are statically linked |
| 400 | defines { |
| 401 | "FLAC__NO_DLL", |
| 402 | } |
| 368 | 403 | |
| 369 | | -- define USE_NETWORK if networking is enabled (not OS/2 and hasn't been disabled) |
| 370 | | if not _OPTIONS["targetos"]=="os2" then |
| 371 | | defines { |
| 372 | | "USE_NETWORK", |
| 373 | | } |
| 374 | | end |
| 375 | | -- need to ensure FLAC functions are statically linked |
| 404 | if _OPTIONS["NOASM"]=="1" then |
| 376 | 405 | defines { |
| 377 | | "FLAC__NO_DLL", |
| 406 | "MAME_NOASM" |
| 378 | 407 | } |
| 408 | end |
| 379 | 409 | |
| 380 | | -- fixme -- need to make this work for other target architectures (PPC) |
| 381 | | if _OPTIONS["FORCE_DRC_C_BACKEND"]==nil then |
| 382 | | configuration { "x64" } |
| 383 | | defines { |
| 384 | | "NATIVE_DRC=drcbe_x64", |
| 385 | | } |
| 386 | | configuration { "x32" } |
| 387 | | defines { |
| 388 | | "NATIVE_DRC=drcbe_x86", |
| 389 | | } |
| 390 | | configuration { } |
| 391 | | end |
| 410 | -- fixme -- need to make this work for other target architectures (PPC) |
| 411 | if not _OPTIONS["FORCE_DRC_C_BACKEND"] then |
| 412 | configuration { "x64" } |
| 413 | defines { |
| 414 | "NATIVE_DRC=drcbe_x64", |
| 415 | } |
| 416 | configuration { "x32" } |
| 417 | defines { |
| 418 | "NATIVE_DRC=drcbe_x86", |
| 419 | } |
| 420 | configuration { } |
| 421 | end |
| 392 | 422 | |
| 393 | 423 | -- define USE_SYSTEM_JPEGLIB if library shipped with MAME is not used |
| 394 | 424 | --ifneq ($(BUILD_JPEGLIB),1) |
trunk/scripts/src/osd/sdl.lua
| r245377 | r245378 | |
| 382 | 382 | MAME_DIR .. "src/osd/modules/osdmodule.c", |
| 383 | 383 | MAME_DIR .. "src/osd/modules/lib/osdlib_" .. SDLOS_TARGETOS .. ".c", |
| 384 | 384 | MAME_DIR .. "src/osd/modules/sync/sync_" .. SYNC_IMPLEMENTATION .. ".c", |
| 385 | | --ifdef NOASM |
| 386 | | --MAME_DIR .. "src/osd/modules/sync/work_mini.c", |
| 387 | | --else |
| 388 | | MAME_DIR .. "src/osd/modules/sync/work_osd.c", |
| 389 | 385 | } |
| 390 | 386 | |
| 387 | if _OPTIONS["NOASM"]=="1" then |
| 388 | files { |
| 389 | MAME_DIR .. "src/osd/modules/sync/work_mini.c", |
| 390 | } |
| 391 | else |
| 392 | files { |
| 393 | MAME_DIR .. "src/osd/modules/sync/work_osd.c", |
| 394 | } |
| 395 | end |
| 396 | |
| 391 | 397 | if _OPTIONS["targetos"]=="macosx" then |
| 392 | 398 | files { |
| 393 | 399 | MAME_DIR .. "src/osd/sdl/osxutils.m", |
trunk/scripts/src/osd/windows.lua
| r245377 | r245378 | |
| 150 | 150 | MAME_DIR .. "src/osd/windows/winsocket.c", |
| 151 | 151 | MAME_DIR .. "src/osd/windows/winptty.c", |
| 152 | 152 | MAME_DIR .. "src/osd/modules/osdmodule.c", |
| 153 | | MAME_DIR .. "src/osd/modules/sync/work_osd.c", |
| 154 | 153 | MAME_DIR .. "src/osd/modules/lib/osdlib_win32.c", |
| 155 | 154 | } |
| 156 | 155 | |
| 156 | if _OPTIONS["NOASM"]=="1" then |
| 157 | files { |
| 158 | MAME_DIR .. "src/osd/modules/sync/work_mini.c", |
| 159 | } |
| 160 | else |
| 161 | files { |
| 162 | MAME_DIR .. "src/osd/modules/sync/work_osd.c", |
| 163 | } |
| 164 | end |
| 157 | 165 | |
| 166 | |
| 158 | 167 | -------------------------------------------------- |
| 159 | 168 | -- ledutil |
| 160 | 169 | -------------------------------------------------- |
trunk/src/osd/sdl/sdlmain.c
| r245377 | r245378 | |
| 389 | 389 | MACRO_VERBOSE(SDLMAME_DARWIN); |
| 390 | 390 | MACRO_VERBOSE(SDLMAME_LINUX); |
| 391 | 391 | MACRO_VERBOSE(SDLMAME_SOLARIS); |
| 392 | | MACRO_VERBOSE(SDLMAME_NOASM); |
| 393 | 392 | MACRO_VERBOSE(SDLMAME_IRIX); |
| 394 | 393 | MACRO_VERBOSE(SDLMAME_BSD); |
| 395 | 394 | osd_printf_verbose("\n"); |
| 396 | 395 | osd_printf_verbose("Build defines 1: "); |
| 397 | 396 | MACRO_VERBOSE(LSB_FIRST); |
| 398 | 397 | MACRO_VERBOSE(PTR64); |
| 398 | MACRO_VERBOSE(MAME_NOASM); |
| 399 | 399 | MACRO_VERBOSE(MAME_DEBUG); |
| 400 | 400 | MACRO_VERBOSE(BIGENDIAN); |
| 401 | 401 | MACRO_VERBOSE(CPP_COMPILE); |