diff --git a/.gitignore b/.gitignore index c70e7e8..8d6613e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,4 @@ #quack -# osx annoyances -.DS_Store - # binaries folder /bin/ /Build/ @@ -34,16 +31,3 @@ config.h *.so *.dylib -# qt creator -CMakeLists.txt.user - -# python bytecode -__pycache__ - -# other repos -/dep/mac -/android - -# UWP crap -Generated Files -/packages diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..4ed79a3 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.18) +project("chdman CBT edition") +#compiler flags are "CMAKE_C_FLAGS" and "CMAKE_CXX_FLAGS" + +add_subdirectory(cmake_subdirs) + +#chdman +add_executable(chdman +${CMAKE_SOURCE_DIR}/src/chdman.cpp +${CMAKE_SOURCE_DIR}/src/version.cpp +) +target_include_directories(chdman PRIVATE +${CMAKE_SOURCE_DIR}/src/osd +${CMAKE_SOURCE_DIR}/src/lib/util +${CMAKE_SOURCE_DIR}/3rdparty +${CMAKE_SOURCE_DIR}/3rdparty/libflac/include +) +set_property(TARGET chdman PROPERTY CXX_STANDARD 17) + +#linking +#target_link_libraries(ocore_sdl PRIVATE SDL2) + +target_link_libraries(chdman PRIVATE utils expat 7z ocore_sdl zlib flac utf8proc +dl rt SDL2 m pthread util) diff --git a/cmake_subdirs/7z/CMakeLists.txt b/cmake_subdirs/7z/CMakeLists.txt new file mode 100644 index 0000000..e11db37 --- /dev/null +++ b/cmake_subdirs/7z/CMakeLists.txt @@ -0,0 +1,37 @@ +#lib7z +add_compile_definitions(_7ZIP_PPMD_SUPPPORT _7ZIP_ST) +set(CMAKE_C_FLAGS "-Wno-strict-prototypes -Wno-undef -Wno-misleading-indentation") +set(7z_dir ${CMAKE_SOURCE_DIR}/3rdparty/lzma) + +add_library(7z STATIC +${7z_dir}/C/7zAlloc.c +${7z_dir}/C/7zArcIn.c +${7z_dir}/C/7zBuf.c +${7z_dir}/C/7zBuf2.c +${7z_dir}/C/7zCrc.c +${7z_dir}/C/7zCrcOpt.c +${7z_dir}/C/7zDec.c +${7z_dir}/C/7zFile.c +${7z_dir}/C/7zStream.c +${7z_dir}/C/Aes.c +${7z_dir}/C/AesOpt.c +${7z_dir}/C/Alloc.c +${7z_dir}/C/Bcj2.c +${7z_dir}/C/Bra.c +${7z_dir}/C/Bra86.c +${7z_dir}/C/BraIA64.c +${7z_dir}/C/CpuArch.c +${7z_dir}/C/Delta.c +${7z_dir}/C/LzFind.c +${7z_dir}/C/Lzma2Dec.c +${7z_dir}/C/Lzma2Enc.c +${7z_dir}/C/Lzma86Dec.c +${7z_dir}/C/Lzma86Enc.c +${7z_dir}/C/LzmaDec.c +${7z_dir}/C/LzmaEnc.c +${7z_dir}/C/Ppmd7.c +${7z_dir}/C/Ppmd7Dec.c +${7z_dir}/C/Ppmd7Enc.c +${7z_dir}/C/Sha256.c +${7z_dir}/C/Sort.c +) diff --git a/cmake_subdirs/CMakeLists.txt b/cmake_subdirs/CMakeLists.txt new file mode 100644 index 0000000..74b2d14 --- /dev/null +++ b/cmake_subdirs/CMakeLists.txt @@ -0,0 +1,8 @@ +add_subdirectory(7z) +add_subdirectory(expat) +add_subdirectory(flac) +add_subdirectory(ocore_sdl) +add_subdirectory(utf8proc) +add_subdirectory(utils) +add_subdirectory(zlib) + diff --git a/cmake_subdirs/expat/CMakeLists.txt b/cmake_subdirs/expat/CMakeLists.txt new file mode 100644 index 0000000..efb9711 --- /dev/null +++ b/cmake_subdirs/expat/CMakeLists.txt @@ -0,0 +1,47 @@ +#libexpat +option(BIGENDIAN OFF) +set(expat_dir ${CMAKE_SOURCE_DIR}/3rdparty/expat) + +add_compile_definitions( +HAVE_MEMMOVE +HAVE_STDINT_H +HAVE_STDLIB_H +HAVE_STRING_H +PACKAGE=expat +PACKAGE_BUGREPORT="expat-bugs@libexpat.org" +PACKAGE_NAME=expat +PACKAGE_STRING="expat 2.2.10" +PACKAGE_TARNAME=expat +PACKAGE_URL= +PACKAGE_VERSION="2.2.10" +STDC_HEADERS +VERSION="2.2.10" +XML_CONTEXT_BYTES=1024 +XML_DTD +XML_NS +) +if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 11.1) +set(CMAKE_C_FLAGS "-Wno-maybe-uninitialized") +endif() +if(BIGENDIAN) +add_compile_definitions(BYTEORDER=4321 WORDS_BIGENDIAN) +else() +add_compile_definitions(BYTEORDER=1234) +endif() +#if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") +add_compile_definitions( +HAVE_DLFCN_H +HAVE_FCNTL_H +HAVE_MMAP +HAVE_SYS_STAT_H +HAVE_SYS_TYPES_H +HAVE_UNISTD_H +XML_DEV_URANDOM +) +#endif() + +add_library(expat STATIC +${expat_dir}/lib/xmlparse.c +${expat_dir}/lib/xmlrole.c +${expat_dir}/lib/xmltok.c +) \ No newline at end of file diff --git a/cmake_subdirs/flac/CMakeLists.txt b/cmake_subdirs/flac/CMakeLists.txt new file mode 100644 index 0000000..c73b9a6 --- /dev/null +++ b/cmake_subdirs/flac/CMakeLists.txt @@ -0,0 +1,42 @@ +#libflac +set(flac_dir ${CMAKE_SOURCE_DIR}/3rdparty/libflac) + +add_compile_definitions( +WORDS_BIGENDIAN=0 +FLAC__NO_ASM +_LARGEFILE_SOURCE +_FILE_OFFSET_BITS=64 +FLAC__HAS_OGG=0 +HAVE_CONFIG_H=1 +) + +if(${CMAKE_GENERATOR} STREQUAL "Unix Makefiles" OR ${CMAKE_GENERATOR} STREQUAL "Ninja") +set(CMAKE_C_FLAGS "-Wno-unused-function -O0") +endif() + +if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-enum-conversion") +endif() + +include_directories( +${flac_dir}/src/libFLAC/include +${flac_dir}/include +) + +add_library(flac STATIC +${flac_dir}/src/libFLAC/bitmath.c +${flac_dir}/src/libFLAC/bitreader.c +${flac_dir}/src/libFLAC/bitwriter.c +${flac_dir}/src/libFLAC/cpu.c +${flac_dir}/src/libFLAC/crc.c +${flac_dir}/src/libFLAC/fixed.c +${flac_dir}/src/libFLAC/float.c +${flac_dir}/src/libFLAC/format.c +${flac_dir}/src/libFLAC/lpc.c +${flac_dir}/src/libFLAC/md5.c +${flac_dir}/src/libFLAC/memory.c +${flac_dir}/src/libFLAC/stream_decoder.c +${flac_dir}/src/libFLAC/stream_encoder.c +${flac_dir}/src/libFLAC/stream_encoder_framing.c +${flac_dir}/src/libFLAC/window.c +) \ No newline at end of file diff --git a/cmake_subdirs/ocore_sdl/CMakeLists.txt b/cmake_subdirs/ocore_sdl/CMakeLists.txt new file mode 100644 index 0000000..ea091ba --- /dev/null +++ b/cmake_subdirs/ocore_sdl/CMakeLists.txt @@ -0,0 +1,29 @@ +#ocore_sdl +set(CMAKE_CXX_STANDARD 17) +include_directories( +${CMAKE_SOURCE_DIR}/src/emu +${CMAKE_SOURCE_DIR}/src/osd +${CMAKE_SOURCE_DIR}/src/lib +${CMAKE_SOURCE_DIR}/src/lib/util +${CMAKE_SOURCE_DIR}/src/osd/sdl +) + +add_library(ocore_sdl STATIC +${CMAKE_SOURCE_DIR}/src/osd/osdcore.cpp +${CMAKE_SOURCE_DIR}/src/osd/osdcore.h +${CMAKE_SOURCE_DIR}/src/osd/osdfile.h +${CMAKE_SOURCE_DIR}/src/osd/strconv.cpp +${CMAKE_SOURCE_DIR}/src/osd/strconv.h +${CMAKE_SOURCE_DIR}/src/osd/osdsync.cpp +${CMAKE_SOURCE_DIR}/src/osd/osdsync.h +${CMAKE_SOURCE_DIR}/src/osd/modules/osdmodule.cpp +${CMAKE_SOURCE_DIR}/src/osd/modules/osdmodule.h +${CMAKE_SOURCE_DIR}/src/osd/modules/lib/osdlib_unix.cpp +${CMAKE_SOURCE_DIR}/src/osd/modules/lib/osdlib.h +${CMAKE_SOURCE_DIR}/src/osd/modules/file/posixdir.cpp +${CMAKE_SOURCE_DIR}/src/osd/modules/file/posixfile.cpp +${CMAKE_SOURCE_DIR}/src/osd/modules/file/posixfile.h +${CMAKE_SOURCE_DIR}/src/osd/modules/file/posixptty.cpp +${CMAKE_SOURCE_DIR}/src/osd/modules/file/posixsocket.cpp +#${CMAKE_SOURCE_DIR}/src/osd/modules/file/stdfile.cpp +) diff --git a/cmake_subdirs/utf8proc/CMakeLists.txt b/cmake_subdirs/utf8proc/CMakeLists.txt new file mode 100644 index 0000000..39467b1 --- /dev/null +++ b/cmake_subdirs/utf8proc/CMakeLists.txt @@ -0,0 +1,10 @@ +#utf8proc +set(utf8proc_dir ${CMAKE_SOURCE_DIR}/3rdparty/utf8proc) +add_compile_definitions(UTF8PROC_STATIC) +if(${CMAKE_GENERATOR} STREQUAL "Unix Makefiles" OR ${CMAKE_GENERATOR} STREQUAL "Ninja") +set(CMAKE_C_FLAGS "-Wno-strict-prototypes") +endif() + +add_library(utf8proc STATIC +${utf8proc_dir}/utf8proc.c +) diff --git a/cmake_subdirs/utils/CMakeLists.txt b/cmake_subdirs/utils/CMakeLists.txt new file mode 100644 index 0000000..e6f0390 --- /dev/null +++ b/cmake_subdirs/utils/CMakeLists.txt @@ -0,0 +1,125 @@ +#utils +set(utils_dir ${CMAKE_SOURCE_DIR}/src/lib/util) + +add_compile_definitions(UTF8PROC_STATIC) +set(CMAKE_CXX_STANDARD 17) +#if unix +add_compile_definitions(CRLF=2) +#endif() + +include_directories( +${CMAKE_SOURCE_DIR}/src/osd +${CMAKE_SOURCE_DIR}/src/lib/util +${CMAKE_SOURCE_DIR}/3rdparty +${CMAKE_SOURCE_DIR}/3rdparty/expat/lib +${CMAKE_SOURCE_DIR}/3rdparty/zlib +${CMAKE_SOURCE_DIR}/3rdparty/libflac/include +${CMAKE_SOURCE_DIR}/3rdparty/utf8proc +) + +add_library(utils STATIC +${utils_dir}/abi.h +${utils_dir}/avhuff.cpp +${utils_dir}/avhuff.h +${utils_dir}/aviio.cpp +${utils_dir}/aviio.h +${utils_dir}/base64.hpp +${utils_dir}/bitmap.cpp +${utils_dir}/bitmap.h +${utils_dir}/bitstream.h +${utils_dir}/cdrom.cpp +${utils_dir}/cdrom.h +${utils_dir}/chd.cpp +${utils_dir}/chd.h +${utils_dir}/chdcd.cpp +${utils_dir}/chdcd.h +${utils_dir}/chdcodec.cpp +${utils_dir}/chdcodec.h +${utils_dir}/client_http.hpp +${utils_dir}/client_https.hpp +${utils_dir}/client_ws.hpp +${utils_dir}/client_wss.hpp +${utils_dir}/corealloc.cpp +${utils_dir}/corealloc.h +${utils_dir}/corefile.cpp +${utils_dir}/corefile.h +${utils_dir}/corestr.cpp +${utils_dir}/corestr.h +${utils_dir}/coretmpl.h +${utils_dir}/coreutil.cpp +${utils_dir}/coreutil.h +${utils_dir}/crypto.hpp +${utils_dir}/delegate.cpp +${utils_dir}/delegate.h +${utils_dir}/disasmintf.cpp +${utils_dir}/disasmintf.h +${utils_dir}/dynamicclass.cpp +${utils_dir}/dynamicclass.h +${utils_dir}/dynamicclass.ipp +${utils_dir}/endianness.h +${utils_dir}/flac.cpp +${utils_dir}/flac.h +${utils_dir}/harddisk.cpp +${utils_dir}/harddisk.h +${utils_dir}/hash.cpp +${utils_dir}/hash.h +${utils_dir}/hashing.cpp +${utils_dir}/hashing.h +${utils_dir}/huffman.cpp +${utils_dir}/huffman.h +${utils_dir}/ioprocs.cpp +${utils_dir}/ioprocs.h +${utils_dir}/ioprocsfill.h +${utils_dir}/ioprocsfilter.cpp +${utils_dir}/ioprocsfilter.h +${utils_dir}/ioprocsvec.h +${utils_dir}/jedparse.cpp +${utils_dir}/jedparse.h +${utils_dir}/language.cpp +${utils_dir}/language.h +${utils_dir}/lrucache.h +${utils_dir}/md5.cpp +${utils_dir}/md5.h +${utils_dir}/msdib.cpp +${utils_dir}/msdib.h +${utils_dir}/nanosvg.cpp +${utils_dir}/nanosvg.h +${utils_dir}/opresolv.cpp +${utils_dir}/opresolv.h +${utils_dir}/options.cpp +${utils_dir}/options.h +${utils_dir}/palette.cpp +${utils_dir}/palette.h +${utils_dir}/path.cpp +${utils_dir}/path.h +${utils_dir}/path_to_regex.cpp +${utils_dir}/path_to_regex.hpp +${utils_dir}/plaparse.cpp +${utils_dir}/plaparse.h +${utils_dir}/png.cpp +${utils_dir}/png.h +${utils_dir}/server_http.hpp +${utils_dir}/server_https.hpp +${utils_dir}/server_ws.hpp +${utils_dir}/server_wss.hpp +${utils_dir}/strformat.cpp +${utils_dir}/strformat.h +${utils_dir}/timeconv.cpp +${utils_dir}/timeconv.h +${utils_dir}/unicode.cpp +${utils_dir}/unicode.h +${utils_dir}/unzip.cpp +${utils_dir}/unzip.h +${utils_dir}/un7z.cpp +${utils_dir}/utilfwd.h +${utils_dir}/vbiparse.cpp +${utils_dir}/vbiparse.h +${utils_dir}/vecstream.cpp +${utils_dir}/vecstream.h +${utils_dir}/wavwrite.cpp +${utils_dir}/wavwrite.h +${utils_dir}/xmlfile.cpp +${utils_dir}/xmlfile.h +${utils_dir}/zippath.cpp +${utils_dir}/zippath.h +) diff --git a/cmake_subdirs/zlib/CMakeLists.txt b/cmake_subdirs/zlib/CMakeLists.txt new file mode 100644 index 0000000..0714e4e --- /dev/null +++ b/cmake_subdirs/zlib/CMakeLists.txt @@ -0,0 +1,22 @@ +#zlib +set(zlib_dir ${CMAKE_SOURCE_DIR}/3rdparty/zlib) + +set(CMAKE_C_FLAGS "-Wno-shift-negative-value") +if(${CMAKE_GENERATOR} STREQUAL "Unix Makefiles" OR ${CMAKE_GENERATOR} STREQUAL "Ninja") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-strict-prototypes") +endif() +add_compile_definitions(ZLIB_CONST) + +add_library(zlib STATIC +${zlib_dir}/adler32.c +${zlib_dir}/compress.c +${zlib_dir}/crc32.c +${zlib_dir}/deflate.c +${zlib_dir}/inffast.c +${zlib_dir}/inflate.c +${zlib_dir}/infback.c +${zlib_dir}/inftrees.c +${zlib_dir}/trees.c +${zlib_dir}/uncompr.c +${zlib_dir}/zutil.c +) \ No newline at end of file diff --git a/build.sh b/unused/build_call_from_project_root.sh similarity index 100% rename from build.sh rename to unused/build_call_from_project_root.sh diff --git a/chdman_generated_files.txt b/unused/chdman_generated_files.txt similarity index 100% rename from chdman_generated_files.txt rename to unused/chdman_generated_files.txt diff --git a/command b/unused/command similarity index 100% rename from command rename to unused/command diff --git a/unused/deprecated_big_cmake/CMakeLists.txt b/unused/deprecated_big_cmake/CMakeLists.txt new file mode 100644 index 0000000..2e9aba1 --- /dev/null +++ b/unused/deprecated_big_cmake/CMakeLists.txt @@ -0,0 +1,503 @@ +cmake_minimum_required(VERSION 3.18) +project("chdman CBT edition") +#compiler flags are "CMAKE_C_FLAGS" and "CMAKE_CXX_FLAGS" +set(project_root ${CMAKE_SOURCE_DIR}) + +option(BIGENDIAN OFF) + +#lib7z +set(7z_dir ${CMAKE_SOURCE_DIR}/3rdparty/lzma) +add_library(7z STATIC +${7z_dir}/C/7zAlloc.c +${7z_dir}/C/7zArcIn.c +${7z_dir}/C/7zBuf.c +${7z_dir}/C/7zBuf2.c +${7z_dir}/C/7zCrc.c +${7z_dir}/C/7zCrcOpt.c +${7z_dir}/C/7zDec.c +${7z_dir}/C/7zFile.c +${7z_dir}/C/7zStream.c +${7z_dir}/C/Aes.c +${7z_dir}/C/AesOpt.c +${7z_dir}/C/Alloc.c +${7z_dir}/C/Bcj2.c +${7z_dir}/C/Bra.c +${7z_dir}/C/Bra86.c +${7z_dir}/C/BraIA64.c +${7z_dir}/C/CpuArch.c +${7z_dir}/C/Delta.c +${7z_dir}/C/LzFind.c +${7z_dir}/C/Lzma2Dec.c +${7z_dir}/C/Lzma2Enc.c +${7z_dir}/C/Lzma86Dec.c +${7z_dir}/C/Lzma86Enc.c +${7z_dir}/C/LzmaDec.c +${7z_dir}/C/LzmaEnc.c +${7z_dir}/C/Ppmd7.c +${7z_dir}/C/Ppmd7Dec.c +${7z_dir}/C/Ppmd7Enc.c +${7z_dir}/C/Sha256.c +${7z_dir}/C/Sort.c +) +target_compile_definitions(7z PRIVATE _7ZIP_PPMD_SUPPPORT _7ZIP_ST) +set_target_properties(7z PROPERTIES +CMAKE_C_FLAGS "-Wno-strict-prototypes -Wno-undef -Wno-misleading-indentation" +) + +#libexpat +set(expat_dir ${CMAKE_SOURCE_DIR}/3rdparty/expat) +add_library(expat STATIC +${expat_dir}/lib/xmlparse.c +${expat_dir}/lib/xmlrole.c +${expat_dir}/lib/xmltok.c +) +target_compile_definitions(expat PRIVATE +HAVE_MEMMOVE +HAVE_STDINT_H +HAVE_STDLIB_H +HAVE_STRING_H +PACKAGE=expat +PACKAGE_BUGREPORT="expat-bugs@libexpat.org" +PACKAGE_NAME=expat +PACKAGE_STRING="expat 2.2.10" +PACKAGE_TARNAME=expat +PACKAGE_URL= +PACKAGE_VERSION="2.2.10" +STDC_HEADERS +VERSION="2.2.10" +XML_CONTEXT_BYTES=1024 +XML_DTD +XML_NS +) +if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 11.1) +set_target_properties(expat PROPERTIES +CMAKE_C_FLAGS "-Wno-maybe-uninitialized" +) +endif() +if(BIGENDIAN) +target_compile_definitions(expat PRIVATE BYTEORDER=4321 WORDS_BIGENDIAN) +else() +target_compile_definitions(expat PRIVATE BYTEORDER=1234) +endif() +#if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") +target_compile_definitions(expat PRIVATE +HAVE_DLFCN_H +HAVE_FCNTL_H +HAVE_MMAP +HAVE_SYS_STAT_H +HAVE_SYS_TYPES_H +HAVE_UNISTD_H +XML_DEV_URANDOM +) +#endif() + +#libflac +set(flac_dir ${CMAKE_SOURCE_DIR}/3rdparty/libflac) +add_library(flac STATIC +${flac_dir}/src/libFLAC/bitmath.c +${flac_dir}/src/libFLAC/bitreader.c +${flac_dir}/src/libFLAC/bitwriter.c +${flac_dir}/src/libFLAC/cpu.c +${flac_dir}/src/libFLAC/crc.c +${flac_dir}/src/libFLAC/fixed.c +${flac_dir}/src/libFLAC/float.c +${flac_dir}/src/libFLAC/format.c +${flac_dir}/src/libFLAC/lpc.c +${flac_dir}/src/libFLAC/md5.c +${flac_dir}/src/libFLAC/memory.c +${flac_dir}/src/libFLAC/stream_decoder.c +${flac_dir}/src/libFLAC/stream_encoder.c +${flac_dir}/src/libFLAC/stream_encoder_framing.c +${flac_dir}/src/libFLAC/window.c +) +target_compile_definitions(flac PRIVATE +WORDS_BIGENDIAN=0 +FLAC__NO_ASM +_LARGEFILE_SOURCE +_FILE_OFFSET_BITS=64 +FLAC__HAS_OGG=0 +HAVE_CONFIG_H=1 +) +if(${CMAKE_GENERATOR} STREQUAL "Unix Makefiles" OR ${CMAKE_GENERATOR} STREQUAL "Ninja") +set(flac_flags "-Wno-unused-function -O0") +endif() +if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") +set(flac_flags ${flac_flags} "-Wno-enum-conversion") +endif() +set_target_properties(flac PROPERTIES +CMAKE_C_FLAGS "${flac_flags}") +target_include_directories(flac PRIVATE +${flac_dir}/src/libFLAC/include +${flac_dir}/include +) + +#utf8proc +set(utf8proc_dir ${CMAKE_SOURCE_DIR}/3rdparty/utf8proc) +add_library(utf8proc STATIC +${utf8proc_dir}/utf8proc.c +) +target_compile_definitions(utf8proc PRIVATE +UTF8PROC_STATIC +) +if(${CMAKE_GENERATOR} STREQUAL "Unix Makefiles" OR ${CMAKE_GENERATOR} STREQUAL "Ninja") +set_target_properties(utf8proc PROPERTIES +CMAKE_C_FLAGS "-Wno-strict-prototypes") +endif() + +#zlib +set(zlib_dir ${CMAKE_SOURCE_DIR}/3rdparty/zlib) +add_library(zlib STATIC +${zlib_dir}/adler32.c +${zlib_dir}/compress.c +${zlib_dir}/crc32.c +${zlib_dir}/deflate.c +${zlib_dir}/inffast.c +${zlib_dir}/inflate.c +${zlib_dir}/infback.c +${zlib_dir}/inftrees.c +${zlib_dir}/trees.c +${zlib_dir}/uncompr.c +${zlib_dir}/zutil.c +) +set(zlib_flags "-Wno-shift-negative-value") +if(${CMAKE_GENERATOR} STREQUAL "Unix Makefiles" OR ${CMAKE_GENERATOR} STREQUAL "Ninja") +set(zlib_flags ${zlib_flags} "-Wno-strict-prototypes") +endif() +set_target_properties(zlib PROPERTIES +CMAKE_C_FLAGS "${zlib_flags}") +target_compile_definitions(zlib PRIVATE +ZLIB_CONST +) + +#SDL2 +#set(SDL2_dir ${CMAKE_SOURCE_DIR}/3rdparty/SDL2) +#add_library(SDL2 STATIC +#${SDL2_dir}/src/atomic/SDL_atomic.c +#${SDL2_dir}/src/atomic/SDL_spinlock.c +#${SDL2_dir}/src/audio/disk/SDL_diskaudio.c +#${SDL2_dir}/src/audio/disk/SDL_diskaudio.h +#${SDL2_dir}/src/audio/dummy/SDL_dummyaudio.c +#${SDL2_dir}/src/audio/dummy/SDL_dummyaudio.h +#${SDL2_dir}/src/audio/SDL_audio.c +#${SDL2_dir}/src/audio/SDL_audio_c.h +#${SDL2_dir}/src/audio/SDL_audiocvt.c +#${SDL2_dir}/src/audio/SDL_audiodev.c +#${SDL2_dir}/src/audio/SDL_audiodev_c.h +#${SDL2_dir}/src/audio/SDL_audiotypecvt.c +#${SDL2_dir}/src/audio/SDL_mixer.c +#${SDL2_dir}/src/audio/SDL_sysaudio.h +#${SDL2_dir}/src/audio/SDL_wave.c +#${SDL2_dir}/src/audio/SDL_wave.h +#${SDL2_dir}/src/cpuinfo/SDL_cpuinfo.c +#${SDL2_dir}/src/dynapi/SDL_dynapi.c +#${SDL2_dir}/src/dynapi/SDL_dynapi.h +#${SDL2_dir}/src/dynapi/SDL_dynapi_overrides.h +#${SDL2_dir}/src/dynapi/SDL_dynapi_procs.h +#${SDL2_dir}/src/events/blank_cursor.h +#${SDL2_dir}/src/events/default_cursor.h +#${SDL2_dir}/src/events/SDL_clipboardevents.c +#${SDL2_dir}/src/events/SDL_clipboardevents_c.h +#${SDL2_dir}/src/events/SDL_dropevents.c +#${SDL2_dir}/src/events/SDL_dropevents_c.h +#${SDL2_dir}/src/events/SDL_events.c +#${SDL2_dir}/src/events/SDL_events_c.h +#${SDL2_dir}/src/events/SDL_gesture.c +#${SDL2_dir}/src/events/SDL_gesture_c.h +#${SDL2_dir}/src/events/SDL_keyboard.c +#${SDL2_dir}/src/events/SDL_keyboard_c.h +#${SDL2_dir}/src/events/SDL_mouse.c +#${SDL2_dir}/src/events/SDL_mouse_c.h +#${SDL2_dir}/src/events/SDL_quit.c +#${SDL2_dir}/src/events/SDL_sysevents.h +#${SDL2_dir}/src/events/SDL_touch.c +#${SDL2_dir}/src/events/SDL_touch_c.h +#${SDL2_dir}/src/events/SDL_windowevents.c +#${SDL2_dir}/src/events/SDL_windowevents_c.h +#${SDL2_dir}/src/file/SDL_rwops.c +#${SDL2_dir}/src/haptic/SDL_haptic.c +#${SDL2_dir}/src/haptic/SDL_syshaptic.h +#${SDL2_dir}/src/joystick/SDL_gamecontroller.c +#${SDL2_dir}/src/joystick/SDL_joystick.c +#${SDL2_dir}/src/joystick/SDL_joystick_c.h +#${SDL2_dir}/src/joystick/SDL_sysjoystick.h +#${SDL2_dir}/src/loadso/windows/SDL_sysloadso.c +#${SDL2_dir}/src/power/SDL_power.c +#${SDL2_dir}/src/power/windows/SDL_syspower.c +#${SDL2_dir}/src/render/direct3d/SDL_render_d3d.c +#${SDL2_dir}/src/render/direct3d11/SDL_render_d3d11.c +#${SDL2_dir}/src/render/mmx.h +#${SDL2_dir}/src/render/opengl/SDL_render_gl.c +#${SDL2_dir}/src/render/opengl/SDL_shaders_gl.c +#${SDL2_dir}/src/render/opengl/SDL_shaders_gl.h +#${SDL2_dir}/src/render/opengles2/SDL_render_gles2.c +#${SDL2_dir}/src/render/opengles2/SDL_shaders_gles2.c +#${SDL2_dir}/src/render/SDL_d3dmath.c +#${SDL2_dir}/src/render/SDL_d3dmath.h +#${SDL2_dir}/src/render/SDL_render.c +#${SDL2_dir}/src/render/SDL_sysrender.h +#${SDL2_dir}/src/render/SDL_yuv_mmx.c +#${SDL2_dir}/src/render/SDL_yuv_sw.c +#${SDL2_dir}/src/render/SDL_yuv_sw_c.h +#${SDL2_dir}/src/render/software/SDL_blendfillrect.c +#${SDL2_dir}/src/render/software/SDL_blendfillrect.h +#${SDL2_dir}/src/render/software/SDL_blendline.c +#${SDL2_dir}/src/render/software/SDL_blendline.h +#${SDL2_dir}/src/render/software/SDL_blendpoint.c +#${SDL2_dir}/src/render/software/SDL_blendpoint.h +#${SDL2_dir}/src/render/software/SDL_draw.h +#${SDL2_dir}/src/render/software/SDL_drawline.c +#${SDL2_dir}/src/render/software/SDL_drawline.h +#${SDL2_dir}/src/render/software/SDL_drawpoint.c +#${SDL2_dir}/src/render/software/SDL_drawpoint.h +#${SDL2_dir}/src/render/software/SDL_render_sw.c +#${SDL2_dir}/src/render/software/SDL_render_sw_c.h +#${SDL2_dir}/src/render/software/SDL_rotate.c +#${SDL2_dir}/src/render/software/SDL_rotate.h +#${SDL2_dir}/src/SDL.c +#${SDL2_dir}/src/SDL_assert.c +#${SDL2_dir}/src/SDL_error.c +#${SDL2_dir}/src/SDL_error_c.h +#${SDL2_dir}/src/SDL_hints.c +#${SDL2_dir}/src/SDL_log.c +#${SDL2_dir}/src/stdlib/SDL_getenv.c +#${SDL2_dir}/src/stdlib/SDL_iconv.c +#${SDL2_dir}/src/stdlib/SDL_malloc.c +#${SDL2_dir}/src/stdlib/SDL_qsort.c +#${SDL2_dir}/src/stdlib/SDL_stdlib.c +#${SDL2_dir}/src/stdlib/SDL_string.c +#${SDL2_dir}/src/thread/SDL_systhread.h +#${SDL2_dir}/src/thread/SDL_thread.c +#${SDL2_dir}/src/thread/SDL_thread_c.h +#${SDL2_dir}/src/timer/SDL_timer.c +#${SDL2_dir}/src/timer/SDL_timer_c.h +#${SDL2_dir}/src/video/dummy/SDL_nullevents.c +#${SDL2_dir}/src/video/dummy/SDL_nullevents_c.h +#${SDL2_dir}/src/video/dummy/SDL_nullframebuffer.c +#${SDL2_dir}/src/video/dummy/SDL_nullframebuffer_c.h +#${SDL2_dir}/src/video/dummy/SDL_nullvideo.c +#${SDL2_dir}/src/video/dummy/SDL_nullvideo.h +#${SDL2_dir}/src/video/SDL_blit.c +#${SDL2_dir}/src/video/SDL_blit.h +#${SDL2_dir}/src/video/SDL_blit_0.c +#${SDL2_dir}/src/video/SDL_blit_1.c +#${SDL2_dir}/src/video/SDL_blit_A.c +#${SDL2_dir}/src/video/SDL_blit_auto.c +#${SDL2_dir}/src/video/SDL_blit_auto.h +#${SDL2_dir}/src/video/SDL_blit_copy.c +#${SDL2_dir}/src/video/SDL_blit_copy.h +#${SDL2_dir}/src/video/SDL_blit_N.c +#${SDL2_dir}/src/video/SDL_blit_slow.c +#${SDL2_dir}/src/video/SDL_blit_slow.h +#${SDL2_dir}/src/video/SDL_bmp.c +#${SDL2_dir}/src/video/SDL_clipboard.c +#${SDL2_dir}/src/video/SDL_egl.c +#${SDL2_dir}/src/video/SDL_fillrect.c +#${SDL2_dir}/src/video/SDL_pixels.c +#${SDL2_dir}/src/video/SDL_pixels_c.h +#${SDL2_dir}/src/video/SDL_rect.c +#${SDL2_dir}/src/video/SDL_rect_c.h +#${SDL2_dir}/src/video/SDL_RLEaccel.c +#${SDL2_dir}/src/video/SDL_RLEaccel_c.h +#${SDL2_dir}/src/video/SDL_shape.c +#${SDL2_dir}/src/video/SDL_shape_internals.h +#${SDL2_dir}/src/video/SDL_stretch.c +#${SDL2_dir}/src/video/SDL_surface.c +#${SDL2_dir}/src/video/SDL_sysvideo.h +#${SDL2_dir}/src/video/SDL_video.c +# +##${SDL2_dir}/3rdparty/SDL2/src/libm/e_atan2.c +##${SDL2_dir}/3rdparty/SDL2/src/libm/e_log.c +##${SDL2_dir}/3rdparty/SDL2/src/libm/e_pow.c +##${SDL2_dir}/3rdparty/SDL2/src/libm/e_rem_pio2.c +##${SDL2_dir}/3rdparty/SDL2/src/libm/e_sqrt.c +##${SDL2_dir}/3rdparty/SDL2/src/libm/k_cos.c +##${SDL2_dir}/3rdparty/SDL2/src/libm/k_rem_pio2.c +##${SDL2_dir}/3rdparty/SDL2/src/libm/k_sin.c +##${SDL2_dir}/3rdparty/SDL2/src/libm/k_tan.c +##${SDL2_dir}/3rdparty/SDL2/src/libm/math.h +##${SDL2_dir}/3rdparty/SDL2/src/libm/math_private.h +##${SDL2_dir}/3rdparty/SDL2/src/libm/s_atan.c +##${SDL2_dir}/3rdparty/SDL2/src/libm/s_copysign.c +##${SDL2_dir}/3rdparty/SDL2/src/libm/s_cos.c +##${SDL2_dir}/3rdparty/SDL2/src/libm/s_fabs.c +##${SDL2_dir}/3rdparty/SDL2/src/libm/s_floor.c +##${SDL2_dir}/3rdparty/SDL2/src/libm/s_scalbn.c +##${SDL2_dir}/3rdparty/SDL2/src/libm/s_sin.c +##${SDL2_dir}/3rdparty/SDL2/src/libm/s_tan.c +#) +#target_include_directories(SDL2 PRIVATE +#${SDL2_dir}/include +#) +#set_target_properties(SDL2 PROPERTIES +#CMAKE_C_FLAGS "-Wimplicit-function-declaration -Wpointer-to-int-cast") + +#ocore_sdl +add_library(ocore_sdl STATIC +${CMAKE_SOURCE_DIR}/src/osd/osdcore.cpp +${CMAKE_SOURCE_DIR}/src/osd/osdcore.h +${CMAKE_SOURCE_DIR}/src/osd/osdfile.h +${CMAKE_SOURCE_DIR}/src/osd/strconv.cpp +${CMAKE_SOURCE_DIR}/src/osd/strconv.h +${CMAKE_SOURCE_DIR}/src/osd/osdsync.cpp +${CMAKE_SOURCE_DIR}/src/osd/osdsync.h +${CMAKE_SOURCE_DIR}/src/osd/modules/osdmodule.cpp +${CMAKE_SOURCE_DIR}/src/osd/modules/osdmodule.h +${CMAKE_SOURCE_DIR}/src/osd/modules/lib/osdlib_unix.cpp +${CMAKE_SOURCE_DIR}/src/osd/modules/lib/osdlib.h +${CMAKE_SOURCE_DIR}/src/osd/modules/file/posixdir.cpp +${CMAKE_SOURCE_DIR}/src/osd/modules/file/posixfile.cpp +${CMAKE_SOURCE_DIR}/src/osd/modules/file/posixfile.h +${CMAKE_SOURCE_DIR}/src/osd/modules/file/posixptty.cpp +${CMAKE_SOURCE_DIR}/src/osd/modules/file/posixsocket.cpp +#${CMAKE_SOURCE_DIR}/src/osd/modules/file/stdfile.cpp +) +target_include_directories(ocore_sdl PRIVATE +${CMAKE_SOURCE_DIR}/src/emu +${CMAKE_SOURCE_DIR}/src/osd +${CMAKE_SOURCE_DIR}/src/lib +${CMAKE_SOURCE_DIR}/src/lib/util +${CMAKE_SOURCE_DIR}/src/osd/sdl +) +set_property(TARGET ocore_sdl PROPERTY CXX_STANDARD 17) + +#utils +set(utils_dir ${CMAKE_SOURCE_DIR}/src/lib/util) +add_library(utils STATIC +${utils_dir}/abi.h +${utils_dir}/avhuff.cpp +${utils_dir}/avhuff.h +${utils_dir}/aviio.cpp +${utils_dir}/aviio.h +${utils_dir}/base64.hpp +${utils_dir}/bitmap.cpp +${utils_dir}/bitmap.h +${utils_dir}/bitstream.h +${utils_dir}/cdrom.cpp +${utils_dir}/cdrom.h +${utils_dir}/chd.cpp +${utils_dir}/chd.h +${utils_dir}/chdcd.cpp +${utils_dir}/chdcd.h +${utils_dir}/chdcodec.cpp +${utils_dir}/chdcodec.h +${utils_dir}/client_http.hpp +${utils_dir}/client_https.hpp +${utils_dir}/client_ws.hpp +${utils_dir}/client_wss.hpp +${utils_dir}/corealloc.cpp +${utils_dir}/corealloc.h +${utils_dir}/corefile.cpp +${utils_dir}/corefile.h +${utils_dir}/corestr.cpp +${utils_dir}/corestr.h +${utils_dir}/coretmpl.h +${utils_dir}/coreutil.cpp +${utils_dir}/coreutil.h +${utils_dir}/crypto.hpp +${utils_dir}/delegate.cpp +${utils_dir}/delegate.h +${utils_dir}/disasmintf.cpp +${utils_dir}/disasmintf.h +${utils_dir}/dynamicclass.cpp +${utils_dir}/dynamicclass.h +${utils_dir}/dynamicclass.ipp +${utils_dir}/endianness.h +${utils_dir}/flac.cpp +${utils_dir}/flac.h +${utils_dir}/harddisk.cpp +${utils_dir}/harddisk.h +${utils_dir}/hash.cpp +${utils_dir}/hash.h +${utils_dir}/hashing.cpp +${utils_dir}/hashing.h +${utils_dir}/huffman.cpp +${utils_dir}/huffman.h +${utils_dir}/ioprocs.cpp +${utils_dir}/ioprocs.h +${utils_dir}/ioprocsfill.h +${utils_dir}/ioprocsfilter.cpp +${utils_dir}/ioprocsfilter.h +${utils_dir}/ioprocsvec.h +${utils_dir}/jedparse.cpp +${utils_dir}/jedparse.h +${utils_dir}/language.cpp +${utils_dir}/language.h +${utils_dir}/lrucache.h +${utils_dir}/md5.cpp +${utils_dir}/md5.h +${utils_dir}/msdib.cpp +${utils_dir}/msdib.h +${utils_dir}/nanosvg.cpp +${utils_dir}/nanosvg.h +${utils_dir}/opresolv.cpp +${utils_dir}/opresolv.h +${utils_dir}/options.cpp +${utils_dir}/options.h +${utils_dir}/palette.cpp +${utils_dir}/palette.h +${utils_dir}/path.cpp +${utils_dir}/path.h +${utils_dir}/path_to_regex.cpp +${utils_dir}/path_to_regex.hpp +${utils_dir}/plaparse.cpp +${utils_dir}/plaparse.h +${utils_dir}/png.cpp +${utils_dir}/png.h +${utils_dir}/server_http.hpp +${utils_dir}/server_https.hpp +${utils_dir}/server_ws.hpp +${utils_dir}/server_wss.hpp +${utils_dir}/strformat.cpp +${utils_dir}/strformat.h +${utils_dir}/timeconv.cpp +${utils_dir}/timeconv.h +${utils_dir}/unicode.cpp +${utils_dir}/unicode.h +${utils_dir}/unzip.cpp +${utils_dir}/unzip.h +${utils_dir}/un7z.cpp +${utils_dir}/utilfwd.h +${utils_dir}/vbiparse.cpp +${utils_dir}/vbiparse.h +${utils_dir}/vecstream.cpp +${utils_dir}/vecstream.h +${utils_dir}/wavwrite.cpp +${utils_dir}/wavwrite.h +${utils_dir}/xmlfile.cpp +${utils_dir}/xmlfile.h +${utils_dir}/zippath.cpp +${utils_dir}/zippath.h +) +target_compile_definitions(utils PRIVATE UTF8PROC_STATIC) +target_include_directories(utils PRIVATE +${CMAKE_SOURCE_DIR}/src/osd +${CMAKE_SOURCE_DIR}/src/lib/util +${CMAKE_SOURCE_DIR}/3rdparty +${CMAKE_SOURCE_DIR}/3rdparty/expat/lib +${CMAKE_SOURCE_DIR}/3rdparty/zlib +${CMAKE_SOURCE_DIR}/3rdparty/libflac/include +${CMAKE_SOURCE_DIR}/3rdparty/utf8proc +) +set_property(TARGET utils PROPERTY CXX_STANDARD 17) +target_compile_definitions(utils PRIVATE +CRLF=2 +) + +#chdman +add_executable(chdman +${CMAKE_SOURCE_DIR}/src/chdman.cpp +${CMAKE_SOURCE_DIR}/src/version.cpp +) +target_include_directories(chdman PRIVATE +${CMAKE_SOURCE_DIR}/src/osd +${CMAKE_SOURCE_DIR}/src/lib/util +${CMAKE_SOURCE_DIR}/3rdparty +${CMAKE_SOURCE_DIR}/3rdparty/libflac/include +) +set_property(TARGET chdman PROPERTY CXX_STANDARD 17) + +#linking +#target_link_libraries(ocore_sdl PRIVATE SDL2) + +target_link_libraries(chdman PRIVATE utils expat 7z ocore_sdl zlib flac utf8proc +dl rt SDL2 m pthread util) diff --git a/make_files/3rdparty/7z.make b/unused/make_files/3rdparty/7z.make similarity index 100% rename from make_files/3rdparty/7z.make rename to unused/make_files/3rdparty/7z.make diff --git a/make_files/3rdparty/expat.make b/unused/make_files/3rdparty/expat.make similarity index 100% rename from make_files/3rdparty/expat.make rename to unused/make_files/3rdparty/expat.make diff --git a/make_files/3rdparty/flac.make b/unused/make_files/3rdparty/flac.make similarity index 100% rename from make_files/3rdparty/flac.make rename to unused/make_files/3rdparty/flac.make diff --git a/make_files/3rdparty/utf8proc.make b/unused/make_files/3rdparty/utf8proc.make similarity index 100% rename from make_files/3rdparty/utf8proc.make rename to unused/make_files/3rdparty/utf8proc.make diff --git a/make_files/3rdparty/zlib.make b/unused/make_files/3rdparty/zlib.make similarity index 100% rename from make_files/3rdparty/zlib.make rename to unused/make_files/3rdparty/zlib.make diff --git a/make_files/chdman.make b/unused/make_files/chdman.make similarity index 100% rename from make_files/chdman.make rename to unused/make_files/chdman.make diff --git a/make_files/ocore_sdl.make b/unused/make_files/ocore_sdl.make similarity index 100% rename from make_files/ocore_sdl.make rename to unused/make_files/ocore_sdl.make diff --git a/make_files/utils.make b/unused/make_files/utils.make similarity index 100% rename from make_files/utils.make rename to unused/make_files/utils.make diff --git a/output.txt b/unused/output.txt similarity index 100% rename from output.txt rename to unused/output.txt diff --git a/unused/scripts/extlib.lua b/unused/scripts/extlib.lua new file mode 100644 index 0000000..a1fa4f5 --- /dev/null +++ b/unused/scripts/extlib.lua @@ -0,0 +1,128 @@ +-- license:BSD-3-Clause +-- copyright-holders:MAMEdev Team,Jeffrey Clark + +local extlibs = { +-- +-- 3rdparty system 3rdparty +-- lib name: lib name, include dir +-- + asio = { "asio", "3rdparty/asio/include" }, + expat = { "expat", "3rdparty/expat/lib" }, + zlib = { "z", "3rdparty/zlib" }, + jpeg = { "jpeg", "3rdparty/libjpeg" }, + flac = { "FLAC", "3rdparty/libflac/include" }, + sqlite3 = { "sqlite3", "3rdparty/sqlite3" }, + portmidi = { "portmidi", "3rdparty/portmidi/pm_common" }, + portaudio = { "portaudio", "3rdparty/portaudio/include" }, + lua = { "lua", "3rdparty/lua/src" }, + utf8proc = { "utf8proc", "3rdparty/utf8proc" }, + glm = { "glm", "3rdparty/glm" }, + rapidjson = { "rapidjson", "3rdparty/rapidjson/include" }, + pugixml = { "pugixml", "3rdparty/pugixml/src" }, +} + +-- system lib options +newoption { + trigger = 'with-system-asio', + description = 'Use system Asio library', +} + +newoption { + trigger = 'with-system-expat', + description = 'Use system Expat library', +} + +newoption { + trigger = 'with-system-zlib', + description = 'Use system Zlib library', +} + +newoption { + trigger = 'with-system-jpeg', + description = 'Use system JPEG library', +} + +newoption { + trigger = 'with-system-flac', + description = 'Use system FLAC library', +} + +newoption { + trigger = 'with-system-sqlite3', + description = 'Use system SQLite library', +} + +newoption { + trigger = 'with-system-portmidi', + description = 'Use system PortMidi library', +} + +newoption { + trigger = 'with-system-portaudio', + description = 'Use system PortAudio library', +} + +newoption { + trigger = "with-system-lua", + description = "Use system LUA library", +} + +newoption { + trigger = "with-system-utf8proc", + description = "Use system utf8proc library", +} + +newoption { + trigger = "with-system-glm", + description = "Use system glm library", +} + +newoption { + trigger = "with-system-rapidjson", + description = "Use system rapidjson library", +} + +newoption { + trigger = "with-system-pugixml", + description = "Use system pugixml library", +} + +-- build helpers +function ext_lib(lib) + local opt = _OPTIONS["with-system-" .. lib] + if (opt~=nil and opt=="1") then + default = extlibs[lib][1] + else + default = lib + end + return ext_best(lib, default, 1) +end + +function ext_includedir(lib) + local opt = _OPTIONS["with-system-" .. lib] + if (opt==nil or opt=="0") then + -- using bundled, prepend MAME_DIR + default = MAME_DIR .. extlibs[lib][2] + else + default = "" + end + return ext_best(lib, default, 2) +end + +function ext_best(lib, default, idx) + local opt = _OPTIONS["with-system-" .. lib] + local found = default + if (opt~=nil and opt~="0" and opt~="1") then + -- override default if provided (format ) + local x = opt:explode(":") + if x[idx]~=nil then + local y = x[idx]:explode(",") + if y[1]~=nil then + found = y + else + found = x[idx] + end + end + end + return found +end diff --git a/unused/scripts/genie.lua b/unused/scripts/genie.lua new file mode 100644 index 0000000..b2d3d47 --- /dev/null +++ b/unused/scripts/genie.lua @@ -0,0 +1,1469 @@ +-- license:BSD-3-Clause +-- copyright-holders:MAMEdev Team +STANDALONE = false + +-- Big project specific +premake.make.makefile_ignore = true +premake._checkgenerate = false + +newoption { + trigger = 'build-dir', + description = 'Build directory name', +} + +premake.check_paths = true +premake.make.override = { "TARGET" } + +MAME_DIR = (path.getabsolute("..") .. "/") +--MAME_DIR = string.gsub(MAME_DIR, "(%s)", "\\%1") +local MAME_BUILD_DIR = (MAME_DIR .. _OPTIONS["build-dir"] .. "/") +local naclToolchain = "" + +newoption { + trigger = "precompile", + description = "Precompiled headers generation.", + allowed = { + { "0", "Disabled" }, + { "1", "Enabled" }, + } +} + +function backtick(cmd) + result = string.gsub(string.gsub(os.outputof(cmd), "\r?\n$", ""), " $", "") + return result +end + +function str_to_version(str) + local val = 0 + if (str == nil or str == '') then + return val + end + local cnt = 10000 + for word in string.gmatch(str, '([^.]+)') do + if(tonumber(word) == nil) then + return val + end + val = val + tonumber(word) * cnt + cnt = cnt / 100 + end + return val +end + +function findfunction(x) + assert(type(x) == "string") + local f=_G + for v in x:gmatch("[^%.]+") do + if type(f) ~= "table" then + return nil, "looking for '"..v.."' expected table, not "..type(f) + end + f=f[v] + end + if type(f) == "function" then + return f + else + return nil, "expected function, not "..type(f) + end +end + +function layoutbuildtask(_folder, _name) + return { MAME_DIR .. "src/".._folder.."/".. _name ..".lay" , GEN_DIR .. _folder .. "/".._name..".lh", + { MAME_DIR .. "scripts/build/complay.py" }, {"@echo Compressing src/".._folder.."/".._name..".lay...", PYTHON .. " $(1) $(<) $(@) layout_".._name }}; +end + +function precompiledheaders() + if _OPTIONS["precompile"]==nil or (_OPTIONS["precompile"]~=nil and _OPTIONS["precompile"]=="1") then + pchheader("emu.h") + configuration { } + end +end + +function precompiledheaders_novs() + precompiledheaders() + if string.sub(_ACTION,1,4) == "vs20" then + --print("Disabling pch for Visual Studio") + flags { + "NoPCH" + } + end +end + +function addprojectflags() + local version = str_to_version(_OPTIONS["gcc_version"]) + if _OPTIONS["gcc"]~=nil and string.find(_OPTIONS["gcc"], "gcc") then + buildoptions_cpp { + "-Wsuggest-override", + "-flifetime-dse=1", + } + end +end + +function opt_tool(hash, entry) + if _OPTIONS["with-tools"] then + hash[entry] = true + return true + end + return hash[entry] +end + +CPUS = {} +SOUNDS = {} +MACHINES = {} +VIDEOS = {} +BUSES = {} +FORMATS = {} + +newoption { + trigger = "with-tools", + description = "Enable building tools.", +} + +newoption { + trigger = "with-tests", + description = "Enable building tests.", +} + +newoption { + trigger = "with-benchmarks", + description = "Enable building benchmarks.", +} + +newoption { + trigger = "osd", + description = "Choose OSD layer implementation", +} + +newoption { + trigger = "targetos", + description = "Choose target OS", + allowed = { + { "android", "Android" }, + { "asmjs", "Emscripten/asm.js" }, + { "freebsd", "FreeBSD" }, + { "netbsd", "NetBSD" }, + { "openbsd", "OpenBSD" }, + { "linux", "Linux" }, + { "macosx", "OSX" }, + { "windows", "Windows" }, + { "haiku", "Haiku" }, + { "solaris", "Solaris SunOS" }, + }, +} + +newoption { + trigger = 'with-bundled-sdl2', + description = 'Build bundled SDL2 library', +} + +newoption { + trigger = "distro", + description = "Choose distribution", + allowed = { + { "generic", "generic" }, + { "debian-stable", "debian-stable" }, + { "ubuntu-intrepid", "ubuntu-intrepid" }, + }, +} + +newoption { + trigger = "target", + description = "Building target", +} + +newoption { + trigger = "subtarget", + description = "Building subtarget", +} + +newoption { + trigger = "gcc_version", + description = "GCC compiler version", +} + +newoption { + trigger = "CC", + description = "CC replacement", +} + +newoption { + trigger = "CXX", + description = "CXX replacement", +} + +newoption { + trigger = "LD", + description = "LD replacement", +} + +newoption { + trigger = "AR", + description = "AR replacement", +} + +newoption { + trigger = "TOOLCHAIN", + description = "Toolchain prefix" +} + +newoption { + trigger = "PROFILE", + description = "Enable profiling.", +} + +newoption { + trigger = "SYMBOLS", + description = "Enable symbols.", +} + +newoption { + trigger = "SYMLEVEL", + description = "Symbols level.", +} + +newoption { + trigger = "PROFILER", + description = "Include the internal profiler.", +} + +newoption { + trigger = "OPTIMIZE", + description = "Optimization level.", +} + +newoption { + trigger = "ARCHOPTS", + description = "Additional options for target C/C++/Objective-C/Objective-C++ compilers and linker.", +} + +newoption { + trigger = "ARCHOPTS_C", + description = "Additional options for target C++ compiler.", +} + +newoption { + trigger = "ARCHOPTS_CXX", + description = "Additional options for target C++ compiler.", +} + +newoption { + trigger = "ARCHOPTS_OBJC", + description = "Additional options for target Objective-C compiler.", +} + +newoption { + trigger = "ARCHOPTS_OBJCXX", + description = "Additional options for target Objective-C++ compiler.", +} + +newoption { + trigger = "OPT_FLAGS", + description = "OPT_FLAGS.", +} + +newoption { + trigger = "LDOPTS", + description = "Additional linker options", +} + +newoption { + trigger = "MAP", + description = "Generate a link map.", +} + +newoption { + trigger = "NOASM", + description = "Disable implementations based on assembler code", + allowed = { + { "0", "Enable assembler code" }, + { "1", "Disable assembler code" }, + }, +} + +newoption { + trigger = "BIGENDIAN", + description = "Build for big endian target", + allowed = { + { "0", "Little endian target" }, + { "1", "Big endian target" }, + }, +} + +newoption { + trigger = "FORCE_DRC_C_BACKEND", + description = "Force DRC C backend.", +} + +newoption { + trigger = "NOWERROR", + description = "NOWERROR", +} + +newoption { + trigger = "DEPRECATED", + description = "Generate deprecation warnings during compilation.", + allowed = { + { "0", "Disabled" }, + { "1", "Enabled" }, + } +} + +newoption { + trigger = "LTO", + description = "Clang link time optimization.", + allowed = { + { "0", "Disabled" }, + { "1", "Enabled" }, + } +} + +newoption { + trigger = "SSE2", + description = "SSE2 optimized code and SSE2 code generation.", + allowed = { + { "0", "Disabled" }, + { "1", "Enabled" }, + } +} + +newoption { + trigger = "SSE3", + description = "SSE3 optimized code and SSE3 code generation.", + allowed = { + { "0", "Disabled" }, + { "1", "Enabled" }, + } +} + +newoption { + trigger = "OPENMP", + description = "OpenMP optimized code.", + allowed = { + { "0", "Disabled" }, + { "1", "Enabled" }, + } +} + +newoption { + trigger = "SEPARATE_BIN", + description = "Use separate bin folders.", + allowed = { + { "0", "Disabled" }, + { "1", "Enabled" }, + } +} + +newoption { + trigger = "PYTHON_EXECUTABLE", + description = "Python executable.", +} + +newoption { + trigger = "SHADOW_CHECK", + description = "Shadow checks.", + allowed = { + { "0", "Disabled" }, + { "1", "Enabled" }, + } +} + +newoption { + trigger = "STRIP_SYMBOLS", + description = "Symbols stripping.", + allowed = { + { "0", "Disabled" }, + { "1", "Enabled" }, + } +} + + +newoption { + trigger = "SHLIB", + description = "Generate shared libs.", + allowed = { + { "0", "Static libs" }, + { "1", "Shared libs" }, + } +} + +newoption { + trigger = "SOURCES", + description = "List of sources to compile.", +} + +newoption { + trigger = "PLATFORM", + description = "Target machine platform (x86,arm,...)", +} + +newoption { + trigger = "DEBUG_DIR", + description = "Default directory for debugger.", +} + +newoption { + trigger = "DEBUG_ARGS", + description = "Arguments for running debug build.", +} + +newoption { + trigger = "WEBASSEMBLY", + description = "Produce WebAssembly output when building with Emscripten.", +} + +newoption { + trigger = "SANITIZE", + description = "Specifies the santizer(s) to use." +} + +newoption { + trigger = "PROJECT", + description = "Select projects to be built. Will look into project folder for files.", +} + +dofile ("extlib.lua") + +if _OPTIONS["SHLIB"]=="1" then + LIBTYPE = "SharedLib" +else + LIBTYPE = "StaticLib" +end + +PYTHON = "python3" + +if _OPTIONS["PYTHON_EXECUTABLE"]~=nil then + PYTHON = _OPTIONS["PYTHON_EXECUTABLE"] +end + +if not _OPTIONS["BIGENDIAN"] then + _OPTIONS["BIGENDIAN"] = "0" +end + +if _OPTIONS["NOASM"]=="1" and not _OPTIONS["FORCE_DRC_C_BACKEND"] then + _OPTIONS["FORCE_DRC_C_BACKEND"] = "1" +end + +if(_OPTIONS["TOOLCHAIN"] == nil) then + _OPTIONS['TOOLCHAIN'] = "" +end + +GEN_DIR = MAME_BUILD_DIR .. "generated/" + +if (_OPTIONS["target"] == nil) then return false end +if (_OPTIONS["subtarget"] == nil) then return false end + +if (_OPTIONS["target"] == _OPTIONS["subtarget"]) then + solution (_OPTIONS["target"]) +else + if (_OPTIONS["subtarget"]=="mess") then + solution (_OPTIONS["subtarget"]) + else + solution (_OPTIONS["target"] .. _OPTIONS["subtarget"]) + end +end + + +configurations { + "Debug", + "Release", +} + +platforms { + "x32", + "x64", + "Native", -- for targets where bitness is not specified +} + +language "C++" + +flags { + "StaticRuntime", + "Cpp17", +} + +configuration { "vs20*" } + buildoptions { + "/bigobj", + } + buildoptions_cpp { + "/Zc:__cplusplus", + } + flags { + "ExtraWarnings", + } + if not _OPTIONS["NOWERROR"] then + flags{ + "FatalWarnings", + } + end + + +configuration { "Debug", "vs20*" } + flags { + "Symbols", + "NoMultiProcessorCompilation", + } + +configuration { "Release", "vs20*" } + flags { + "Optimize", + "NoEditAndContinue", + "NoIncrementalLink", + } + if _OPTIONS["SYMBOLS"] then + flags { + "Symbols", + } + end + +-- Force Visual Studio targets to use bundled SDL2 +if string.sub(_ACTION,1,4) == "vs20" and _OPTIONS["osd"]=="sdl" then + if _OPTIONS["with-bundled-sdl2"]==nil then + _OPTIONS["with-bundled-sdl2"] = "1" + end +end +-- Build SDL2 for Android +if _OPTIONS["targetos"] == "android" then + _OPTIONS["with-bundled-sdl2"] = "1" +end + +configuration {} + +if _OPTIONS["osd"] == "uwp" then + windowstargetplatformversion("10.0.14393.0") + windowstargetplatformminversion("10.0.14393.0") + premake._filelevelconfig = true +end + +msgcompile ("Compiling $(subst ../,,$<)...") + +msgcompile_objc ("Objective-C compiling $(subst ../,,$<)...") + +msgresource ("Compiling resources $(subst ../,,$<)...") + +msglinking ("Linking $(notdir $@)...") + +msgarchiving ("Archiving $(notdir $@)...") + +msgprecompile ("Precompiling $(subst ../,,$<)...") + +messageskip { "SkipCreatingMessage", "SkipBuildingMessage", "SkipCleaningMessage" } + +if (_OPTIONS["PROJECT"] ~= nil) then + PROJECT_DIR = path.join(path.getabsolute(".."),"projects",_OPTIONS["PROJECT"]) .. "/" + if (not os.isfile(path.join("..", "projects", _OPTIONS["PROJECT"], "scripts", "target", _OPTIONS["target"],_OPTIONS["subtarget"] .. ".lua"))) then + error("File definition for TARGET=" .. _OPTIONS["target"] .. " SUBTARGET=" .. _OPTIONS["subtarget"] .. " does not exist") + end + dofile (path.join(".." ,"projects", _OPTIONS["PROJECT"], "scripts", "target", _OPTIONS["target"],_OPTIONS["subtarget"] .. ".lua")) +end +if (_OPTIONS["SOURCES"] == nil and _OPTIONS["PROJECT"] == nil) then + if (not os.isfile(path.join("target", _OPTIONS["target"],_OPTIONS["subtarget"] .. ".lua"))) then + error("File definition for TARGET=" .. _OPTIONS["target"] .. " SUBTARGET=" .. _OPTIONS["subtarget"] .. " does not exist") + end + dofile (path.join("target", _OPTIONS["target"],_OPTIONS["subtarget"] .. ".lua")) +end + +configuration { "gmake or ninja" } + flags { + "SingleOutputDir", + } + +dofile ("toolchain.lua") + +if _OPTIONS["targetos"]=="windows" then + configuration { "x64" } + defines { + "X64_WINDOWS_ABI", + } + configuration { } +end + +-- Avoid error when invoking genie --help. +if (_ACTION == nil) then return false end + +-- define PTR64 if we are a 64-bit target +configuration { "x64 or android-*64"} + defines { "PTR64=1" } + +-- define MAME_DEBUG if we are a debugging build +configuration { "Debug" } + defines { + "MAME_DEBUG", + "MAME_PROFILER", +-- "BGFX_CONFIG_DEBUG=1", + } + +configuration { } + +if _OPTIONS["PROFILER"]=="1" then + defines{ + "MAME_PROFILER", -- define MAME_PROFILER if we are a profiling build + } +end + +configuration { "Release" } + defines { + "NDEBUG", + } + +configuration { } + +-- CR/LF setup: use on win32, CR only on everything else +if _OPTIONS["targetos"]=="windows" then + defines { + "CRLF=3", + } +else + defines { + "CRLF=2", + } +end + + +if _OPTIONS["BIGENDIAN"]=="1" then + if _OPTIONS["targetos"]=="macosx" then + defines { + "OSX_PPC", + } + buildoptions { + "-Wno-unused-label", + "-flax-vector-conversions", + } + if _OPTIONS["SYMBOLS"] then + buildoptions { + "-mlong-branch", + } + end + configuration { "x64" } + buildoptions { + "-arch ppc64", + } + linkoptions { + "-arch ppc64", + } + configuration { "x32" } + buildoptions { + "-arch ppc", + } + linkoptions { + "-arch ppc", + } + configuration { } + end +else + defines { + "LSB_FIRST", + } + if _OPTIONS["targetos"]=="macosx" then + configuration { "arm64" } + buildoptions { + "-arch arm64", + } + linkoptions { + "-arch arm64", + } + configuration { "x64", "not arm64" } + buildoptions { + "-arch x86_64", + } + linkoptions { + "-arch x86_64", + } + configuration { "x32", "not arm64" } + buildoptions { + "-arch i386", + } + linkoptions { + "-arch i386", + } + configuration { } + end +end + +if _OPTIONS["with-system-jpeg"]~=nil then + defines { + "XMD_H", + } +end + +if not _OPTIONS["with-system-flac"]~=nil then + defines { + "FLAC__NO_DLL", + } +end + +if not _OPTIONS["with-system-pugixml"] then + defines { + "PUGIXML_HEADER_ONLY", + } +else + links { + ext_lib("pugixml"), + } +end + +if _OPTIONS["NOASM"]=="1" then + defines { + "MAME_NOASM" + } +end + +if not _OPTIONS["FORCE_DRC_C_BACKEND"] then + if _OPTIONS["BIGENDIAN"]~="1" then + configuration { "x64" } + defines { + "NATIVE_DRC=drcbe_x64", + } + configuration { "x32" } + defines { + "NATIVE_DRC=drcbe_x86", + } + configuration { } + end +end + + defines { + "LUA_COMPAT_ALL", + "LUA_COMPAT_5_1", + "LUA_COMPAT_5_2", + } + + if _ACTION == "gmake" or _ACTION == "ninja" then + + --we compile C-only to C99 standard with GNU extensions + + buildoptions_c { + "-std=gnu99", + } + +local version = str_to_version(_OPTIONS["gcc_version"]) + buildoptions_cpp { + "-std=c++17", + } + + buildoptions_objcpp { + "-std=c++17", + } +-- this speeds it up a bit by piping between the preprocessor/compiler/assembler + buildoptions { + "-pipe", + } +-- add -g if we need symbols, and ensure we have frame pointers +if _OPTIONS["SYMBOLS"]~=nil and _OPTIONS["SYMBOLS"]~="0" then + buildoptions { + "-g" .. _OPTIONS["SYMLEVEL"], + "-fno-omit-frame-pointer", + "-fno-optimize-sibling-calls", + } +end + +--# we need to disable some additional implicit optimizations for profiling +if _OPTIONS["PROFILE"] then + buildoptions { + "-mno-omit-leaf-frame-pointer", + } +end +-- add -v if we need verbose build information +if _OPTIONS["VERBOSE"] then + buildoptions { + "-v", + } +end + +-- only show shadow warnings when enabled +if (_OPTIONS["SHADOW_CHECK"]=="1") then + buildoptions { + "-Wshadow" + } +end + +-- only show deprecation warnings when enabled +if _OPTIONS["DEPRECATED"]=="0" then + buildoptions { + "-Wno-deprecated-declarations" + } +end + +-- add profiling information for the compiler +if _OPTIONS["PROFILE"] then + buildoptions { + "-pg", + } + linkoptions { + "-pg", + } +end + +if _OPTIONS["SYMBOLS"]~=nil and _OPTIONS["SYMBOLS"]~="0" then + flags { + "Symbols", + } +end + +-- add the error warning flag +if _OPTIONS["NOWERROR"]==nil then + buildoptions { + "-Werror", + } +end + +-- if we are optimizing, include optimization options +if _OPTIONS["OPTIMIZE"] then + buildoptions { + "-O".. _OPTIONS["OPTIMIZE"], + "-fno-strict-aliasing" + } + if _OPTIONS["OPT_FLAGS"] then + buildoptions { + _OPTIONS["OPT_FLAGS"] + } + end + if _OPTIONS["LTO"]=="1" then + buildoptions { +-- windows native mingw GCC 5.2 fails with -flto=x with x > 1. bug unfixed as of this commit + "-flto=1", +-- if ld fails, just buy more RAM or uncomment this! +-- "-Wl,-no-keep-memory", + "-Wl,-v", +-- silence redefine warnings from discrete.c. + "-Wl,-allow-multiple-definition", + "-fuse-linker-plugin", +-- these next flags allow MAME to compile in GCC 5.2. odr warnings should be fixed as LTO randomly crashes otherwise +-- some GCC 4.9.x on Windows do not have -Wodr and -flto-odr-type-merging enabled. adjust accordingly... +-- no-fat-lto-objects is faster to compile and uses less memory, but you can't mix with a non-lto .o/.a without rebuilding + "-fno-fat-lto-objects", + "-flto-odr-type-merging", + "-Wodr", + "-flto-compression-level=0", -- lto doesn't work with anything <9 on linux with < 12G RAM, much slower if <> 0 +-- "-flto-report", -- if you get an error in lto after [WPA] stage, but before [LTRANS] stage, you need more memory! +-- "-fmem-report-wpa","-fmem-report","-fpre-ipa-mem-report","-fpost-ipa-mem-report","-flto-report-wpa","-fmem-report", +-- this six flag combo lets MAME compile with LTO=1 on linux with no errors and ~2% speed boost, but compile time is much longer +-- if you are going to wait on lto, you might as well enable these for GCC +-- "-fdevirtualize-at-ltrans","-fgcse-sm","-fgcse-las", +-- "-fipa-pta","-fipa-icf","-fvariable-expansion-in-unroller", + } +-- same flags are needed by linker + linkoptions { + "-flto=1", +-- "-Wl,-no-keep-memory", + "-Wl,-v", + "-Wl,-allow-multiple-definition", + "-fuse-linker-plugin", + "-fno-fat-lto-objects", + "-flto-odr-type-merging", + "-Wodr", + "-flto-compression-level=0", -- lto doesn't work with anything <9 on linux with < 12G RAM, much slower if <> 0 +-- "-flto-report", -- if you get an error in lto after [WPA] stage, but before [LTRANS] stage, you need more memory! +-- "-fmem-report-wpa","-fmem-report","-fpre-ipa-mem-report","-fpost-ipa-mem-report","-flto-report-wpa","-fmem-report", +-- this six flag combo lets MAME compile with LTO=1 on linux with no errors and ~2% speed boost, but compile time is much longer +-- if you are going to wait on lto, you might as well enable these for GCC +-- "-fdevirtualize-at-ltrans","-fgcse-sm","-fgcse-las", +-- "-fipa-pta","-fipa-icf","-fvariable-expansion-in-unroller", + + } + + end +end + +configuration { "mingw-clang" } + buildoptions { + "-Xclang -flto-visibility-public-std", -- workround for __imp___ link errors + "-Wno-nonportable-include-path", -- workround for clang 9.0.0 case sensitivity bug when including GL/glext.h + } +configuration { } + +if _OPTIONS["ARCHOPTS"] then + buildoptions { + _OPTIONS["ARCHOPTS"] + } + linkoptions { + _OPTIONS["ARCHOPTS"] + } +end + +if _OPTIONS["ARCHOPTS_C"] then + buildoptions_c { + _OPTIONS["ARCHOPTS_C"] + } +end + +if _OPTIONS["ARCHOPTS_CXX"] then + buildoptions_cpp { + _OPTIONS["ARCHOPTS_CXX"] + } +end + +if _OPTIONS["ARCHOPTS_OBJC"] then + buildoptions_objc { + _OPTIONS["ARCHOPTS_OBJC"] + } +end + +if _OPTIONS["ARCHOPTS_OBJCXX"] then + buildoptions_objcpp { + _OPTIONS["ARCHOPTS_OBJCXX"] + } +end + +if _OPTIONS["SHLIB"] then + buildoptions { + "-fPIC" + } +end + +if _OPTIONS["SSE2"]=="1" then + buildoptions { + "-msse", + "-msse2" + } +end + +if _OPTIONS["SSE3"]=="1" then + buildoptions { + "-msse", + "-msse2", + "-msse3" + } +end + + +if _OPTIONS["OPENMP"]=="1" then + buildoptions { + "-fopenmp", + } + linkoptions { + "-fopenmp" + } + defines { + "USE_OPENMP=1", + } + +else + buildoptions { + "-Wno-unknown-pragmas", + } +end + +if _OPTIONS["LDOPTS"] then + linkoptions { + _OPTIONS["LDOPTS"] + } +end + +if _OPTIONS["MAP"] then + if (_OPTIONS["target"] == _OPTIONS["subtarget"]) then + linkoptions { + "-Wl,-Map," .. "../../../../" .. _OPTIONS["target"] .. ".map" + } + else + linkoptions { + "-Wl,-Map," .. "../../../../" .. _OPTIONS["target"] .. _OPTIONS["subtarget"] .. ".map" + } + + end +end + + +-- add a basic set of warnings + buildoptions { + "-Wall", + "-Wcast-align", + "-Wformat-security", + "-Wundef", + "-Wwrite-strings", + "-Wno-conversion", + "-Wno-sign-compare", + "-Wno-error=deprecated-declarations", + } +-- warnings only applicable to C compiles + buildoptions_c { + "-Wpointer-arith", + "-Wstrict-prototypes", + } + +if _OPTIONS["targetos"]~="freebsd" then + buildoptions_c { + "-Wbad-function-cast", + } +end + +-- warnings only applicable to OBJ-C compiles + buildoptions_objcpp { + "-Wpointer-arith", + } + +-- warnings only applicable to C++ compiles + buildoptions_cpp { + "-Woverloaded-virtual", + } + +if _OPTIONS["SANITIZE"] then + buildoptions { + "-fsanitize=".. _OPTIONS["SANITIZE"] + } + linkoptions { + "-fsanitize=".. _OPTIONS["SANITIZE"] + } + if string.find(_OPTIONS["SANITIZE"], "address") then + buildoptions { + "-fsanitize-address-use-after-scope" + } + linkoptions { + "-fsanitize-address-use-after-scope" + } + end + if string.find(_OPTIONS["SANITIZE"], "undefined") then + -- 'function' produces errors without delegates by design + -- 'alignment' produces a lot of errors which we are not interested in + buildoptions { + "-fno-sanitize=function", + "-fno-sanitize=alignment" + } + linkoptions { + "-fno-sanitize=function", + "-fno-sanitize=alignment" + } + end +end + +--ifneq (,$(findstring thread,$(SANITIZE))) +--CCOMFLAGS += -fPIE +--endif + + + + local version = str_to_version(_OPTIONS["gcc_version"]) + if string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "asmjs") or string.find(_OPTIONS["gcc"], "android") then + if (version < 60000) then + print("Clang version 6.0 or later needed") + os.exit(-1) + end + buildoptions { + "-fdiagnostics-show-note-include-stack", + "-Wno-cast-align", + "-Wno-constant-logical-operand", + "-Wno-extern-c-compat", + "-Wno-ignored-qualifiers", + "-Wno-pragma-pack", -- clang 6.0 complains when the packing change lifetime is not contained within a header file. + "-Wno-tautological-compare", + "-Wno-unknown-attributes", + "-Wno-unknown-warning-option", + "-Wno-unused-value", + "-Wno-unused-const-variable", + } + if (version < 70000) or ((version < 100001) and (_OPTIONS["targetos"] == 'macosx')) then + buildoptions { -- clang 6.0 complains that [[maybe_unused]] is ignored for static data members + "-Wno-error=ignored-attributes", + "-Wno-error=unused-const-variable", + } + end + if ((version >= 100000) and (_OPTIONS["targetos"] ~= 'macosx')) or (version >= 120000) then + buildoptions { + "-Wno-xor-used-as-pow", -- clang 10.0 complains that expressions like 10 ^ 7 look like exponention + } + end + else + if (version < 70000) then + print("GCC version 7.0 or later needed") + os.exit(-1) + end + buildoptions_cpp { + "-Wimplicit-fallthrough", + } + buildoptions_objcpp { + "-Wimplicit-fallthrough", + } + buildoptions { + "-Wno-unused-result", -- needed for fgets,fread on linux + -- array bounds checking seems to be buggy in 4.8.1 (try it on video/stvvdp1.c and video/model1.c without -Wno-array-bounds) + "-Wno-array-bounds", + "-Wno-error=attributes", -- GCC fails to recognize some uses of [[maybe_unused]] + } + if (version >= 80000) then + buildoptions { + "-Wno-format-overflow", -- try machine/bfm_sc45_helper.cpp in GCC 8.0.1, among others + "-Wno-stringop-truncation", -- ImGui again + "-Wno-stringop-overflow", -- formats/victor9k_dsk.cpp bugs the compiler + } + buildoptions_cpp { + "-Wno-class-memaccess", -- many instances in ImGui and BGFX + } + end + if (version >= 100000) then + buildoptions { + "-Wno-return-local-addr", -- sqlite3.c in GCC 10 + } + end + if (version >= 110000) then + buildoptions { + "-Wno-nonnull", -- luaengine.cpp lambdas do not need "this" captured but GCC 11.1 erroneously insists + "-Wno-stringop-overread", -- machine/bbc.cpp in GCC 11.1 + "-Wno-misleading-indentation", -- sqlite3.c in GCC 11.1 + "-Wno-maybe-uninitialized" -- expat in GCC 11.1 + } + end + end + end + +if (_OPTIONS["PLATFORM"]=="alpha") then + defines { + "PTR64=1", + } +end + +if (_OPTIONS["PLATFORM"]=="arm") then + buildoptions { + "-Wno-cast-align", + } +end + +if (_OPTIONS["PLATFORM"]=="arm64") then + buildoptions { + "-Wno-cast-align", + } + defines { + "PTR64=1", + } +end + +if (_OPTIONS["PLATFORM"]=="riscv64") then + defines { + "PTR64=1", + } +end + +if (_OPTIONS["PLATFORM"]=="mips64") then + defines { + "PTR64=1", + } +end + +local subdir +if (_OPTIONS["target"] == _OPTIONS["subtarget"]) then + subdir = _OPTIONS["osd"] .. "/" .. _OPTIONS["target"] +else + subdir = _OPTIONS["osd"] .. "/" .. _OPTIONS["target"] .. _OPTIONS["subtarget"] +end + +if not toolchain(MAME_BUILD_DIR, subdir) then + return -- no action specified +end + +configuration { "asmjs" } + buildoptions { + "-std=gnu89", + "-Wno-implicit-function-declaration", + "-s USE_SDL_TTF=2", + } + buildoptions_cpp { + "-std=c++17", + "-s DISABLE_EXCEPTION_CATCHING=2", + "-s EXCEPTION_CATCHING_WHITELIST=\"['_ZN15running_machine17start_all_devicesEv','_ZN12cli_frontend7executeEiPPc','_ZN8chd_file11open_commonEb','_ZN8chd_file13read_metadataEjjRNSt3__212basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE','_ZN8chd_file13read_metadataEjjRNSt3__26vectorIhNS0_9allocatorIhEEEE','_ZNK19netlist_mame_device19base_validity_checkER16validity_checker']\"", + } + linkoptions { + "-Wl,--start-group", + "-r", + } + archivesplit_size "20" + +configuration { "android*" } + buildoptions { + "-Wno-undef", + "-Wno-typedef-redefinition", + "-Wno-unknown-warning-option", + "-Wno-incompatible-ms-struct", + } + buildoptions_cpp { + "-std=c++17", + "-Wno-extern-c-compat", + "-Wno-tautological-constant-out-of-range-compare", + "-Wno-tautological-pointer-compare", + } + archivesplit_size "20" + +configuration { "android-arm64" } + buildoptions { + "-Wno-asm-operand-widths", + } + +configuration { "linux-*"} + links { + "dl", + "rt", + } + if _OPTIONS["distro"]=="debian-stable" then + defines + { + "NO_AFFINITY_NP", + } + end + + + +configuration { "osx*" } + links { + "pthread", + } + +configuration { "mingw*" } + if _OPTIONS["osd"]=="sdl" then + linkoptions { + "-Wl,--start-group", + } + else + linkoptions { + "-static", + } + flags { + "LinkSupportCircularDependencies", + } + end + links { + "user32", + "winmm", + "advapi32", + "shlwapi", + "wsock32", + "ws2_32", + "psapi", + "iphlpapi", + "shell32", + "userenv", + } + +configuration { "vs20*" } + defines { + "XML_STATIC", + "WIN32", + "_WIN32", + "_CRT_NONSTDC_NO_DEPRECATE", + "_CRT_SECURE_NO_DEPRECATE", + "_CRT_STDIO_LEGACY_WIDE_SPECIFIERS", + } + + links { + "user32", + "winmm", + "advapi32", + "shlwapi", + "wsock32", + "ws2_32", + "psapi", + "iphlpapi", + "shell32", + "userenv", + } + + buildoptions { + "/WX", -- Treats all compiler warnings as errors. + "/w45038", -- warning C5038: data member 'member1' will be initialized after data member 'member2' + } + + buildoptions { + "/wd4003", -- warning C4003: not enough actual parameters for macro 'xxx' + "/wd4005", -- warning C4005: The macro identifier is defined twice. The compiler uses the second macro definition + "/wd4018", -- warning C4018: 'x' : signed/unsigned mismatch + "/wd4060", -- warning C4060: switch statement contains no 'case' or 'default' labels + "/wd4065", -- warning C4065: switch statement contains 'default' but no 'case' labels + "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter + "/wd4127", -- warning C4127: conditional expression is constant + "/wd4146", -- warning C4146: unary minus operator applied to unsigned type, result still unsigned + "/wd4201", -- warning C4201: nonstandard extension used : nameless struct/union + "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data + "/wd4245", -- warning C4245: 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch + "/wd4250", -- warning C4250: 'xxx' : inherits 'xxx' via dominance + "/wd4267", -- warning C4267: 'var' : conversion from 'size_t' to 'type', possible loss of data + "/wd4310", -- warning C4310: cast truncates constant value + "/wd4319", -- warning C4319: 'operator' : zero extending 'type' to 'type' of greater size + "/wd4324", -- warning C4324: 'xxx' : structure was padded due to __declspec(align()) + "/wd4334", -- warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) + "/wd4389", -- warning C4389: 'operator' : signed/unsigned mismatch + "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration + "/wd4457", -- warning C4457: declaration of 'xxx' hides function parameter + "/wd4458", -- warning C4458: declaration of 'xxx' hides class member + "/wd4459", -- warning C4459: declaration of 'xxx' hides global declaration + "/wd4611", -- warning C4611: interaction between '_setjmp' and C++ object destruction is non-portable + "/wd4702", -- warning C4702: unreachable code + "/wd4706", -- warning C4706: assignment within conditional expression + "/wd4804", -- warning C4804: '>>': unsafe use of type 'bool' in operation + "/wd4805", -- warning C4805: 'x' : unsafe mix of type 'xxx' and type 'xxx' in operation + "/wd4996", -- warning C4996: 'function': was declared deprecated + } + +if _OPTIONS["vs"]=="intel-15" then + buildoptions { + "/Qwd9", -- remark #9: nested comment is not allowed + "/Qwd82", -- remark #82: storage class is not first + "/Qwd111", -- remark #111: statement is unreachable + "/Qwd128", -- remark #128: loop is not reachable + "/Qwd177", -- remark #177: function "xxx" was declared but never referenced + "/Qwd181", -- remark #181: argument of type "UINT32={unsigned int}" is incompatible with format "%d", expecting argument of type "int" + "/Qwd185", -- remark #185: dynamic initialization in unreachable code + "/Qwd280", -- remark #280: selector expression is constant + "/Qwd344", -- remark #344: typedef name has already been declared (with same type) + "/Qwd411", -- remark #411: class "xxx" defines no constructor to initialize the following + "/Qwd869", -- remark #869: parameter "xxx" was never referenced + "/Qwd2545", -- remark #2545: empty dependent statement in "else" clause of if - statement + "/Qwd2553", -- remark #2553: nonstandard second parameter "TCHAR={WCHAR = { __wchar_t } } **" of "main", expected "char *[]" or "char **" extern "C" int _tmain(int argc, TCHAR **argv) + "/Qwd2557", -- remark #2557: comparison between signed and unsigned operands + "/Qwd3280", -- remark #3280: declaration hides member "attotime::seconds" (declared at line 126) static attotime from_seconds(INT32 seconds) { return attotime(seconds, 0); } + + "/Qwd170", -- error #170: pointer points outside of underlying object + "/Qwd188", -- error #188: enumerated type mixed with another type + + "/Qwd63", -- warning #63: shift count is too large + "/Qwd177", -- warning #177: label "xxx" was declared but never referenced + "/Qwd186", -- warning #186: pointless comparison of unsigned integer with zero + "/Qwd488", -- warning #488: template parameter "_FunctionClass" is not used in declaring the parameter types of function template "device_delegate<_Signature>::device_delegate<_FunctionClass>(delegate<_Signature>: + "/Qwd1478", -- warning #1478: function "xxx" (declared at line yyy of "zzz") was declared deprecated + "/Qwd1879", -- warning #1879: unimplemented pragma ignored + "/Qwd3291", -- warning #3291: invalid narrowing conversion from "double" to "int" + "/Qwd1195", -- error #1195: conversion from integer to smaller pointer + "/Qwd47", -- error #47: incompatible redefinition of macro "xxx" + "/Qwd265", -- error #265: floating-point operation result is out of range + -- these occur on a release build, while we can increase the size limits instead some of the files do require extreme amounts + "/Qwd11074", -- remark #11074: Inlining inhibited by limit max-size / remark #11074: Inlining inhibited by limit max-total-size + "/Qwd11075", -- remark #11075: To get full report use -Qopt-report:4 -Qopt-report-phase ipo + } +end + +if _OPTIONS["vs"]=="clangcl" then + buildoptions { + "-Wno-enum-conversion", + "-Wno-ignored-qualifiers", + "-Wno-missing-braces", + "-Wno-missing-field-initializers", + "-Wno-new-returns-null", + "-Wno-nonportable-include-path", + "-Wno-pointer-bool-conversion", + "-Wno-pragma-pack", + "-Wno-switch", + "-Wno-tautological-constant-out-of-range-compare", + "-Wno-tautological-pointer-compare", + "-Wno-unknown-warning-option", + "-Wno-unused-const-variable", + "-Wno-unused-function", + "-Wno-unused-label", + "-Wno-unused-local-typedef", + "-Wno-unused-private-field", + "-Wno-unused-variable", + "-Wno-xor-used-as-pow", + "-Wno-microsoft-cast", + } +end + + linkoptions { + "/ignore:4221", -- LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library + } + includedirs { + MAME_DIR .. "3rdparty/dxsdk/Include" + } + +configuration { } + +if (_OPTIONS["SOURCES"] ~= nil) then + local str = _OPTIONS["SOURCES"] + local sourceargs = "" + for word in string.gmatch(str, '([^,]+)') do + if (not os.isfile(path.join(MAME_DIR, word))) then + print("File " .. word.. " does not exist") + os.exit() + end + sourceargs = sourceargs .. " " .. word + end + OUT_STR = os.outputof( PYTHON .. " " .. MAME_DIR .. "scripts/build/makedep.py sourcesproject -r " .. MAME_DIR .. " -t " .. _OPTIONS["subtarget"] .. sourceargs ) + load(OUT_STR)() + os.outputof( PYTHON .. " " .. MAME_DIR .. "scripts/build/makedep.py sourcesfilter" .. sourceargs .. " > ".. GEN_DIR .. _OPTIONS["target"] .. "/" .. _OPTIONS["subtarget"] .. ".flt" ) +end + +group "libs" + +if (not os.isfile(path.join("src", "osd", _OPTIONS["osd"] .. ".lua"))) then + error("Unsupported value '" .. _OPTIONS["osd"] .. "' for OSD") +end +dofile(path.join("src", "osd", _OPTIONS["osd"] .. ".lua")) +dofile(path.join("src", "lib.lua")) +if opt_tool(MACHINES, "NETLIST") then + dofile(path.join("src", "netlist.lua")) +end +--if (STANDALONE~=true) then +dofile(path.join("src", "formats.lua")) +formatsProject(_OPTIONS["target"],_OPTIONS["subtarget"]) +--end + +group "3rdparty" +dofile(path.join("src", "3rdparty.lua")) + + +group "core" + +dofile(path.join("src", "emu.lua")) + +if (STANDALONE~=true) then + dofile(path.join("src", "mame", "frontend.lua")) +end + +group "devices" +dofile(path.join("src", "devices.lua")) +devicesProject(_OPTIONS["target"],_OPTIONS["subtarget"]) + +if (STANDALONE~=true) then + group "drivers" + findfunction("createProjects_" .. _OPTIONS["target"] .. "_" .. _OPTIONS["subtarget"])(_OPTIONS["target"], _OPTIONS["subtarget"]) +end + +group "emulator" +dofile(path.join("src", "main.lua")) +if (_OPTIONS["SOURCES"] == nil) then + if (_OPTIONS["target"] == _OPTIONS["subtarget"]) then + startproject (_OPTIONS["target"]) + else + if (_OPTIONS["subtarget"]=="mess") then + startproject (_OPTIONS["subtarget"]) + else + startproject (_OPTIONS["target"] .. _OPTIONS["subtarget"]) + end + end +else + startproject (_OPTIONS["subtarget"]) +end +mainProject(_OPTIONS["target"],_OPTIONS["subtarget"]) +strip() + +if _OPTIONS["with-tools"] then + group "tools" + dofile(path.join("src", "tools.lua")) +end + +if _OPTIONS["with-tests"] then + group "tests" + dofile(path.join("src", "tests.lua")) +end + +if _OPTIONS["with-benchmarks"] then + group "benchmarks" + dofile(path.join("src", "benchmarks.lua")) +end + +function generate_has_header(hashname, hash) + fname = GEN_DIR .. "has_" .. hashname:lower() .. ".h" + file = io.open(fname, "w") + file:write("// Generated file, edition is futile\n") + file:write("\n") + file:write(string.format("#ifndef GENERATED_HAS_%s_H\n", hashname)) + file:write(string.format("#define GENERATED_HAS_%s_H\n", hashname)) + file:write("\n") + for k, v in pairs(hash) do + if v then + file:write(string.format("#define HAS_%s_%s\n", hashname, k)) + end + end + file:write("\n") + file:write("#endif\n") + file:close() +end + +generate_has_header("CPUS", CPUS) +generate_has_header("SOUNDS", SOUNDS) +generate_has_header("MACHINES", MACHINES) +generate_has_header("VIDEOS", VIDEOS) +generate_has_header("BUSES", BUSES) +generate_has_header("FORMATS", FORMATS) diff --git a/unused/scripts/src/3rdparty.lua b/unused/scripts/src/3rdparty.lua new file mode 100644 index 0000000..899a78e --- /dev/null +++ b/unused/scripts/src/3rdparty.lua @@ -0,0 +1,2348 @@ +-- license:BSD-3-Clause +-- copyright-holders:MAMEdev Team + +--------------------------------------------------------------------------- +-- +-- 3rdparty.lua +-- +-- Library objects for all 3rdparty sources +-- +--------------------------------------------------------------------------- + +-------------------------------------------------- +-- expat library objects +-------------------------------------------------- + +if not _OPTIONS["with-system-expat"] then +project "expat" + uuid "f4cd40b1-c37c-452d-9785-640f26f0bf54" + kind "StaticLib" + + -- fake out the enough of expat_config.h to get by + -- could possibly add more defines here for specific targets + defines { + "HAVE_MEMMOVE", + "HAVE_STDINT_H", + "HAVE_STDLIB_H", + "HAVE_STRING_H", + "PACKAGE=\"expat\"", + "PACKAGE_BUGREPORT=\"expat-bugs@libexpat.org\"", + "PACKAGE_NAME=\"expat\"", + "PACKAGE_STRING=\"expat 2.2.10\"", + "PACKAGE_TARNAME=\"expat\"", + "PACKAGE_URL=\"\"", + "PACKAGE_VERSION=\"2.2.10\"", + "STDC_HEADERS", + "VERSION=\"2.2.10\"", + "XML_CONTEXT_BYTES=1024", + "XML_DTD", + "XML_NS", + } +if _OPTIONS["BIGENDIAN"]=="1" then + defines { + "BYTEORDER=4321", + "WORDS_BIGENDIAN", + } +else + defines { + "BYTEORDER=1234", + } +end +if _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="freebsd" then + defines { + "HAVE_ARC4RANDOM", + } +end +if BASE_TARGETOS=="unix" then + defines { + "HAVE_DLFCN_H", + "HAVE_FCNTL_H", + "HAVE_MMAP", + "HAVE_SYS_STAT_H", + "HAVE_SYS_TYPES_H", + "HAVE_UNISTD_H", + "XML_DEV_URANDOM", + } +end + + configuration { "vs*" } + buildoptions { + "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter + "/wd4127", -- warning C4127: conditional expression is constant + "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data + "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration + } +if _OPTIONS["vs"]=="intel-15" then + buildoptions { + "/Qwd111", -- remark #111: statement is unreachable + "/Qwd1879", -- warning #1879: unimplemented pragma ignored + "/Qwd2557", -- remark #2557: comparison between signed and unsigned operands + "/Qwd869", -- remark #869: parameter "xxx" was never referenced + } +end + configuration { } + + files { + MAME_DIR .. "3rdparty/expat/lib/xmlparse.c", + MAME_DIR .. "3rdparty/expat/lib/xmlrole.c", + MAME_DIR .. "3rdparty/expat/lib/xmltok.c", + } +else +links { + ext_lib("expat"), +} +end + + +-------------------------------------------------- +-- zlib library objects +-------------------------------------------------- + +if not _OPTIONS["with-system-zlib"] then +project "zlib" + uuid "3d78bd2a-2bd0-4449-8087-42ddfaef7ec9" + kind "StaticLib" + + local version = str_to_version(_OPTIONS["gcc_version"]) + if _OPTIONS["gcc"]~=nil and ((string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "asmjs") or string.find(_OPTIONS["gcc"], "android"))) then + configuration { "gmake or ninja" } + if (version >= 30700) then + buildoptions { + "-Wno-shift-negative-value", + } + end + end + + configuration { "vs*" } + buildoptions { + "/wd4131", -- warning C4131: 'xxx' : uses old-style declarator + "/wd4127", -- warning C4127: conditional expression is constant + "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data + } +if _OPTIONS["vs"]=="intel-15" then + buildoptions { + "/Qwd111", -- remark #111: statement is unreachable + "/Qwd280", -- remark #280: selector expression is constant + } +end + configuration "Debug" + defines { + "verbose=-1", + } + + configuration { "gmake or ninja" } + buildoptions_c { + "-Wno-strict-prototypes", + } + + configuration { } + defines { + "ZLIB_CONST", + } + + files { + MAME_DIR .. "3rdparty/zlib/adler32.c", + MAME_DIR .. "3rdparty/zlib/compress.c", + MAME_DIR .. "3rdparty/zlib/crc32.c", + MAME_DIR .. "3rdparty/zlib/deflate.c", + MAME_DIR .. "3rdparty/zlib/inffast.c", + MAME_DIR .. "3rdparty/zlib/inflate.c", + MAME_DIR .. "3rdparty/zlib/infback.c", + MAME_DIR .. "3rdparty/zlib/inftrees.c", + MAME_DIR .. "3rdparty/zlib/trees.c", + MAME_DIR .. "3rdparty/zlib/uncompr.c", + MAME_DIR .. "3rdparty/zlib/zutil.c", + } +else +links { + ext_lib("zlib"), +} +end + + +-------------------------------------------------- +-- SoftFloat library objects +-------------------------------------------------- + +project "softfloat" + uuid "04fbf89e-4761-4cf2-8a12-64500cf0c5c5" + kind "StaticLib" + + options { + "ForceCPP", + } + + includedirs { + MAME_DIR .. "src/osd", + } + + configuration { "gmake or ninja" } + buildoptions_cpp { + "-x c++", + } + + configuration { "vs*" } + buildoptions { + "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data + "/wd4146", -- warning C4146: unary minus operator applied to unsigned type, result still unsigned + "/wd4018", -- warning C4018: 'x' : signed/unsigned mismatch + } +if _OPTIONS["vs"]=="intel-15" then + buildoptions { + "/Qwd2557", -- remark #2557: comparison between signed and unsigned operands + } +end + configuration { } + + files { + MAME_DIR .. "3rdparty/softfloat/softfloat.c", + MAME_DIR .. "3rdparty/softfloat/fsincos.c", + MAME_DIR .. "3rdparty/softfloat/fpatan.c", + MAME_DIR .. "3rdparty/softfloat/fyl2x.c", + } + + +-------------------------------------------------- +-- SoftFloat 3 library objects +-------------------------------------------------- + +project "softfloat3" +uuid "9c22fc90-53fd-11e8-b566-0800200c9a66" +kind "StaticLib" + +options { + "ForceCPP", +} + +includedirs { + MAME_DIR .. "src/osd", + MAME_DIR .. "3rdparty/softfloat3/build/MAME", + MAME_DIR .. "3rdparty/softfloat3/source", + MAME_DIR .. "3rdparty/softfloat3/source/include", + MAME_DIR .. "3rdparty/softfloat3/source/8086", +} + +configuration { "gmake or ninja" } +buildoptions_cpp { + "-x c++", +} +if _OPTIONS["gcc"]~=nil and not string.find(_OPTIONS["gcc"], "clang") then + buildoptions_cpp { + "-Wno-error=implicit-fallthrough", + } +end + +configuration { "vs*" } +buildoptions { + "/wd4701", -- warning C4701: potentially uninitialized local variable 'xxx' used + "/wd4703", -- warning C4703: potentially uninitialized local pointer variable 'xxx' used +} + +configuration { } +defines { + "SOFTFLOAT_ROUND_ODD", + "INLINE_LEVEL=5", + "SOFTFLOAT_FAST_DIV32TO16", + "SOFTFLOAT_FAST_DIV64TO32", + "SOFTFLOAT_FAST_INT64" +} + +files { + MAME_DIR .. "3rdparty/softfloat3/source/s_eq128.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_le128.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_lt128.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_shortShiftLeft128.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_shortShiftRight128.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_shortShiftRightJam64.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_shortShiftRightJam64Extra.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_shortShiftRightJam128.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_shortShiftRightJam128Extra.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_shiftRightJam32.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_shiftRightJam64.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_shiftRightJam64Extra.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_shiftRightJam128.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_shiftRightJam128Extra.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_shiftRightJam256M.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_countLeadingZeros8.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_countLeadingZeros16.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_countLeadingZeros32.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_countLeadingZeros64.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_add128.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_add256M.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_sub128.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_sub256M.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_mul64ByShifted32To128.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_mul64To128.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_mul128By32.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_mul128To256M.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_approxRecip_1Ks.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_approxRecip32_1.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_approxRecipSqrt_1Ks.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_approxRecipSqrt32_1.c", + MAME_DIR .. "3rdparty/softfloat3/source/8086/softfloat_raiseFlags.c", + MAME_DIR .. "3rdparty/softfloat3/source/8086/s_commonNaNToF16UI.c", + MAME_DIR .. "3rdparty/softfloat3/source/8086/s_propagateNaNF16UI.c", + MAME_DIR .. "3rdparty/softfloat3/source/8086/s_f32UIToCommonNaN.c", + MAME_DIR .. "3rdparty/softfloat3/source/8086/s_commonNaNToF32UI.c", + MAME_DIR .. "3rdparty/softfloat3/source/8086/s_propagateNaNF32UI.c", + MAME_DIR .. "3rdparty/softfloat3/source/8086/s_f64UIToCommonNaN.c", + MAME_DIR .. "3rdparty/softfloat3/source/8086/s_commonNaNToF64UI.c", + MAME_DIR .. "3rdparty/softfloat3/source/8086/s_propagateNaNF64UI.c", + MAME_DIR .. "3rdparty/softfloat3/source/8086/extF80M_isSignalingNaN.c", + MAME_DIR .. "3rdparty/softfloat3/source/8086/s_extF80UIToCommonNaN.c", + MAME_DIR .. "3rdparty/softfloat3/source/8086/s_commonNaNToExtF80UI.c", + MAME_DIR .. "3rdparty/softfloat3/source/8086/s_propagateNaNExtF80UI.c", + MAME_DIR .. "3rdparty/softfloat3/source/8086/f128M_isSignalingNaN.c", + MAME_DIR .. "3rdparty/softfloat3/source/8086/s_f128UIToCommonNaN.c", + MAME_DIR .. "3rdparty/softfloat3/source/8086/s_commonNaNToF128UI.c", + MAME_DIR .. "3rdparty/softfloat3/source/8086/s_propagateNaNF128UI.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_roundToUI32.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_roundToUI64.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_roundToI32.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_roundToI64.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_normSubnormalF16Sig.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_roundPackToF16.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_normRoundPackToF16.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_addMagsF16.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_subMagsF16.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_mulAddF16.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_normSubnormalF32Sig.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_roundPackToF32.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_normRoundPackToF32.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_addMagsF32.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_subMagsF32.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_mulAddF32.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_normSubnormalF64Sig.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_roundPackToF64.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_normRoundPackToF64.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_addMagsF64.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_subMagsF64.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_mulAddF64.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_normSubnormalExtF80Sig.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_roundPackToExtF80.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_normRoundPackToExtF80.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_addMagsExtF80.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_subMagsExtF80.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_normSubnormalF128Sig.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_roundPackToF128.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_normRoundPackToF128.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_addMagsF128.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_subMagsF128.c", + MAME_DIR .. "3rdparty/softfloat3/source/s_mulAddF128.c", + MAME_DIR .. "3rdparty/softfloat3/source/softfloat_state.c", + MAME_DIR .. "3rdparty/softfloat3/source/ui32_to_f16.c", + MAME_DIR .. "3rdparty/softfloat3/source/ui32_to_f32.c", + MAME_DIR .. "3rdparty/softfloat3/source/ui32_to_f64.c", + MAME_DIR .. "3rdparty/softfloat3/source/ui32_to_extF80.c", + MAME_DIR .. "3rdparty/softfloat3/source/ui32_to_extF80M.c", + MAME_DIR .. "3rdparty/softfloat3/source/ui32_to_f128.c", + MAME_DIR .. "3rdparty/softfloat3/source/ui32_to_f128M.c", + MAME_DIR .. "3rdparty/softfloat3/source/ui64_to_f16.c", + MAME_DIR .. "3rdparty/softfloat3/source/ui64_to_f32.c", + MAME_DIR .. "3rdparty/softfloat3/source/ui64_to_f64.c", + MAME_DIR .. "3rdparty/softfloat3/source/ui64_to_extF80.c", + MAME_DIR .. "3rdparty/softfloat3/source/ui64_to_extF80M.c", + MAME_DIR .. "3rdparty/softfloat3/source/ui64_to_f128.c", + MAME_DIR .. "3rdparty/softfloat3/source/ui64_to_f128M.c", + MAME_DIR .. "3rdparty/softfloat3/source/i32_to_f16.c", + MAME_DIR .. "3rdparty/softfloat3/source/i32_to_f32.c", + MAME_DIR .. "3rdparty/softfloat3/source/i32_to_f64.c", + MAME_DIR .. "3rdparty/softfloat3/source/i32_to_extF80.c", + MAME_DIR .. "3rdparty/softfloat3/source/i32_to_extF80M.c", + MAME_DIR .. "3rdparty/softfloat3/source/i32_to_f128.c", + MAME_DIR .. "3rdparty/softfloat3/source/i32_to_f128M.c", + MAME_DIR .. "3rdparty/softfloat3/source/i64_to_f16.c", + MAME_DIR .. "3rdparty/softfloat3/source/i64_to_f32.c", + MAME_DIR .. "3rdparty/softfloat3/source/i64_to_f64.c", + MAME_DIR .. "3rdparty/softfloat3/source/i64_to_extF80.c", + MAME_DIR .. "3rdparty/softfloat3/source/i64_to_extF80M.c", + MAME_DIR .. "3rdparty/softfloat3/source/i64_to_f128.c", + MAME_DIR .. "3rdparty/softfloat3/source/i64_to_f128M.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_to_ui32.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_to_ui64.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_to_i32.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_to_i64.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_to_ui32_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_to_ui64_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_to_i32_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_to_i64_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_to_f32.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_to_f64.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_to_extF80.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_to_extF80M.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_to_f128.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_to_f128M.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_roundToInt.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_add.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_sub.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_mul.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_mulAdd.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_div.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_rem.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_sqrt.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_eq.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_le.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_lt.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_eq_signaling.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_le_quiet.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_lt_quiet.c", + MAME_DIR .. "3rdparty/softfloat3/source/f16_isSignalingNaN.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_to_ui32.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_to_ui64.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_to_i32.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_to_i64.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_to_ui32_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_to_ui64_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_to_i32_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_to_i64_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_to_f16.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_to_f64.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_to_extF80.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_to_extF80M.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_to_f128.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_to_f128M.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_roundToInt.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_add.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_sub.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_mul.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_mulAdd.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_div.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_rem.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_sqrt.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_eq.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_le.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_lt.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_eq_signaling.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_le_quiet.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_lt_quiet.c", + MAME_DIR .. "3rdparty/softfloat3/source/f32_isSignalingNaN.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_to_ui32.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_to_ui64.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_to_i32.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_to_i64.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_to_ui32_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_to_ui64_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_to_i32_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_to_i64_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_to_f16.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_to_f32.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_to_extF80.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_to_extF80M.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_to_f128.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_to_f128M.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_roundToInt.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_add.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_sub.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_mul.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_mulAdd.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_div.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_rem.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_sqrt.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_eq.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_le.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_lt.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_eq_signaling.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_le_quiet.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_lt_quiet.c", + MAME_DIR .. "3rdparty/softfloat3/source/f64_isSignalingNaN.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_to_ui32.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_to_ui64.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_to_i32.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_to_i64.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_to_ui32_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_to_ui64_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_to_i32_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_to_i64_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_to_f16.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_to_f32.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_to_f64.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_to_f128.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_roundToInt.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_add.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_sub.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_mul.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_div.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_rem.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_sqrt.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_eq.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_le.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_lt.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_eq_signaling.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_le_quiet.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_lt_quiet.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80_isSignalingNaN.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_to_ui32.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_to_ui64.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_to_i32.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_to_i64.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_to_ui32_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_to_ui64_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_to_i32_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_to_i64_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_to_f16.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_to_f32.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_to_f64.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_to_f128M.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_roundToInt.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_add.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_sub.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_mul.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_div.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_rem.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_sqrt.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_eq.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_le.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_lt.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_eq_signaling.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_le_quiet.c", + MAME_DIR .. "3rdparty/softfloat3/source/extF80M_lt_quiet.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_to_ui32.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_to_ui64.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_to_i32.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_to_i64.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_to_ui32_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_to_ui64_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_to_i32_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_to_i64_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_to_f16.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_to_f32.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_to_extF80.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_to_f64.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_roundToInt.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_add.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_sub.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_mul.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_mulAdd.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_div.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_rem.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_sqrt.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_eq.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_le.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_lt.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_eq_signaling.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_le_quiet.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_lt_quiet.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128_isSignalingNaN.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_to_ui32.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_to_ui64.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_to_i32.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_to_i64.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_to_ui32_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_to_ui64_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_to_i32_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_to_i64_r_minMag.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_to_f16.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_to_f32.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_to_extF80M.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_to_f64.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_roundToInt.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_add.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_sub.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_mul.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_mulAdd.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_div.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_rem.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_sqrt.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_eq.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_le.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_lt.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_eq_signaling.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_le_quiet.c", + MAME_DIR .. "3rdparty/softfloat3/source/f128M_lt_quiet.c", +} + + +------------------------------------------------- +-- libJPEG library objects +-------------------------------------------------- + +if not _OPTIONS["with-system-jpeg"] then +project "jpeg" + uuid "447c6800-dcfd-4c48-b72a-a8223bb409ca" + kind "StaticLib" + + configuration { "vs*" } + buildoptions { + "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter + "/wd4127", -- warning C4127: conditional expression is constant + "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data + } +if _OPTIONS["vs"]=="intel-15" then + buildoptions { + "/Qwd869", -- remark #869: parameter "xxx" was never referenced + } +end + + configuration { } + + files { + MAME_DIR .. "3rdparty/libjpeg/jaricom.c", + MAME_DIR .. "3rdparty/libjpeg/jcapimin.c", + MAME_DIR .. "3rdparty/libjpeg/jcapistd.c", + MAME_DIR .. "3rdparty/libjpeg/jcarith.c", + MAME_DIR .. "3rdparty/libjpeg/jccoefct.c", + MAME_DIR .. "3rdparty/libjpeg/jccolor.c", + MAME_DIR .. "3rdparty/libjpeg/jcdctmgr.c", + MAME_DIR .. "3rdparty/libjpeg/jchuff.c", + MAME_DIR .. "3rdparty/libjpeg/jcinit.c", + MAME_DIR .. "3rdparty/libjpeg/jcmainct.c", + MAME_DIR .. "3rdparty/libjpeg/jcmarker.c", + MAME_DIR .. "3rdparty/libjpeg/jcmaster.c", + MAME_DIR .. "3rdparty/libjpeg/jcomapi.c", + MAME_DIR .. "3rdparty/libjpeg/jcparam.c", + MAME_DIR .. "3rdparty/libjpeg/jcprepct.c", + MAME_DIR .. "3rdparty/libjpeg/jcsample.c", + MAME_DIR .. "3rdparty/libjpeg/jctrans.c", + MAME_DIR .. "3rdparty/libjpeg/jdapimin.c", + MAME_DIR .. "3rdparty/libjpeg/jdapistd.c", + MAME_DIR .. "3rdparty/libjpeg/jdarith.c", + MAME_DIR .. "3rdparty/libjpeg/jdatadst.c", + MAME_DIR .. "3rdparty/libjpeg/jdatasrc.c", + MAME_DIR .. "3rdparty/libjpeg/jdcoefct.c", + MAME_DIR .. "3rdparty/libjpeg/jdcolor.c", + MAME_DIR .. "3rdparty/libjpeg/jddctmgr.c", + MAME_DIR .. "3rdparty/libjpeg/jdhuff.c", + MAME_DIR .. "3rdparty/libjpeg/jdinput.c", + MAME_DIR .. "3rdparty/libjpeg/jdmainct.c", + MAME_DIR .. "3rdparty/libjpeg/jdmarker.c", + MAME_DIR .. "3rdparty/libjpeg/jdmaster.c", + MAME_DIR .. "3rdparty/libjpeg/jdmerge.c", + MAME_DIR .. "3rdparty/libjpeg/jdpostct.c", + MAME_DIR .. "3rdparty/libjpeg/jdsample.c", + MAME_DIR .. "3rdparty/libjpeg/jdtrans.c", + MAME_DIR .. "3rdparty/libjpeg/jerror.c", + MAME_DIR .. "3rdparty/libjpeg/jfdctflt.c", + MAME_DIR .. "3rdparty/libjpeg/jfdctfst.c", + MAME_DIR .. "3rdparty/libjpeg/jfdctint.c", + MAME_DIR .. "3rdparty/libjpeg/jidctflt.c", + MAME_DIR .. "3rdparty/libjpeg/jidctfst.c", + MAME_DIR .. "3rdparty/libjpeg/jidctint.c", + MAME_DIR .. "3rdparty/libjpeg/jquant1.c", + MAME_DIR .. "3rdparty/libjpeg/jquant2.c", + MAME_DIR .. "3rdparty/libjpeg/jutils.c", + MAME_DIR .. "3rdparty/libjpeg/jmemmgr.c", + MAME_DIR .. "3rdparty/libjpeg/jmemansi.c", + } +else +links { + ext_lib("jpeg"), +} +end + + +-------------------------------------------------- +-- libflac library objects +-------------------------------------------------- + +if not _OPTIONS["with-system-flac"] then +project "flac" + uuid "b6fc19e8-073a-4541-bb7b-d24b548d424a" + kind "StaticLib" + + configuration { "vs*" } + buildoptions { + "/wd4127", -- warning C4127: conditional expression is constant + "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data + "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter + "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration + "/wd4702", -- warning C4702: unreachable code + } +if _OPTIONS["vs"]=="intel-15" then + buildoptions { + "/Qwd111", -- remark #111: statement is unreachable + "/Qwd177", -- remark #177: function "xxx" was declared but never referenced + "/Qwd181", -- remark #181: argument of type "UINT32={unsigned int}" is incompatible with format "%d", expecting argument of type "int" + "/Qwd188", -- error #188: enumerated type mixed with another type + "/Qwd869", -- remark #869: parameter "xxx" was never referenced + } +end + + configuration { "mingw-clang" } + buildoptions { + "-include stdint.h" + } + + configuration { } + defines { + "WORDS_BIGENDIAN=0", + "FLAC__NO_ASM", + "_LARGEFILE_SOURCE", + "_FILE_OFFSET_BITS=64", + "FLAC__HAS_OGG=0", + "HAVE_CONFIG_H=1", + } + + configuration { "gmake or ninja" } + buildoptions_c { + "-Wno-unused-function", + "-O0", + } + if _OPTIONS["gcc"]~=nil and (string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "android")) then + buildoptions { + "-Wno-enum-conversion", + } + if _OPTIONS["targetos"]=="macosx" then + buildoptions_c { + "-Wno-unknown-attributes", + } + end + end + configuration { } + + includedirs { + MAME_DIR .. "3rdparty/libflac/src/libFLAC/include", + MAME_DIR .. "3rdparty/libflac/include", + } + + files { + MAME_DIR .. "3rdparty/libflac/src/libFLAC/bitmath.c", + MAME_DIR .. "3rdparty/libflac/src/libFLAC/bitreader.c", + MAME_DIR .. "3rdparty/libflac/src/libFLAC/bitwriter.c", + MAME_DIR .. "3rdparty/libflac/src/libFLAC/cpu.c", + MAME_DIR .. "3rdparty/libflac/src/libFLAC/crc.c", + MAME_DIR .. "3rdparty/libflac/src/libFLAC/fixed.c", + MAME_DIR .. "3rdparty/libflac/src/libFLAC/float.c", + MAME_DIR .. "3rdparty/libflac/src/libFLAC/format.c", + MAME_DIR .. "3rdparty/libflac/src/libFLAC/lpc.c", + MAME_DIR .. "3rdparty/libflac/src/libFLAC/md5.c", + MAME_DIR .. "3rdparty/libflac/src/libFLAC/memory.c", + MAME_DIR .. "3rdparty/libflac/src/libFLAC/stream_decoder.c", + MAME_DIR .. "3rdparty/libflac/src/libFLAC/stream_encoder.c", + MAME_DIR .. "3rdparty/libflac/src/libFLAC/stream_encoder_framing.c", + MAME_DIR .. "3rdparty/libflac/src/libFLAC/window.c", + } +else +links { + ext_lib("flac"), +} +end + + +-------------------------------------------------- +-- lib7z library objects +-------------------------------------------------- + +project "7z" + uuid "ad573d62-e76a-4b11-ae34-5110a6789a42" + kind "StaticLib" + + configuration { "gmake or ninja" } + buildoptions_c { + "-Wno-strict-prototypes", + "-Wno-undef", + } +if _OPTIONS["gcc"]~=nil and string.find(_OPTIONS["gcc"], "clang") and str_to_version(_OPTIONS["gcc_version"]) >= 100000 then + buildoptions_c { + "-Wno-misleading-indentation", + } +end + + configuration { "asmjs" } + buildoptions { + "-Wno-misleading-indentation", + } + + configuration { "mingw*" } + buildoptions_c { + "-Wno-strict-prototypes", + } + + configuration { "vs*" } + buildoptions { + "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter + "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration + "/wd4457", -- warning C4457: declaration of 'xxx' hides function parameter + } +if _OPTIONS["vs"]=="clangcl" then + buildoptions { + "-Wno-misleading-indentation", + } +end +if _OPTIONS["vs"]=="intel-15" then + buildoptions { + "/Qwd869", -- remark #869: parameter "xxx" was never referenced + } +end + configuration { } + defines { + "_7ZIP_PPMD_SUPPPORT", + "_7ZIP_ST", + } + + files { + MAME_DIR .. "3rdparty/lzma/C/7zAlloc.c", + MAME_DIR .. "3rdparty/lzma/C/7zArcIn.c", + MAME_DIR .. "3rdparty/lzma/C/7zBuf.c", + MAME_DIR .. "3rdparty/lzma/C/7zBuf2.c", + MAME_DIR .. "3rdparty/lzma/C/7zCrc.c", + MAME_DIR .. "3rdparty/lzma/C/7zCrcOpt.c", + MAME_DIR .. "3rdparty/lzma/C/7zDec.c", + MAME_DIR .. "3rdparty/lzma/C/7zFile.c", + MAME_DIR .. "3rdparty/lzma/C/7zStream.c", + MAME_DIR .. "3rdparty/lzma/C/Aes.c", + MAME_DIR .. "3rdparty/lzma/C/AesOpt.c", + MAME_DIR .. "3rdparty/lzma/C/Alloc.c", + MAME_DIR .. "3rdparty/lzma/C/Bcj2.c", + -- MAME_DIR .. "3rdparty/lzma/C/Bcj2Enc.c", + MAME_DIR .. "3rdparty/lzma/C/Bra.c", + MAME_DIR .. "3rdparty/lzma/C/Bra86.c", + MAME_DIR .. "3rdparty/lzma/C/BraIA64.c", + MAME_DIR .. "3rdparty/lzma/C/CpuArch.c", + MAME_DIR .. "3rdparty/lzma/C/Delta.c", + -- MAME_DIR .. "3rdparty/lzma/C/DllSecur.c", + MAME_DIR .. "3rdparty/lzma/C/LzFind.c", + -- MAME_DIR .. "3rdparty/lzma/C/LzFindMt.c", + MAME_DIR .. "3rdparty/lzma/C/Lzma2Dec.c", + MAME_DIR .. "3rdparty/lzma/C/Lzma2Enc.c", + MAME_DIR .. "3rdparty/lzma/C/Lzma86Dec.c", + MAME_DIR .. "3rdparty/lzma/C/Lzma86Enc.c", + MAME_DIR .. "3rdparty/lzma/C/LzmaDec.c", + MAME_DIR .. "3rdparty/lzma/C/LzmaEnc.c", + -- MAME_DIR .. "3rdparty/lzma/C/LzmaLib.c", + -- MAME_DIR .. "3rdparty/lzma/C/MtCoder.c", + MAME_DIR .. "3rdparty/lzma/C/Ppmd7.c", + MAME_DIR .. "3rdparty/lzma/C/Ppmd7Dec.c", + MAME_DIR .. "3rdparty/lzma/C/Ppmd7Enc.c", + MAME_DIR .. "3rdparty/lzma/C/Sha256.c", + MAME_DIR .. "3rdparty/lzma/C/Sort.c", + -- MAME_DIR .. "3rdparty/lzma/C/Threads.c", + -- MAME_DIR .. "3rdparty/lzma/C/Xz.c", + -- MAME_DIR .. "3rdparty/lzma/C/XzCrc64.c", + -- MAME_DIR .. "3rdparty/lzma/C/XzCrc64Opt.c", + -- MAME_DIR .. "3rdparty/lzma/C/XzDec.c", + -- MAME_DIR .. "3rdparty/lzma/C/XzEnc.c", + -- MAME_DIR .. "3rdparty/lzma/C/XzIn.c", + } + + +-------------------------------------------------- +-- LUA library objects +-------------------------------------------------- +if (STANDALONE~=true) then + +if not _OPTIONS["with-system-lua"] then +project "lua" + uuid "d9e2eed1-f1ab-4737-a6ac-863700b1a5a9" + kind "StaticLib" + + -- uncomment the options below to + -- compile using c++. Do the same + -- in lualibs. + -- In addition comment out the "extern "C"" + -- in lua.hpp and do the same in luaengine.c line 47 + --options { + -- "ForceCPP", + --} + + configuration { "gmake or ninja" } + buildoptions_c { + "-Wno-bad-function-cast" + } + + configuration { "vs*" } + buildoptions { + "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data + "/wd4702", -- warning C4702: unreachable code + "/wd4310", -- warning C4310: cast truncates constant value + } +if _OPTIONS["vs"]=="intel-15" then + buildoptions { + "/Qwd592", -- error #592: variable "xxx" is used before its value is set + } +end + + configuration { } + defines { + "LUA_COMPAT_ALL", + "LUA_COMPAT_5_1", + "LUA_COMPAT_5_2", + } + if not (_OPTIONS["targetos"]=="windows") and not (_OPTIONS["targetos"]=="asmjs") then + defines { + "LUA_USE_POSIX", + } + end + + configuration { } + + includedirs { + MAME_DIR .. "3rdparty", + } + + files { + MAME_DIR .. "3rdparty/lua/src/lapi.c", + MAME_DIR .. "3rdparty/lua/src/lcode.c", + MAME_DIR .. "3rdparty/lua/src/lctype.c", + MAME_DIR .. "3rdparty/lua/src/ldebug.c", + MAME_DIR .. "3rdparty/lua/src/ldo.c", + MAME_DIR .. "3rdparty/lua/src/ldump.c", + MAME_DIR .. "3rdparty/lua/src/lfunc.c", + MAME_DIR .. "3rdparty/lua/src/lgc.c", + MAME_DIR .. "3rdparty/lua/src/llex.c", + MAME_DIR .. "3rdparty/lua/src/lmem.c", + MAME_DIR .. "3rdparty/lua/src/lobject.c", + MAME_DIR .. "3rdparty/lua/src/lopcodes.c", + MAME_DIR .. "3rdparty/lua/src/lparser.c", + MAME_DIR .. "3rdparty/lua/src/lstate.c", + MAME_DIR .. "3rdparty/lua/src/lstring.c", + MAME_DIR .. "3rdparty/lua/src/ltable.c", + MAME_DIR .. "3rdparty/lua/src/ltm.c", + MAME_DIR .. "3rdparty/lua/src/lundump.c", + MAME_DIR .. "3rdparty/lua/src/lvm.c", + MAME_DIR .. "3rdparty/lua/src/lzio.c", + MAME_DIR .. "3rdparty/lua/src/lauxlib.c", + MAME_DIR .. "3rdparty/lua/src/lbaselib.c", + MAME_DIR .. "3rdparty/lua/src/lbitlib.c", + MAME_DIR .. "3rdparty/lua/src/lcorolib.c", + MAME_DIR .. "3rdparty/lua/src/ldblib.c", + MAME_DIR .. "3rdparty/lua/src/liolib.c", + MAME_DIR .. "3rdparty/lua/src/lmathlib.c", + MAME_DIR .. "3rdparty/lua/src/loslib.c", + MAME_DIR .. "3rdparty/lua/src/lstrlib.c", + MAME_DIR .. "3rdparty/lua/src/ltablib.c", + MAME_DIR .. "3rdparty/lua/src/loadlib.c", + MAME_DIR .. "3rdparty/lua/src/linit.c", + MAME_DIR .. "3rdparty/lua/src/lutf8lib.c", + } +else +links { + ext_lib("lua"), +} +end + + +-------------------------------------------------- +-- small lua library objects +-------------------------------------------------- + +project "lualibs" + uuid "1d84edab-94cf-48fb-83ee-b75bc697660e" + kind "StaticLib" + + configuration { "vs*" } + buildoptions { + "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data + "/wd4055", -- warning C4055: 'type cast': from data pointer 'void *' to function pointer 'xxx' + "/wd4152", -- warning C4152: nonstandard extension, function/data pointer conversion in expression + "/wd4130", -- warning C4130: '==': logical operation on address of string constant + } + + configuration { } + defines { + "LUA_COMPAT_ALL", + } + + includedirs { + MAME_DIR .. "3rdparty", + MAME_DIR .. "3rdparty/linenoise", + } + + includedirs { + ext_includedir("lua"), + ext_includedir("zlib"), + ext_includedir("sqlite3"), + } + + configuration {} + + files { + MAME_DIR .. "3rdparty/lsqlite3/lsqlite3.c", + MAME_DIR .. "3rdparty/lua-zlib/lua_zlib.c", + MAME_DIR .. "3rdparty/luafilesystem/src/lfs.c", + MAME_DIR .. "3rdparty/lua-linenoise/linenoise.c", + } + +-------------------------------------------------- +-- SQLite3 library objects +-------------------------------------------------- + +if not _OPTIONS["with-system-sqlite3"] then +project "sqlite3" + uuid "5cb3d495-57ed-461c-81e5-80dc0857517d" + kind "StaticLib" + + configuration { "gmake" } + buildoptions_c { + "-Wno-bad-function-cast", + "-Wno-discarded-qualifiers", + "-Wno-undef", + "-Wno-unused-but-set-variable", + } +if _OPTIONS["gcc"]~=nil and ((string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "asmjs") or string.find(_OPTIONS["gcc"], "android"))) then + buildoptions_c { + "-Wno-incompatible-pointer-types-discards-qualifiers", + } +end + configuration { "vs*" } +if _OPTIONS["vs"]=="clangcl" then + buildoptions { + "-Wno-implicit-int-float-conversion", + } +end + + configuration { } + + files { + MAME_DIR .. "3rdparty/sqlite3/sqlite3.c", + } +else +links { + ext_lib("sqlite3"), +} +end + +end + + +-------------------------------------------------- +-- portmidi library objects +-------------------------------------------------- + +if _OPTIONS["NO_USE_MIDI"]~="1" then +if not _OPTIONS["with-system-portmidi"] then +project "portmidi" + uuid "587f2da6-3274-4a65-86a2-f13ea315bb98" + kind "StaticLib" + + includedirs { + MAME_DIR .. "3rdparty/portmidi/pm_common", + MAME_DIR .. "3rdparty/portmidi/porttime", + } + + configuration { "vs*" } + buildoptions { + "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter + "/wd4127", -- warning C4127: conditional expression is constant + "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data + "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration + "/wd4706", -- warning C4706: assignment within conditional expression + } +if _OPTIONS["vs"]=="intel-15" then + buildoptions { + "/Qwd188", -- error #188: enumerated type mixed with another type + "/Qwd344", -- remark #344: typedef name has already been declared (with same type) + "/Qwd869", -- remark #869: parameter "xxx" was never referenced + "/Qwd2557", -- remark #2557: comparison between signed and unsigned operands + } +end + + configuration { "linux*" } + defines { + "PMALSA=1", + } + + configuration { } + + files { + MAME_DIR .. "3rdparty/portmidi/pm_common/portmidi.c", + MAME_DIR .. "3rdparty/portmidi/pm_common/pmutil.c", + } + + if _OPTIONS["targetos"]=="windows" then + files { + MAME_DIR .. "3rdparty/portmidi/porttime/ptwinmm.c", + MAME_DIR .. "3rdparty/portmidi/pm_win/pmwin.c", + MAME_DIR .. "3rdparty/portmidi/pm_win/pmwinmm.c", + MAME_DIR .. "3rdparty/portmidi/porttime/ptwinmm.c", + } + end + + if _OPTIONS["targetos"]=="linux" then + files { + MAME_DIR .. "3rdparty/portmidi/pm_linux/pmlinux.c", + MAME_DIR .. "3rdparty/portmidi/pm_linux/pmlinuxalsa.c", + MAME_DIR .. "3rdparty/portmidi/pm_linux/finddefault.c", + MAME_DIR .. "3rdparty/portmidi/porttime/ptlinux.c", + } + end + if _OPTIONS["targetos"]=="netbsd" then + files { + MAME_DIR .. "3rdparty/portmidi/pm_linux/pmlinux.c", + MAME_DIR .. "3rdparty/portmidi/pm_linux/finddefault.c", + MAME_DIR .. "3rdparty/portmidi/porttime/ptlinux.c", + } + end + if _OPTIONS["targetos"]=="macosx" then + files { + MAME_DIR .. "3rdparty/portmidi/pm_mac/pmmac.c", + MAME_DIR .. "3rdparty/portmidi/pm_mac/pmmacosxcm.c", + MAME_DIR .. "3rdparty/portmidi/pm_mac/finddefault.c", + MAME_DIR .. "3rdparty/portmidi/pm_mac/readbinaryplist.c", + MAME_DIR .. "3rdparty/portmidi/pm_mac/osxsupport.m", + MAME_DIR .. "3rdparty/portmidi/porttime/ptmacosx_mach.c", + } + end +else +links { + ext_lib("portmidi"), +} +end +end + + +-------------------------------------------------- +-- BX library objects +-------------------------------------------------- + +project "bx" + uuid "238318fe-49f5-4eb4-88be-0618900f5eac" + kind "StaticLib" + + defines { + "__STDC_LIMIT_MACROS", + "__STDC_FORMAT_MACROS", + "__STDC_CONSTANT_MACROS", + } + + configuration { "vs*" } + includedirs { + MAME_DIR .. "3rdparty/bx/include/compat/msvc", + } + configuration { "mingw*" } + includedirs { + MAME_DIR .. "3rdparty/bx/include/compat/mingw", + } + + configuration { "osx*" } + includedirs { + MAME_DIR .. "3rdparty/bx/include/compat/osx", + } + + configuration { "freebsd" } + includedirs { + MAME_DIR .. "3rdparty/bx/include/compat/freebsd", + } + + configuration { "netbsd" } + includedirs { + MAME_DIR .. "3rdparty/bx/include/compat/freebsd", + } + + configuration { } + + includedirs { + MAME_DIR .. "3rdparty/bx/include", + MAME_DIR .. "3rdparty/bx/3rdparty", + } + + files { + MAME_DIR .. "3rdparty/bx/src/allocator.cpp", + MAME_DIR .. "3rdparty/bx/src/bx.cpp", + MAME_DIR .. "3rdparty/bx/src/commandline.cpp", + MAME_DIR .. "3rdparty/bx/src/crtnone.cpp", + MAME_DIR .. "3rdparty/bx/src/debug.cpp", + MAME_DIR .. "3rdparty/bx/src/dtoa.cpp", + MAME_DIR .. "3rdparty/bx/src/easing.cpp", + MAME_DIR .. "3rdparty/bx/src/file.cpp", + MAME_DIR .. "3rdparty/bx/src/filepath.cpp", + MAME_DIR .. "3rdparty/bx/src/hash.cpp", + MAME_DIR .. "3rdparty/bx/src/math.cpp", + MAME_DIR .. "3rdparty/bx/src/mutex.cpp", + MAME_DIR .. "3rdparty/bx/src/os.cpp", + MAME_DIR .. "3rdparty/bx/src/process.cpp", + MAME_DIR .. "3rdparty/bx/src/semaphore.cpp", + MAME_DIR .. "3rdparty/bx/src/settings.cpp", + MAME_DIR .. "3rdparty/bx/src/sort.cpp", + MAME_DIR .. "3rdparty/bx/src/string.cpp", + MAME_DIR .. "3rdparty/bx/src/thread.cpp", + MAME_DIR .. "3rdparty/bx/src/timer.cpp", + MAME_DIR .. "3rdparty/bx/src/url.cpp", + } + + +-------------------------------------------------- +-- BIMG library objects +-------------------------------------------------- + +project "bimg" + uuid "5603611b-8bf8-4ffd-85bc-76858cd7df39" + kind "StaticLib" + + includedirs { + MAME_DIR .. "3rdparty/bx/include", + } + + configuration { "vs*" } + includedirs { + MAME_DIR .. "3rdparty/bx/include/compat/msvc", + } + configuration { "mingw*" } + includedirs { + MAME_DIR .. "3rdparty/bx/include/compat/mingw", + } + + configuration { "osx*" } + includedirs { + MAME_DIR .. "3rdparty/bx/include/compat/osx", + } + + configuration { "freebsd" } + includedirs { + MAME_DIR .. "3rdparty/bx/include/compat/freebsd", + } + + configuration { "netbsd" } + includedirs { + MAME_DIR .. "3rdparty/bx/include/compat/freebsd", + } + + configuration { "gmake" } + buildoptions { + "-Wno-unused-but-set-variable", + } + + configuration { } + + if _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="linux" or _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="asmjs" then + if _OPTIONS["gcc"]~=nil and (string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "asmjs")) then + buildoptions_cpp { + "-Wno-unused-const-variable", + } + end + end + + defines { + "__STDC_LIMIT_MACROS", + "__STDC_FORMAT_MACROS", + "__STDC_CONSTANT_MACROS", + } + + includedirs { + MAME_DIR .. "3rdparty/bimg/include", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/include", + } + + files { + MAME_DIR .. "3rdparty/bimg/src/image.cpp", + MAME_DIR .. "3rdparty/bimg/src/image_gnf.cpp", + + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/src/decoder/astc_file.cc", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/src/decoder/codec.cc", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/src/decoder/endpoint_codec.cc", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/src/decoder/footprint.cc", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/src/decoder/integer_sequence_codec.cc", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/src/decoder/intermediate_astc_block.cc", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/src/decoder/logical_astc_block.cc", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/src/decoder/partition.cc", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/src/decoder/physical_astc_block.cc", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/src/decoder/quantization.cc", + MAME_DIR .. "3rdparty/bimg/3rdparty/astc-codec/src/decoder/weight_infill.cc", + } + + +-------------------------------------------------- +-- BGFX library objects +-------------------------------------------------- + +project "bgfx" + uuid "d3e7e119-35cf-4f4f-aba0-d3bdcd1b879a" + kind "StaticLib" + + configuration { "vs*" } + buildoptions { + "/wd4324", -- warning C4324: 'xxx' : structure was padded due to __declspec(align()) + "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data + "/wd4611", -- warning C4611: interaction between '_setjmp' and C++ object destruction is non-portable + "/wd4310", -- warning C4310: cast truncates constant value + "/wd4701", -- warning C4701: potentially uninitialized local variable 'xxx' used + } + +if _OPTIONS["vs"]=="intel-15" then + buildoptions { + "/Qwd906", -- message #906: effect of this "#pragma pack" directive is local to function "xxx" + "/Qwd1879", -- warning #1879: unimplemented pragma ignored + "/Qwd82", -- remark #82: storage class is not first + } +end + configuration { } + + includedirs { + MAME_DIR .. "3rdparty/bgfx/include", + MAME_DIR .. "3rdparty/bgfx/3rdparty", + MAME_DIR .. "3rdparty/bx/include", + MAME_DIR .. "3rdparty/bimg/include", + MAME_DIR .. "3rdparty/bgfx/3rdparty/dxsdk/include", + MAME_DIR .. "3rdparty/bgfx/3rdparty/khronos", + } + + configuration { "android-*"} + buildoptions { + "-Wno-macro-redefined", + } + + configuration { "vs*" } + includedirs { + MAME_DIR .. "3rdparty/bx/include/compat/msvc", + } + configuration { "mingw*" } + includedirs { + MAME_DIR .. "3rdparty/bx/include/compat/mingw", + } + + configuration { "osx*" } + includedirs { + MAME_DIR .. "3rdparty/bx/include/compat/osx", + } + + configuration { "freebsd" } + includedirs { + MAME_DIR .. "3rdparty/bx/include/compat/freebsd", + } + + configuration { "netbsd" } + includedirs { + MAME_DIR .. "3rdparty/bx/include/compat/freebsd", + } + + configuration { "gmake or ninja" } + buildoptions { + "-Wno-uninitialized", + "-Wno-unused-but-set-variable", + "-Wno-unused-function", + "-Wno-unused-variable", + } + + configuration { } + + local version = str_to_version(_OPTIONS["gcc_version"]) + if _OPTIONS["gcc"]~=nil and string.find(_OPTIONS["gcc"], "gcc") then + if version >= 60000 then + buildoptions_cpp { + "-Wno-misleading-indentation", + } + end + end + + if _OPTIONS["targetos"]=="windows" then + if _OPTIONS["gcc"]~=nil and string.find(_OPTIONS["gcc"], "clang") then + buildoptions { + "-Wno-unknown-attributes", + "-Wno-missing-braces", + "-Wno-int-to-pointer-cast", + "-Wno-ignored-attributes", -- many instances in ImGui + } + end + end + + if _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="linux" then + if _OPTIONS["gcc"]~=nil and string.find(_OPTIONS["gcc"], "clang") then + buildoptions { + "-Wno-switch", + } + buildoptions_cpp { + "-Wno-unknown-pragmas", + } + end + end + + if _OPTIONS["targetos"]=="freebsd" then + buildoptions { + backtick(pkgconfigcmd() .. " --cflags gl") + } + end + + defines { + "__STDC_LIMIT_MACROS", + "__STDC_FORMAT_MACROS", + "__STDC_CONSTANT_MACROS", + "BGFX_CONFIG_MAX_FRAME_BUFFERS=128", + } + + if _OPTIONS["targetos"]=="linux" or _OPTIONS["targetos"]=="netbsd" or _OPTIONS["targetos"]=="openbsd" then + if _OPTIONS["NO_X11"]=="1" then + defines { + "BGFX_CONFIG_RENDERER_OPENGLES=1", + "BGFX_CONFIG_RENDERER_OPENGL=0", + } + end + end + + if _OPTIONS["targetos"]=="macosx" and _OPTIONS["gcc"]~=nil then + if string.find(_OPTIONS["gcc"], "clang") and (version < 80000) then + defines { + "TARGET_OS_OSX=1", + } + end + end + + files { + MAME_DIR .. "3rdparty/bgfx/src/bgfx.cpp", + MAME_DIR .. "3rdparty/bgfx/src/debug_renderdoc.cpp", + MAME_DIR .. "3rdparty/bgfx/src/dxgi.cpp", + MAME_DIR .. "3rdparty/bgfx/src/glcontext_egl.cpp", + MAME_DIR .. "3rdparty/bgfx/src/glcontext_glx.cpp", + MAME_DIR .. "3rdparty/bgfx/src/glcontext_html5.cpp", + MAME_DIR .. "3rdparty/bgfx/src/glcontext_wgl.cpp", + MAME_DIR .. "3rdparty/bgfx/src/nvapi.cpp", + MAME_DIR .. "3rdparty/bgfx/src/renderer_agc.cpp", + MAME_DIR .. "3rdparty/bgfx/src/renderer_d3d11.cpp", + MAME_DIR .. "3rdparty/bgfx/src/renderer_d3d12.cpp", + MAME_DIR .. "3rdparty/bgfx/src/renderer_d3d9.cpp", + MAME_DIR .. "3rdparty/bgfx/src/renderer_gl.cpp", + MAME_DIR .. "3rdparty/bgfx/src/renderer_gnm.cpp", + MAME_DIR .. "3rdparty/bgfx/src/renderer_noop.cpp", + MAME_DIR .. "3rdparty/bgfx/src/renderer_nvn.cpp", + MAME_DIR .. "3rdparty/bgfx/src/renderer_vk.cpp", + MAME_DIR .. "3rdparty/bgfx/src/renderer_webgpu.cpp", + MAME_DIR .. "3rdparty/bgfx/src/shader.cpp", + MAME_DIR .. "3rdparty/bgfx/src/shader_dx9bc.cpp", + MAME_DIR .. "3rdparty/bgfx/src/shader_dxbc.cpp", + MAME_DIR .. "3rdparty/bgfx/src/shader_spirv.cpp", + MAME_DIR .. "3rdparty/bgfx/src/topology.cpp", + MAME_DIR .. "3rdparty/bgfx/src/vertexlayout.cpp", + MAME_DIR .. "3rdparty/bgfx/examples/common/imgui/imgui.cpp", + MAME_DIR .. "3rdparty/bgfx/examples/common/nanovg/nanovg.cpp", + MAME_DIR .. "3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp", + MAME_DIR .. "3rdparty/bgfx/3rdparty/dear-imgui/imgui.cpp", + MAME_DIR .. "3rdparty/bgfx/3rdparty/dear-imgui/imgui_draw.cpp", + MAME_DIR .. "3rdparty/bgfx/3rdparty/dear-imgui/imgui_tables.cpp", + MAME_DIR .. "3rdparty/bgfx/3rdparty/dear-imgui/imgui_widgets.cpp", + } + if _OPTIONS["targetos"]=="macosx" then + files { + MAME_DIR .. "3rdparty/bgfx/src/glcontext_eagl.mm", + MAME_DIR .. "3rdparty/bgfx/src/glcontext_nsgl.mm", + MAME_DIR .. "3rdparty/bgfx/src/renderer_mtl.mm", + } + buildoptions { + "-x objective-c++", + "-D BGFX_CONFIG_MULTITHREADED=0", + } + end + + +-------------------------------------------------- +-- PortAudio library objects +-------------------------------------------------- + +if _OPTIONS["NO_USE_PORTAUDIO"]~="1" then +if not _OPTIONS["with-system-portaudio"] then +project "portaudio" + uuid "0755c5f5-eccf-47f3-98a9-df67018a94d4" + kind "StaticLib" + + configuration { "vs*" } + buildoptions { + "/wd4245", -- warning C4245: 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch + "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data + "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter + "/wd4389", -- warning C4389: 'operator' : signed/unsigned mismatch + "/wd4189", -- warning C4189: 'xxx' : local variable is initialized but not referenced + "/wd4127", -- warning C4127: conditional expression is constant + "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration + "/wd4312", -- warning C4312: 'type cast': conversion from 'UINT' to 'HWAVEIN' of greater size + } + if _OPTIONS["vs"]=="intel-15" then + buildoptions { + "/Qwd869", -- remark #869: parameter "xxx" was never referenced + "/Qwd1478", -- warning #1478: function "xxx" (declared at line yyy of "zzz") was declared deprecated + "/Qwd2544", -- message #2544: empty dependent statement in if-statement + "/Qwd1879", -- warning #1879: unimplemented pragma ignored + } + end + + configuration { "gmake or ninja" } + buildoptions_c { + "-Wno-bad-function-cast", + "-Wno-missing-braces", + "-Wno-strict-prototypes", + "-Wno-undef", + "-Wno-unknown-pragmas", + "-Wno-unused-function", + "-Wno-unused-value", + "-Wno-unused-variable", + } + + local version = str_to_version(_OPTIONS["gcc_version"]) + if (_OPTIONS["gcc"]~=nil) then + if string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "android") then + buildoptions_c { + "-Wno-unknown-warning-option", + "-Wno-absolute-value", + "-Wno-unused-but-set-variable", + "-Wno-maybe-uninitialized", + "-Wno-sometimes-uninitialized", + } + else + buildoptions_c { + "-Wno-maybe-uninitialized", + "-Wno-sometimes-uninitialized", + "-Wno-unused-but-set-variable", + "-Wno-incompatible-pointer-types-discards-qualifiers", + "-w", + } + end + if string.find(_OPTIONS["gcc"], "clang") and version >= 100000 then + buildoptions_c { + "-Wno-misleading-indentation", + } + end + end + configuration { "vs*" } + buildoptions { + "/wd4204", -- warning C4204: nonstandard extension used : non-constant aggregate initializer + "/wd4701", -- warning C4701: potentially uninitialized local variable 'xxx' used + "/wd4057", -- warning C4057: 'function': 'xxx' differs in indirection to slightly different base types from 'xxx' + } + + configuration { } + + includedirs { + MAME_DIR .. "3rdparty/portaudio/include", + MAME_DIR .. "3rdparty/portaudio/src/common", + } + + files { + MAME_DIR .. "3rdparty/portaudio/src/common/pa_allocation.c", + MAME_DIR .. "3rdparty/portaudio/src/common/pa_converters.c", + MAME_DIR .. "3rdparty/portaudio/src/common/pa_cpuload.c", + MAME_DIR .. "3rdparty/portaudio/src/common/pa_dither.c", + MAME_DIR .. "3rdparty/portaudio/src/common/pa_debugprint.c", + MAME_DIR .. "3rdparty/portaudio/src/common/pa_front.c", + MAME_DIR .. "3rdparty/portaudio/src/common/pa_process.c", + MAME_DIR .. "3rdparty/portaudio/src/common/pa_stream.c", + MAME_DIR .. "3rdparty/portaudio/src/common/pa_trace.c", + MAME_DIR .. "3rdparty/portaudio/src/hostapi/skeleton/pa_hostapi_skeleton.c", + } + + if _OPTIONS["targetos"]=="windows" then + defines { + "PA_USE_DS=1", + "PA_USE_WASAPI=1", + "PA_USE_WDMKS=1", + "PA_USE_WMME=1", + } + includedirs { + MAME_DIR .. "3rdparty/portaudio/src/os/win", + } + + configuration { "mingw*" } + includedirs { + MAME_DIR .. "3rdparty/portaudio/src/hostapi/wasapi/mingw-include", + } + + configuration { } + files { + MAME_DIR .. "3rdparty/portaudio/src/os/win/pa_win_util.c", + MAME_DIR .. "3rdparty/portaudio/src/os/win/pa_win_waveformat.c", + MAME_DIR .. "3rdparty/portaudio/src/os/win/pa_win_hostapis.c", + MAME_DIR .. "3rdparty/portaudio/src/os/win/pa_win_coinitialize.c", + MAME_DIR .. "3rdparty/portaudio/src/hostapi/dsound/pa_win_ds.c", + MAME_DIR .. "3rdparty/portaudio/src/hostapi/dsound/pa_win_ds_dynlink.c", + MAME_DIR .. "3rdparty/portaudio/src/os/win/pa_win_hostapis.c", + MAME_DIR .. "3rdparty/portaudio/src/hostapi/wasapi/pa_win_wasapi.c", + MAME_DIR .. "3rdparty/portaudio/src/hostapi/wdmks/pa_win_wdmks.c", + MAME_DIR .. "3rdparty/portaudio/src/hostapi/wmme/pa_win_wmme.c", + MAME_DIR .. "3rdparty/portaudio/src/common/pa_ringbuffer.c", + } + + end + if _OPTIONS["targetos"]=="linux" then + defines { + "PA_USE_ALSA=1", + "PA_USE_OSS=1", + "HAVE_LINUX_SOUNDCARD_H", + } + includedirs { + MAME_DIR .. "3rdparty/portaudio/src/os/unix", + } + files { + MAME_DIR .. "3rdparty/portaudio/src/os/unix/pa_unix_hostapis.c", + MAME_DIR .. "3rdparty/portaudio/src/os/unix/pa_unix_util.c", + MAME_DIR .. "3rdparty/portaudio/src/hostapi/alsa/pa_linux_alsa.c", + MAME_DIR .. "3rdparty/portaudio/src/hostapi/oss/pa_unix_oss.c", + } + end + if _OPTIONS["targetos"]=="macosx" then + defines { + "PA_USE_COREAUDIO=1", + } + includedirs { + MAME_DIR .. "3rdparty/portaudio/src/os/unix", + } + files { + MAME_DIR .. "3rdparty/portaudio/src/os/unix/pa_unix_hostapis.c", + MAME_DIR .. "3rdparty/portaudio/src/os/unix/pa_unix_util.c", + MAME_DIR .. "3rdparty/portaudio/src/hostapi/coreaudio/pa_mac_core.c", + MAME_DIR .. "3rdparty/portaudio/src/hostapi/coreaudio/pa_mac_core_utilities.c", + MAME_DIR .. "3rdparty/portaudio/src/hostapi/coreaudio/pa_mac_core_blocking.c", + MAME_DIR .. "3rdparty/portaudio/src/common/pa_ringbuffer.c", + } + end + +else +links { + ext_lib("portaudio"), +} +end +end + + +-------------------------------------------------- +-- SDL2 library +-------------------------------------------------- +if _OPTIONS["with-bundled-sdl2"] then +project "SDL2" + uuid "caab3327-574f-4abf-b25b-74d5238ae59b" +if _OPTIONS["targetos"]=="android" then + kind "SharedLib" + targetextension ".so" + targetprefix "lib" + links { + "GLESv1_CM", + "GLESv2", + "log", + "OpenSLES", + "c++_static" + } + linkoptions { + "-Wl,-soname,libSDL2.so", + } + + if _OPTIONS["SEPARATE_BIN"]~="1" then + if _OPTIONS["PLATFORM"]=="arm" then + targetdir(MAME_DIR .. "android-project/app/src/main/libs/armeabi-v7a") + end + if _OPTIONS["PLATFORM"]=="arm64" then + targetdir(MAME_DIR .. "android-project/app/src/main/libs/arm64-v8a") + end + if _OPTIONS["PLATFORM"]=="x86" then + targetdir(MAME_DIR .. "android-project/app/src/main/libs/x86") + end + if _OPTIONS["PLATFORM"]=="x64" then + targetdir(MAME_DIR .. "android-project/app/src/main/libs/x86_64") + end + end + + strip() +else + kind "StaticLib" +end + + files { + MAME_DIR .. "3rdparty/SDL2/include/begin_code.h", + MAME_DIR .. "3rdparty/SDL2/include/close_code.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_assert.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_atomic.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_audio.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_bits.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_blendmode.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_clipboard.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_config.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_config_windows.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_copying.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_cpuinfo.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_egl.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_endian.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_error.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_events.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_filesystem.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_gamecontroller.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_gesture.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_haptic.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_hints.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_joystick.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_keyboard.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_keycode.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_loadso.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_log.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_main.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_messagebox.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_mouse.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_mutex.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_name.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_opengl.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_opengl_glext.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_opengles.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_opengles2.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_opengles2_gl2.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_opengles2_gl2ext.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_opengles2_gl2platform.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_opengles2_khrplatform.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_pixels.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_platform.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_power.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_quit.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_rect.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_render.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_revision.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_rwops.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_scancode.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_shape.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_stdinc.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_surface.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_system.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_syswm.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_test.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_test_assert.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_test_common.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_test_compare.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_test_crc32.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_test_font.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_test_fuzzer.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_test_harness.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_test_images.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_test_log.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_test_md5.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_test_random.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_thread.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_timer.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_touch.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_types.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_version.h", + MAME_DIR .. "3rdparty/SDL2/include/SDL_video.h", + + + MAME_DIR .. "3rdparty/SDL2/src/atomic/SDL_atomic.c", + MAME_DIR .. "3rdparty/SDL2/src/atomic/SDL_spinlock.c", + MAME_DIR .. "3rdparty/SDL2/src/audio/disk/SDL_diskaudio.c", + MAME_DIR .. "3rdparty/SDL2/src/audio/disk/SDL_diskaudio.h", + MAME_DIR .. "3rdparty/SDL2/src/audio/dummy/SDL_dummyaudio.c", + MAME_DIR .. "3rdparty/SDL2/src/audio/dummy/SDL_dummyaudio.h", + MAME_DIR .. "3rdparty/SDL2/src/audio/SDL_audio.c", + MAME_DIR .. "3rdparty/SDL2/src/audio/SDL_audio_c.h", + MAME_DIR .. "3rdparty/SDL2/src/audio/SDL_audiocvt.c", + MAME_DIR .. "3rdparty/SDL2/src/audio/SDL_audiodev.c", + MAME_DIR .. "3rdparty/SDL2/src/audio/SDL_audiodev_c.h", + MAME_DIR .. "3rdparty/SDL2/src/audio/SDL_audiotypecvt.c", + MAME_DIR .. "3rdparty/SDL2/src/audio/SDL_mixer.c", + MAME_DIR .. "3rdparty/SDL2/src/audio/SDL_sysaudio.h", + MAME_DIR .. "3rdparty/SDL2/src/audio/SDL_wave.c", + MAME_DIR .. "3rdparty/SDL2/src/audio/SDL_wave.h", + MAME_DIR .. "3rdparty/SDL2/src/cpuinfo/SDL_cpuinfo.c", + MAME_DIR .. "3rdparty/SDL2/src/dynapi/SDL_dynapi.c", + MAME_DIR .. "3rdparty/SDL2/src/dynapi/SDL_dynapi.h", + MAME_DIR .. "3rdparty/SDL2/src/dynapi/SDL_dynapi_overrides.h", + MAME_DIR .. "3rdparty/SDL2/src/dynapi/SDL_dynapi_procs.h", + MAME_DIR .. "3rdparty/SDL2/src/events/blank_cursor.h", + MAME_DIR .. "3rdparty/SDL2/src/events/default_cursor.h", + MAME_DIR .. "3rdparty/SDL2/src/events/SDL_clipboardevents.c", + MAME_DIR .. "3rdparty/SDL2/src/events/SDL_clipboardevents_c.h", + MAME_DIR .. "3rdparty/SDL2/src/events/SDL_dropevents.c", + MAME_DIR .. "3rdparty/SDL2/src/events/SDL_dropevents_c.h", + MAME_DIR .. "3rdparty/SDL2/src/events/SDL_events.c", + MAME_DIR .. "3rdparty/SDL2/src/events/SDL_events_c.h", + MAME_DIR .. "3rdparty/SDL2/src/events/SDL_gesture.c", + MAME_DIR .. "3rdparty/SDL2/src/events/SDL_gesture_c.h", + MAME_DIR .. "3rdparty/SDL2/src/events/SDL_keyboard.c", + MAME_DIR .. "3rdparty/SDL2/src/events/SDL_keyboard_c.h", + MAME_DIR .. "3rdparty/SDL2/src/events/SDL_mouse.c", + MAME_DIR .. "3rdparty/SDL2/src/events/SDL_mouse_c.h", + MAME_DIR .. "3rdparty/SDL2/src/events/SDL_quit.c", + MAME_DIR .. "3rdparty/SDL2/src/events/SDL_sysevents.h", + MAME_DIR .. "3rdparty/SDL2/src/events/SDL_touch.c", + MAME_DIR .. "3rdparty/SDL2/src/events/SDL_touch_c.h", + MAME_DIR .. "3rdparty/SDL2/src/events/SDL_windowevents.c", + MAME_DIR .. "3rdparty/SDL2/src/events/SDL_windowevents_c.h", + MAME_DIR .. "3rdparty/SDL2/src/file/SDL_rwops.c", + MAME_DIR .. "3rdparty/SDL2/src/haptic/SDL_haptic.c", + MAME_DIR .. "3rdparty/SDL2/src/haptic/SDL_syshaptic.h", + MAME_DIR .. "3rdparty/SDL2/src/joystick/SDL_gamecontroller.c", + MAME_DIR .. "3rdparty/SDL2/src/joystick/SDL_joystick.c", + MAME_DIR .. "3rdparty/SDL2/src/joystick/SDL_joystick_c.h", + MAME_DIR .. "3rdparty/SDL2/src/joystick/SDL_sysjoystick.h", + MAME_DIR .. "3rdparty/SDL2/src/loadso/windows/SDL_sysloadso.c", + MAME_DIR .. "3rdparty/SDL2/src/power/SDL_power.c", + MAME_DIR .. "3rdparty/SDL2/src/power/windows/SDL_syspower.c", + MAME_DIR .. "3rdparty/SDL2/src/render/direct3d/SDL_render_d3d.c", + MAME_DIR .. "3rdparty/SDL2/src/render/direct3d11/SDL_render_d3d11.c", + MAME_DIR .. "3rdparty/SDL2/src/render/mmx.h", + MAME_DIR .. "3rdparty/SDL2/src/render/opengl/SDL_render_gl.c", + MAME_DIR .. "3rdparty/SDL2/src/render/opengl/SDL_shaders_gl.c", + MAME_DIR .. "3rdparty/SDL2/src/render/opengl/SDL_shaders_gl.h", + MAME_DIR .. "3rdparty/SDL2/src/render/opengles2/SDL_render_gles2.c", + MAME_DIR .. "3rdparty/SDL2/src/render/opengles2/SDL_shaders_gles2.c", + MAME_DIR .. "3rdparty/SDL2/src/render/SDL_d3dmath.c", + MAME_DIR .. "3rdparty/SDL2/src/render/SDL_d3dmath.h", + MAME_DIR .. "3rdparty/SDL2/src/render/SDL_render.c", + MAME_DIR .. "3rdparty/SDL2/src/render/SDL_sysrender.h", + MAME_DIR .. "3rdparty/SDL2/src/render/SDL_yuv_mmx.c", + MAME_DIR .. "3rdparty/SDL2/src/render/SDL_yuv_sw.c", + MAME_DIR .. "3rdparty/SDL2/src/render/SDL_yuv_sw_c.h", + MAME_DIR .. "3rdparty/SDL2/src/render/software/SDL_blendfillrect.c", + MAME_DIR .. "3rdparty/SDL2/src/render/software/SDL_blendfillrect.h", + MAME_DIR .. "3rdparty/SDL2/src/render/software/SDL_blendline.c", + MAME_DIR .. "3rdparty/SDL2/src/render/software/SDL_blendline.h", + MAME_DIR .. "3rdparty/SDL2/src/render/software/SDL_blendpoint.c", + MAME_DIR .. "3rdparty/SDL2/src/render/software/SDL_blendpoint.h", + MAME_DIR .. "3rdparty/SDL2/src/render/software/SDL_draw.h", + MAME_DIR .. "3rdparty/SDL2/src/render/software/SDL_drawline.c", + MAME_DIR .. "3rdparty/SDL2/src/render/software/SDL_drawline.h", + MAME_DIR .. "3rdparty/SDL2/src/render/software/SDL_drawpoint.c", + MAME_DIR .. "3rdparty/SDL2/src/render/software/SDL_drawpoint.h", + MAME_DIR .. "3rdparty/SDL2/src/render/software/SDL_render_sw.c", + MAME_DIR .. "3rdparty/SDL2/src/render/software/SDL_render_sw_c.h", + MAME_DIR .. "3rdparty/SDL2/src/render/software/SDL_rotate.c", + MAME_DIR .. "3rdparty/SDL2/src/render/software/SDL_rotate.h", + MAME_DIR .. "3rdparty/SDL2/src/SDL.c", + MAME_DIR .. "3rdparty/SDL2/src/SDL_assert.c", + MAME_DIR .. "3rdparty/SDL2/src/SDL_error.c", + MAME_DIR .. "3rdparty/SDL2/src/SDL_error_c.h", + MAME_DIR .. "3rdparty/SDL2/src/SDL_hints.c", + MAME_DIR .. "3rdparty/SDL2/src/SDL_hints_c.h", + MAME_DIR .. "3rdparty/SDL2/src/SDL_log.c", + MAME_DIR .. "3rdparty/SDL2/src/stdlib/SDL_getenv.c", + MAME_DIR .. "3rdparty/SDL2/src/stdlib/SDL_iconv.c", + MAME_DIR .. "3rdparty/SDL2/src/stdlib/SDL_malloc.c", + MAME_DIR .. "3rdparty/SDL2/src/stdlib/SDL_qsort.c", + MAME_DIR .. "3rdparty/SDL2/src/stdlib/SDL_stdlib.c", + MAME_DIR .. "3rdparty/SDL2/src/stdlib/SDL_string.c", + MAME_DIR .. "3rdparty/SDL2/src/thread/SDL_systhread.h", + MAME_DIR .. "3rdparty/SDL2/src/thread/SDL_thread.c", + MAME_DIR .. "3rdparty/SDL2/src/thread/SDL_thread_c.h", + MAME_DIR .. "3rdparty/SDL2/src/timer/SDL_systimer.h", + MAME_DIR .. "3rdparty/SDL2/src/timer/SDL_timer.c", + MAME_DIR .. "3rdparty/SDL2/src/timer/SDL_timer_c.h", + MAME_DIR .. "3rdparty/SDL2/src/video/dummy/SDL_nullevents.c", + MAME_DIR .. "3rdparty/SDL2/src/video/dummy/SDL_nullevents_c.h", + MAME_DIR .. "3rdparty/SDL2/src/video/dummy/SDL_nullframebuffer.c", + MAME_DIR .. "3rdparty/SDL2/src/video/dummy/SDL_nullframebuffer_c.h", + MAME_DIR .. "3rdparty/SDL2/src/video/dummy/SDL_nullvideo.c", + MAME_DIR .. "3rdparty/SDL2/src/video/dummy/SDL_nullvideo.h", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_blit.c", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_blit.h", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_blit_0.c", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_blit_1.c", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_blit_A.c", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_blit_auto.c", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_blit_auto.h", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_blit_copy.c", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_blit_copy.h", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_blit_N.c", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_blit_slow.c", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_blit_slow.h", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_bmp.c", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_clipboard.c", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_egl.c", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_fillrect.c", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_glesfuncs.h", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_glfuncs.h", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_pixels.c", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_pixels_c.h", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_rect.c", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_rect_c.h", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_RLEaccel.c", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_RLEaccel_c.h", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_shape.c", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_shape_internals.h", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_stretch.c", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_surface.c", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_sysvideo.h", + MAME_DIR .. "3rdparty/SDL2/src/video/SDL_video.c", + + } + if _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="windows" then + files { + MAME_DIR .. "3rdparty/SDL2/src/libm/e_atan2.c", + MAME_DIR .. "3rdparty/SDL2/src/libm/e_log.c", + MAME_DIR .. "3rdparty/SDL2/src/libm/e_pow.c", + MAME_DIR .. "3rdparty/SDL2/src/libm/e_rem_pio2.c", + MAME_DIR .. "3rdparty/SDL2/src/libm/e_sqrt.c", + MAME_DIR .. "3rdparty/SDL2/src/libm/k_cos.c", + MAME_DIR .. "3rdparty/SDL2/src/libm/k_rem_pio2.c", + MAME_DIR .. "3rdparty/SDL2/src/libm/k_sin.c", + MAME_DIR .. "3rdparty/SDL2/src/libm/k_tan.c", + MAME_DIR .. "3rdparty/SDL2/src/libm/math.h", + MAME_DIR .. "3rdparty/SDL2/src/libm/math_private.h", + MAME_DIR .. "3rdparty/SDL2/src/libm/s_atan.c", + MAME_DIR .. "3rdparty/SDL2/src/libm/s_copysign.c", + MAME_DIR .. "3rdparty/SDL2/src/libm/s_cos.c", + MAME_DIR .. "3rdparty/SDL2/src/libm/s_fabs.c", + MAME_DIR .. "3rdparty/SDL2/src/libm/s_floor.c", + MAME_DIR .. "3rdparty/SDL2/src/libm/s_scalbn.c", + MAME_DIR .. "3rdparty/SDL2/src/libm/s_sin.c", + MAME_DIR .. "3rdparty/SDL2/src/libm/s_tan.c", + } + end + if _OPTIONS["targetos"]~="windows" then + files { + MAME_DIR .. "3rdparty/SDL2/src/render/opengles/SDL_render_gles.c", + MAME_DIR .. "3rdparty/SDL2/src/render/opengles/SDL_glesfuncs.h", + } + end + + if _OPTIONS["targetos"]=="android" then + files { + MAME_DIR .. "3rdparty/SDL2/src/audio/android/opensl_io.h", + MAME_DIR .. "3rdparty/SDL2/src/audio/android/opensl_io.c", + MAME_DIR .. "3rdparty/SDL2/src/audio/android/SDL_androidaudio.h", + MAME_DIR .. "3rdparty/SDL2/src/audio/android/SDL_androidaudio.c", + MAME_DIR .. "3rdparty/SDL2/src/core/android/SDL_android.c", + MAME_DIR .. "3rdparty/SDL2/src/core/android/SDL_android.h", + MAME_DIR .. "3rdparty/SDL2/src/filesystem/android/SDL_sysfilesystem.c", + MAME_DIR .. "3rdparty/SDL2/src/haptic/dummy/SDL_syshaptic.c", + MAME_DIR .. "3rdparty/SDL2/src/joystick/android/SDL_sysjoystick.c", + MAME_DIR .. "3rdparty/SDL2/src/loadso/dlopen/SDL_sysloadso.c", + MAME_DIR .. "3rdparty/SDL2/src/power/android/SDL_syspower.c", + MAME_DIR .. "3rdparty/SDL2/src/thread/pthread/SDL_syscond.c", + MAME_DIR .. "3rdparty/SDL2/src/thread/pthread/SDL_sysmutex.c", + MAME_DIR .. "3rdparty/SDL2/src/thread/pthread/SDL_sysmutex_c.h", + MAME_DIR .. "3rdparty/SDL2/src/thread/pthread/SDL_syssem.c", + MAME_DIR .. "3rdparty/SDL2/src/thread/pthread/SDL_systhread.c", + MAME_DIR .. "3rdparty/SDL2/src/thread/pthread/SDL_systhread_c.h", + MAME_DIR .. "3rdparty/SDL2/src/thread/pthread/SDL_systls.c", + MAME_DIR .. "3rdparty/SDL2/src/timer/unix/SDL_systimer.c", + MAME_DIR .. "3rdparty/SDL2/src/timer/unix/SDL_systimer_c.h", + MAME_DIR .. "3rdparty/SDL2/src/video/android/SDL_androidclipboard.c", + MAME_DIR .. "3rdparty/SDL2/src/video/android/SDL_androidclipboard.h", + MAME_DIR .. "3rdparty/SDL2/src/video/android/SDL_androidevents.c", + MAME_DIR .. "3rdparty/SDL2/src/video/android/SDL_androidevents.h", + MAME_DIR .. "3rdparty/SDL2/src/video/android/SDL_androidgl.c", + MAME_DIR .. "3rdparty/SDL2/src/video/android/SDL_androidkeyboard.c", + MAME_DIR .. "3rdparty/SDL2/src/video/android/SDL_androidkeyboard.h", + MAME_DIR .. "3rdparty/SDL2/src/video/android/SDL_androidmessagebox.c", + MAME_DIR .. "3rdparty/SDL2/src/video/android/SDL_androidmessagebox.h", + MAME_DIR .. "3rdparty/SDL2/src/video/android/SDL_androidmouse.c", + MAME_DIR .. "3rdparty/SDL2/src/video/android/SDL_androidmouse.h", + MAME_DIR .. "3rdparty/SDL2/src/video/android/SDL_androidtouch.c", + MAME_DIR .. "3rdparty/SDL2/src/video/android/SDL_androidtouch.h", + MAME_DIR .. "3rdparty/SDL2/src/video/android/SDL_androidvideo.c", + MAME_DIR .. "3rdparty/SDL2/src/video/android/SDL_androidvideo.h", + MAME_DIR .. "3rdparty/SDL2/src/video/android/SDL_androidwindow.c", + MAME_DIR .. "3rdparty/SDL2/src/video/android/SDL_androidwindow.h", + } + end + + if _OPTIONS["targetos"]=="macosx" then + files { + MAME_DIR .. "3rdparty/SDL2/src/audio/coreaudio/SDL_coreaudio.m", + MAME_DIR .. "3rdparty/SDL2/src/audio/coreaudio/SDL_coreaudio.h", + MAME_DIR .. "3rdparty/SDL2/src/file/cocoa/SDL_rwopsbundlesupport.m", + MAME_DIR .. "3rdparty/SDL2/src/file/cocoa/SDL_rwopsbundlesupport.h", + MAME_DIR .. "3rdparty/SDL2/src/filesystem/cocoa/SDL_sysfilesystem.m", + MAME_DIR .. "3rdparty/SDL2/src/haptic/darwin/SDL_syshaptic.c", + MAME_DIR .. "3rdparty/SDL2/src/haptic/darwin/SDL_syshaptic_c.h", + MAME_DIR .. "3rdparty/SDL2/src/joystick/darwin/SDL_sysjoystick.c", + MAME_DIR .. "3rdparty/SDL2/src/joystick/darwin/SDL_sysjoystick_c.h", + MAME_DIR .. "3rdparty/SDL2/src/loadso/dlopen/SDL_sysloadso.c", + MAME_DIR .. "3rdparty/SDL2/src/power/macosx/SDL_syspower.c", + MAME_DIR .. "3rdparty/SDL2/src/thread/pthread/SDL_syscond.c", + MAME_DIR .. "3rdparty/SDL2/src/thread/pthread/SDL_sysmutex.c", + MAME_DIR .. "3rdparty/SDL2/src/thread/pthread/SDL_sysmutex_c.h", + MAME_DIR .. "3rdparty/SDL2/src/thread/pthread/SDL_syssem.c", + MAME_DIR .. "3rdparty/SDL2/src/thread/pthread/SDL_systhread.c", + MAME_DIR .. "3rdparty/SDL2/src/thread/pthread/SDL_systhread_c.h", + MAME_DIR .. "3rdparty/SDL2/src/thread/pthread/SDL_systls.c", + MAME_DIR .. "3rdparty/SDL2/src/timer/unix/SDL_systimer.c", + MAME_DIR .. "3rdparty/SDL2/src/video/cocoa/SDL_cocoaclipboard.m", + MAME_DIR .. "3rdparty/SDL2/src/video/cocoa/SDL_cocoaclipboard.h", + MAME_DIR .. "3rdparty/SDL2/src/video/cocoa/SDL_cocoaevents.m", + MAME_DIR .. "3rdparty/SDL2/src/video/cocoa/SDL_cocoaevents.h", + MAME_DIR .. "3rdparty/SDL2/src/video/cocoa/SDL_cocoakeyboard.m", + MAME_DIR .. "3rdparty/SDL2/src/video/cocoa/SDL_cocoakeyboard.h", + MAME_DIR .. "3rdparty/SDL2/src/video/cocoa/SDL_cocoamessagebox.m", + MAME_DIR .. "3rdparty/SDL2/src/video/cocoa/SDL_cocoamessagebox.h", + MAME_DIR .. "3rdparty/SDL2/src/video/cocoa/SDL_cocoamodes.m", + MAME_DIR .. "3rdparty/SDL2/src/video/cocoa/SDL_cocoamodes.h", + MAME_DIR .. "3rdparty/SDL2/src/video/cocoa/SDL_cocoamouse.m", + MAME_DIR .. "3rdparty/SDL2/src/video/cocoa/SDL_cocoamouse.h", + MAME_DIR .. "3rdparty/SDL2/src/video/cocoa/SDL_cocoamousetap.m", + MAME_DIR .. "3rdparty/SDL2/src/video/cocoa/SDL_cocoamousetap.h", + MAME_DIR .. "3rdparty/SDL2/src/video/cocoa/SDL_cocoaopengl.m", + MAME_DIR .. "3rdparty/SDL2/src/video/cocoa/SDL_cocoaopengl.h", + MAME_DIR .. "3rdparty/SDL2/src/video/cocoa/SDL_cocoashape.m", + MAME_DIR .. "3rdparty/SDL2/src/video/cocoa/SDL_cocoashape.h", + MAME_DIR .. "3rdparty/SDL2/src/video/cocoa/SDL_cocoavideo.m", + MAME_DIR .. "3rdparty/SDL2/src/video/cocoa/SDL_cocoavideo.h", + MAME_DIR .. "3rdparty/SDL2/src/video/cocoa/SDL_cocoawindow.m", + MAME_DIR .. "3rdparty/SDL2/src/video/cocoa/SDL_cocoawindow.h", + + } + end + + if _OPTIONS["targetos"]=="windows" then + files { + MAME_DIR .. "3rdparty/SDL2/src/thread/generic/SDL_syscond.c", + MAME_DIR .. "3rdparty/SDL2/src/audio/directsound/SDL_directsound.c", + MAME_DIR .. "3rdparty/SDL2/src/audio/directsound/SDL_directsound.h", + MAME_DIR .. "3rdparty/SDL2/src/audio/winmm/SDL_winmm.c", + MAME_DIR .. "3rdparty/SDL2/src/audio/winmm/SDL_winmm.h", + MAME_DIR .. "3rdparty/SDL2/src/core/windows/SDL_directx.h", + MAME_DIR .. "3rdparty/SDL2/src/core/windows/SDL_windows.c", + MAME_DIR .. "3rdparty/SDL2/src/core/windows/SDL_windows.h", + MAME_DIR .. "3rdparty/SDL2/src/core/windows/SDL_xinput.c", + MAME_DIR .. "3rdparty/SDL2/src/core/windows/SDL_xinput.h", + MAME_DIR .. "3rdparty/SDL2/src/filesystem/windows/SDL_sysfilesystem.c", + MAME_DIR .. "3rdparty/SDL2/src/haptic/windows/SDL_dinputhaptic.c", + MAME_DIR .. "3rdparty/SDL2/src/haptic/windows/SDL_dinputhaptic_c.h", + MAME_DIR .. "3rdparty/SDL2/src/haptic/windows/SDL_windowshaptic.c", + MAME_DIR .. "3rdparty/SDL2/src/haptic/windows/SDL_windowshaptic_c.h", + MAME_DIR .. "3rdparty/SDL2/src/haptic/windows/SDL_xinputhaptic.c", + MAME_DIR .. "3rdparty/SDL2/src/haptic/windows/SDL_xinputhaptic_c.h", + MAME_DIR .. "3rdparty/SDL2/src/joystick/windows/SDL_dinputjoystick.c", + MAME_DIR .. "3rdparty/SDL2/src/joystick/windows/SDL_dinputjoystick_c.h", + MAME_DIR .. "3rdparty/SDL2/src/joystick/windows/SDL_mmjoystick.c", + MAME_DIR .. "3rdparty/SDL2/src/joystick/windows/SDL_windowsjoystick.c", + MAME_DIR .. "3rdparty/SDL2/src/joystick/windows/SDL_windowsjoystick_c.h", + MAME_DIR .. "3rdparty/SDL2/src/joystick/windows/SDL_xinputjoystick.c", + MAME_DIR .. "3rdparty/SDL2/src/joystick/windows/SDL_xinputjoystick_c.h", + MAME_DIR .. "3rdparty/SDL2/src/thread/windows/SDL_sysmutex.c", + MAME_DIR .. "3rdparty/SDL2/src/thread/windows/SDL_syssem.c", + MAME_DIR .. "3rdparty/SDL2/src/thread/windows/SDL_systhread.c", + MAME_DIR .. "3rdparty/SDL2/src/thread/windows/SDL_systhread_c.h", + MAME_DIR .. "3rdparty/SDL2/src/thread/windows/SDL_systls.c", + MAME_DIR .. "3rdparty/SDL2/src/timer/windows/SDL_systimer.c", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_vkeys.h", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_windowsclipboard.c", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_windowsclipboard.h", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_windowsevents.c", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_windowsevents.h", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_windowsframebuffer.c", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_windowsframebuffer.h", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_windowskeyboard.c", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_windowskeyboard.h", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_windowsmessagebox.c", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_windowsmessagebox.h", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_windowsmodes.c", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_windowsmodes.h", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_windowsmouse.c", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_windowsmouse.h", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_windowsopengl.c", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_windowsopengl.h", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_windowsopengles.c", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_windowsshape.c", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_windowsshape.h", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_windowsvideo.c", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_windowsvideo.h", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_windowswindow.c", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/SDL_windowswindow.h", + MAME_DIR .. "3rdparty/SDL2/src/video/windows/wmmsg.h", + MAME_DIR .. "3rdparty/SDL2/src/main/windows/version.rc", + } + end + + configuration { "vs*" } + files { + MAME_DIR .. "3rdparty/SDL2/src/audio/xaudio2/SDL_xaudio2.c", + } + + buildoptions { + "/wd4200", -- warning C4200: nonstandard extension used: zero-sized array in struct/union + "/wd4055", -- warning C4055: 'type cast': from data pointer 'void *' to function pointer 'xxx' + "/wd4152", -- warning C4152: nonstandard extension, function/data pointer conversion in expression + "/wd4057", -- warning C4057: 'function': 'xxx' differs in indirection to slightly different base types from 'xxx' + "/wd4701", -- warning C4701: potentially uninitialized local variable 'xxx' used + "/wd4204", -- warning C4204: nonstandard extension used: non-constant aggregate initializer + "/wd4054", -- warning C4054: 'type cast': from function pointer 'xxx' to data pointer 'xxx' + } + defines { + "HAVE_LIBC", + } + + configuration { "mingw*"} + includedirs { + MAME_DIR .. "3rdparty/SDL2-override/mingw", + MAME_DIR .. "3rdparty/bgfx/3rdparty/khronos", + } + buildoptions_c { + "-Wno-bad-function-cast", + "-Wno-discarded-qualifiers", + "-Wno-format", + "-Wno-format-security", + "-Wno-pointer-to-int-cast", + "-Wno-strict-prototypes", + "-Wno-undef", + "-Wno-unused-but-set-variable", + } + + configuration { "mingw-clang"} + buildoptions_c { + "-Wno-incompatible-pointer-types-discards-qualifiers" + } + + configuration { "osx*"} + buildoptions { + "-Wno-undef", + } + buildoptions_objc { + "-x objective-c", + "-std=c99", + } + + buildoptions_c { + "-Wno-bad-function-cast", + "-Wno-strict-prototypes", + } + + configuration { "android-*"} + defines { + "GL_GLEXT_PROTOTYPES", + } + buildoptions_c { + "-Wno-bad-function-cast", + "-Wno-incompatible-pointer-types-discards-qualifiers", + "-Wno-unneeded-internal-declaration", + "-Wno-unused-const-variable", + } + + configuration { } + includedirs { + MAME_DIR .. "3rdparty/SDL2/include", + } + +end + + +-------------------------------------------------- +-- linenoise library +-------------------------------------------------- + +project "linenoise" + uuid "7320ffc8-2748-4add-8864-ae29b72a8511" + kind (LIBTYPE) + + addprojectflags() + + configuration { "vs*" } + buildoptions { + "/wd4701", -- warning C4701: potentially uninitialized local variable 'xxx' used + } + + configuration { } + + includedirs { + MAME_DIR .. "3rdparty/linenoise", + } + + files { + MAME_DIR .. "3rdparty/linenoise/utf8.c", + MAME_DIR .. "3rdparty/linenoise/linenoise.c", + } + + +-------------------------------------------------- +-- utf8proc library objects +-------------------------------------------------- + +if not _OPTIONS["with-system-utf8proc"] then +project "utf8proc" + uuid "1f881f09-0395-4483-ac37-2935fb092187" + kind "StaticLib" + + defines { + "UTF8PROC_STATIC", + } + + configuration "Debug" + defines { + "verbose=-1", + } + + configuration { "gmake or ninja" } + buildoptions_c { + "-Wno-strict-prototypes", + } + + configuration { } + + files { + MAME_DIR .. "3rdparty/utf8proc/utf8proc.c" + } +else +links { + ext_lib("utf8proc"), +} +end + + +-------------------------------------------------- +-- wdlfft library objects (from Cockos WDL) +-------------------------------------------------- + +project "wdlfft" + uuid "74ca017e-fa0d-48b8-81d6-8081a37be14c" + kind "StaticLib" + + configuration { "gmake or ninja" } + buildoptions_c { + "-Wno-strict-prototypes", + } + + configuration { } + + files { + MAME_DIR .. "3rdparty/wdlfft/fft.c", + MAME_DIR .. "3rdparty/wdlfft/fft.h" + } + + +-------------------------------------------------- +-- ymfm library objects +-------------------------------------------------- + +project "ymfm" + uuid "2403a536-cb0a-4b50-b41f-10c17917689b" + kind "StaticLib" + + configuration { } + defines { + "YMFM_MAME", + } + + files { + MAME_DIR .. "3rdparty/ymfm/src/ymfm.h", + MAME_DIR .. "3rdparty/ymfm/src/ymfm_adpcm.cpp", + MAME_DIR .. "3rdparty/ymfm/src/ymfm_adpcm.h", + MAME_DIR .. "3rdparty/ymfm/src/ymfm_fm.h", + MAME_DIR .. "3rdparty/ymfm/src/ymfm_fm.ipp", + MAME_DIR .. "3rdparty/ymfm/src/ymfm_misc.cpp", + MAME_DIR .. "3rdparty/ymfm/src/ymfm_misc.h", + MAME_DIR .. "3rdparty/ymfm/src/ymfm_opl.cpp", + MAME_DIR .. "3rdparty/ymfm/src/ymfm_opl.h", + MAME_DIR .. "3rdparty/ymfm/src/ymfm_opm.cpp", + MAME_DIR .. "3rdparty/ymfm/src/ymfm_opm.h", + MAME_DIR .. "3rdparty/ymfm/src/ymfm_opn.cpp", + MAME_DIR .. "3rdparty/ymfm/src/ymfm_opn.h", + MAME_DIR .. "3rdparty/ymfm/src/ymfm_opq.cpp", + MAME_DIR .. "3rdparty/ymfm/src/ymfm_opq.h", + MAME_DIR .. "3rdparty/ymfm/src/ymfm_opz.cpp", + MAME_DIR .. "3rdparty/ymfm/src/ymfm_opz.h", + MAME_DIR .. "3rdparty/ymfm/src/ymfm_pcm.cpp", + MAME_DIR .. "3rdparty/ymfm/src/ymfm_pcm.h", + MAME_DIR .. "3rdparty/ymfm/src/ymfm_ssg.cpp", + MAME_DIR .. "3rdparty/ymfm/src/ymfm_ssg.h", + } + + +-------------------------------------------------- +-- asmjit library +-------------------------------------------------- + +if not _OPTIONS["FORCE_DRC_C_BACKEND"] then +project "asmjit" + uuid "4539757c-6e99-4bae-b3d0-b342a7c49539" + kind "StaticLib" + + configuration { "gmake" } + buildoptions { + "-Wno-unused-but-set-variable", + } + + configuration { } + + if _OPTIONS["targetos"]=="macosx" and _OPTIONS["gcc"]~=nil then + if string.find(_OPTIONS["gcc"], "clang") and (version < 80000) then + defines { + "TARGET_OS_OSX=1", + } + end + end + + files { + MAME_DIR .. "3rdparty/asmjit/src/asmjit/asmjit.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/api-build_p.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/api-config.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/arch.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/arch.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/assembler.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/assembler.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/builder.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/builder.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/callconv.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/callconv.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/codebuffer.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/codebufferwriter_p.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/codeholder.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/codeholder.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/compiler.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/compiler.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/constpool.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/constpool.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/cpuinfo.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/cpuinfo.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/datatypes.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/emitter.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/emitter.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/emitterutils.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/emitterutils_p.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/environment.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/environment.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/errorhandler.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/errorhandler.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/features.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/formatter.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/formatter.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/func.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/func.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/globals.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/globals.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/inst.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/inst.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/jitallocator.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/jitallocator.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/jitruntime.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/jitruntime.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/logger.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/logger.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/misc_p.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/operand.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/operand.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/osutils.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/osutils.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/osutils_p.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/raassignment_p.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/rabuilders_p.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/radefs_p.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/ralocal.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/ralocal_p.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/rapass.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/rapass_p.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/rastack.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/rastack_p.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/string.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/string.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/support.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/support.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/target.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/target.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/type.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/type.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/virtmem.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/virtmem.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/zone.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/zone.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/zonehash.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/zonehash.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/zonelist.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/zonelist.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/zonestack.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/zonestack.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/zonestring.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/zonetree.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/zonetree.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/zonevector.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/core/zonevector.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86archdata.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86archdata_p.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86assembler.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86assembler.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86builder.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86builder.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86callconv.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86callconv_p.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86compiler.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86compiler.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86emitter.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86features.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86features.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86formatter.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86formatter_p.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86globals.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86instapi.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86instapi_p.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86instdb.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86instdb.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86instdb_p.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86internal.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86internal_p.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86opcode_p.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86operand.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86operand.h", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86rapass.cpp", + MAME_DIR .. "3rdparty/asmjit/src/asmjit/x86/x86rapass_p.h", + } +end diff --git a/unused/scripts/src/osd/mac.lua b/unused/scripts/src/osd/mac.lua new file mode 100644 index 0000000..4b3967b --- /dev/null +++ b/unused/scripts/src/osd/mac.lua @@ -0,0 +1,177 @@ +-- license:BSD-3-Clause +-- copyright-holders:MAMEdev Team + +--------------------------------------------------------------------------- +-- +-- mac.lua +-- +-- Rules for the building with SDL +-- +--------------------------------------------------------------------------- + +dofile("modules.lua") + + +function maintargetosdoptions(_target,_subtarget) + osdmodulestargetconf() + + configuration { } +end + +BASE_TARGETOS = "unix" + +local os_version = str_to_version(backtick("sw_vers -productVersion")) +links { + "Cocoa.framework", +} +linkoptions { + "-framework QuartzCore", + "-framework OpenGL", +} +if os_version>=101100 then + linkoptions { + "-weak_framework Metal", + } +end + +project ("qtdbg_" .. _OPTIONS["osd"]) + uuid (os.uuid("qtdbg_" .. _OPTIONS["osd"])) + kind (LIBTYPE) + + dofile("mac_cfg.lua") + includedirs { + MAME_DIR .. "src/emu", + MAME_DIR .. "src/devices", -- accessing imagedev from debugger + MAME_DIR .. "src/osd", + MAME_DIR .. "src/lib", + MAME_DIR .. "src/lib/util", + MAME_DIR .. "src/osd/modules/render", + MAME_DIR .. "3rdparty", + } + configuration { "linux-* or freebsd" } + buildoptions { + "-fPIC", + } + configuration { } + + qtdebuggerbuild() + +project ("osd_" .. _OPTIONS["osd"]) + targetsubdir(_OPTIONS["target"] .."_" .._OPTIONS["subtarget"]) + uuid (os.uuid("osd_" .. _OPTIONS["osd"])) + kind (LIBTYPE) + + dofile("mac_cfg.lua") + osdmodulesbuild() + + includedirs { + MAME_DIR .. "src/emu", + MAME_DIR .. "src/devices", -- accessing imagedev from debugger + MAME_DIR .. "src/osd", + MAME_DIR .. "src/lib", + MAME_DIR .. "src/lib/util", + MAME_DIR .. "src/osd/modules/file", + MAME_DIR .. "src/osd/modules/render", + MAME_DIR .. "3rdparty", + MAME_DIR .. "src/osd/mac", + } + + files { + MAME_DIR .. "src/osd/modules/debugger/debugosx.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/breakpointsview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/breakpointsview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/consoleview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/consoleview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/debugcommandhistory.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/debugcommandhistory.h", + MAME_DIR .. "src/osd/modules/debugger/osx/debugconsole.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/debugconsole.h", + MAME_DIR .. "src/osd/modules/debugger/osx/debugview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/debugview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/debugwindowhandler.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/debugwindowhandler.h", + MAME_DIR .. "src/osd/modules/debugger/osx/deviceinfoviewer.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/deviceinfoviewer.h", + MAME_DIR .. "src/osd/modules/debugger/osx/devicesviewer.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/devicesviewer.h", + MAME_DIR .. "src/osd/modules/debugger/osx/disassemblyview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/disassemblyviewer.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/disassemblyviewer.h", + MAME_DIR .. "src/osd/modules/debugger/osx/errorlogview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/errorlogview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/disassemblyview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/errorlogviewer.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/errorlogviewer.h", + MAME_DIR .. "src/osd/modules/debugger/osx/memoryview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/memoryview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/memoryviewer.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/memoryviewer.h", + MAME_DIR .. "src/osd/modules/debugger/osx/pointsviewer.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/pointsviewer.h", + MAME_DIR .. "src/osd/modules/debugger/osx/registerpointsview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/registerpointsview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/registersview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/registersview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/watchpointsview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/watchpointsview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/debugosx.h", + } + + files { + MAME_DIR .. "src/osd/mac/main.mm", + MAME_DIR .. "src/osd/mac/macmain.cpp", + MAME_DIR .. "src/osd/mac/appdelegate.mm", + MAME_DIR .. "src/osd/mac/appdelegate.h", + MAME_DIR .. "src/osd/mac/video.cpp", + MAME_DIR .. "src/osd/mac/window.cpp", + MAME_DIR .. "src/osd/mac/window.h", + MAME_DIR .. "src/osd/mac/windowcontroller.mm", + MAME_DIR .. "src/osd/mac/windowcontroller.h", + MAME_DIR .. "src/osd/mac/mamefswindow.mm", + MAME_DIR .. "src/osd/mac/mamefswindow.h", + MAME_DIR .. "src/osd/mac/oglview.mm", + MAME_DIR .. "src/osd/mac/oglview.h", + MAME_DIR .. "src/osd/modules/osdwindow.cpp", + MAME_DIR .. "src/osd/modules/osdwindow.h", + } + + +project ("ocore_" .. _OPTIONS["osd"]) + targetsubdir(_OPTIONS["target"] .."_" .. _OPTIONS["subtarget"]) + uuid (os.uuid("ocore_" .. _OPTIONS["osd"])) + kind (LIBTYPE) + + removeflags { + "SingleOutputDir", + } + + dofile("mac_cfg.lua") + + includedirs { + MAME_DIR .. "src/emu", + MAME_DIR .. "src/osd", + MAME_DIR .. "src/lib", + MAME_DIR .. "src/lib/util", + MAME_DIR .. "src/osd/mac", + } + + files { + MAME_DIR .. "src/osd/osdcore.cpp", + MAME_DIR .. "src/osd/osdcore.h", + MAME_DIR .. "src/osd/osdfile.h", + MAME_DIR .. "src/osd/strconv.cpp", + MAME_DIR .. "src/osd/strconv.h", + MAME_DIR .. "src/osd/osdsync.cpp", + MAME_DIR .. "src/osd/osdsync.h", + MAME_DIR .. "src/osd/modules/osdmodule.cpp", + MAME_DIR .. "src/osd/modules/osdmodule.h", + MAME_DIR .. "src/osd/modules/lib/osdlib_macosx.cpp", + MAME_DIR .. "src/osd/modules/lib/osdlib.h", + MAME_DIR .. "src/osd/modules/file/posixdir.cpp", + MAME_DIR .. "src/osd/modules/file/posixfile.cpp", + MAME_DIR .. "src/osd/modules/file/posixfile.h", + MAME_DIR .. "src/osd/modules/file/posixptty.cpp", + MAME_DIR .. "src/osd/modules/file/posixsocket.cpp", + } + + diff --git a/unused/scripts/src/osd/mac_cfg.lua b/unused/scripts/src/osd/mac_cfg.lua new file mode 100644 index 0000000..e75c8d0 --- /dev/null +++ b/unused/scripts/src/osd/mac_cfg.lua @@ -0,0 +1,40 @@ +-- license:BSD-3-Clause +-- copyright-holders:MAMEdev Team + +dofile('modules.lua') + +forcedincludes { +-- MAME_DIR .. "src/osd/sdl/sdlprefix.h" +} + +if _OPTIONS["USE_TAPTUN"]=="1" or _OPTIONS["USE_PCAP"]=="1" then + defines { + "USE_NETWORK", + } + if _OPTIONS["USE_TAPTUN"]=="1" then + defines { + "OSD_NET_USE_TAPTUN", + } + end + if _OPTIONS["USE_PCAP"]=="1" then + defines { + "OSD_NET_USE_PCAP", + } + end +end + +defines { + "OSD_MAC", + "SDLMAME_UNIX", + "SDLMAME_MACOSX", + "SDLMAME_DARWIN" +} + +configuration { "osx*" } + includedirs { + MAME_DIR .. "3rdparty/bx/include/compat/osx", + } + + +configuration { } + diff --git a/unused/scripts/src/osd/modules.lua b/unused/scripts/src/osd/modules.lua new file mode 100644 index 0000000..e431bb9 --- /dev/null +++ b/unused/scripts/src/osd/modules.lua @@ -0,0 +1,660 @@ +-- license:BSD-3-Clause +-- copyright-holders:MAMEdev Team + +--------------------------------------------------------------------------- +-- +-- modules.lua +-- +-- Rules for the building of modules +-- +--------------------------------------------------------------------------- + +function string.starts(String,Start) + return string.sub(String,1,string.len(Start))==Start +end + +function addlibfromstring(str) + if (str==nil) then return end + for w in str:gmatch("%S+") do + if string.starts(w,"-l")==true then + links { + string.sub(w,3) + } + end + end +end + +function addoptionsfromstring(str) + if (str==nil) then return end + for w in str:gmatch("%S+") do + if string.starts(w,"-l")==false then + linkoptions { + w + } + end + end +end + +function pkgconfigcmd() + local pkgconfig = os.getenv("PKG_CONFIG") + if pkgconfig == nil then + return "pkg-config" + end + return pkgconfig +end + +function osdmodulesbuild() + + removeflags { + "SingleOutputDir", + } + + files { + MAME_DIR .. "src/osd/osdnet.cpp", + MAME_DIR .. "src/osd/osdnet.h", + MAME_DIR .. "src/osd/watchdog.cpp", + MAME_DIR .. "src/osd/watchdog.h", + MAME_DIR .. "src/osd/modules/debugger/debug_module.h", + MAME_DIR .. "src/osd/modules/font/font_module.h", + MAME_DIR .. "src/osd/modules/midi/midi_module.h", + MAME_DIR .. "src/osd/modules/netdev/netdev_module.h", + MAME_DIR .. "src/osd/modules/sound/sound_module.h", + MAME_DIR .. "src/osd/modules/diagnostics/diagnostics_module.h", + MAME_DIR .. "src/osd/modules/monitor/monitor_module.h", + MAME_DIR .. "src/osd/modules/lib/osdobj_common.cpp", + MAME_DIR .. "src/osd/modules/lib/osdobj_common.h", + MAME_DIR .. "src/osd/modules/diagnostics/none.cpp", + MAME_DIR .. "src/osd/modules/diagnostics/diagnostics_win32.cpp", + MAME_DIR .. "src/osd/modules/debugger/none.cpp", + MAME_DIR .. "src/osd/modules/debugger/debugwin.cpp", + MAME_DIR .. "src/osd/modules/debugger/debugimgui.cpp", + MAME_DIR .. "src/osd/modules/debugger/debuggdbstub.cpp", + MAME_DIR .. "src/osd/modules/font/font_sdl.cpp", + MAME_DIR .. "src/osd/modules/font/font_windows.cpp", + MAME_DIR .. "src/osd/modules/font/font_dwrite.cpp", + MAME_DIR .. "src/osd/modules/font/font_osx.cpp", + MAME_DIR .. "src/osd/modules/font/font_none.cpp", + MAME_DIR .. "src/osd/modules/netdev/taptun.cpp", + MAME_DIR .. "src/osd/modules/netdev/pcap.cpp", + MAME_DIR .. "src/osd/modules/netdev/none.cpp", + MAME_DIR .. "src/osd/modules/midi/portmidi.cpp", + MAME_DIR .. "src/osd/modules/midi/none.cpp", + MAME_DIR .. "src/osd/modules/sound/js_sound.cpp", + MAME_DIR .. "src/osd/modules/sound/direct_sound.cpp", + MAME_DIR .. "src/osd/modules/sound/pa_sound.cpp", + MAME_DIR .. "src/osd/modules/sound/pulse_sound.cpp", + MAME_DIR .. "src/osd/modules/sound/coreaudio_sound.cpp", + MAME_DIR .. "src/osd/modules/sound/sdl_sound.cpp", + MAME_DIR .. "src/osd/modules/sound/xaudio2_sound.cpp", + MAME_DIR .. "src/osd/modules/sound/none.cpp", + MAME_DIR .. "src/osd/modules/input/input_module.h", + MAME_DIR .. "src/osd/modules/input/input_common.cpp", + MAME_DIR .. "src/osd/modules/input/input_common.h", + MAME_DIR .. "src/osd/modules/input/input_dinput.cpp", + MAME_DIR .. "src/osd/modules/input/input_dinput.h", + MAME_DIR .. "src/osd/modules/input/input_none.cpp", + MAME_DIR .. "src/osd/modules/input/input_rawinput.cpp", + MAME_DIR .. "src/osd/modules/input/input_win32.cpp", + MAME_DIR .. "src/osd/modules/input/input_sdl.cpp", + MAME_DIR .. "src/osd/modules/input/input_sdlcommon.cpp", + MAME_DIR .. "src/osd/modules/input/input_sdlcommon.h", + MAME_DIR .. "src/osd/modules/input/input_x11.cpp", + MAME_DIR .. "src/osd/modules/input/input_windows.cpp", + MAME_DIR .. "src/osd/modules/input/input_windows.h", + MAME_DIR .. "src/osd/modules/input/input_xinput.cpp", + MAME_DIR .. "src/osd/modules/input/input_xinput.h", + MAME_DIR .. "src/osd/modules/input/input_winhybrid.cpp", + MAME_DIR .. "src/osd/modules/input/input_mac.cpp", + MAME_DIR .. "src/osd/modules/output/output_module.h", + MAME_DIR .. "src/osd/modules/output/none.cpp", + MAME_DIR .. "src/osd/modules/output/console.cpp", + MAME_DIR .. "src/osd/modules/output/network.cpp", + MAME_DIR .. "src/osd/modules/output/win32_output.cpp", + MAME_DIR .. "src/osd/modules/output/win32_output.h", + MAME_DIR .. "src/osd/modules/monitor/monitor_common.h", + MAME_DIR .. "src/osd/modules/monitor/monitor_common.cpp", + MAME_DIR .. "src/osd/modules/monitor/monitor_win32.cpp", + MAME_DIR .. "src/osd/modules/monitor/monitor_dxgi.cpp", + MAME_DIR .. "src/osd/modules/monitor/monitor_sdl.cpp", + MAME_DIR .. "src/osd/modules/monitor/monitor_mac.cpp", + } + includedirs { + ext_includedir("asio"), + } + + if _OPTIONS["gcc"]~=nil and string.find(_OPTIONS["gcc"], "clang") then + buildoptions { + "-Wno-unused-private-field", + } + end + + if _OPTIONS["targetos"]=="windows" then + includedirs { + MAME_DIR .. "3rdparty/winpcap/Include", + MAME_DIR .. "3rdparty/compat/mingw", + MAME_DIR .. "3rdparty/portaudio/include", + } + + includedirs { + MAME_DIR .. "3rdparty/compat/winsdk-override", + } + end + + if _OPTIONS["NO_OPENGL"]=="1" then + defines { + "USE_OPENGL=0", + } + else + files { + MAME_DIR .. "src/osd/modules/render/drawogl.cpp", + MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.cpp", + MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.cpp", + MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.h", + MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.h", + MAME_DIR .. "src/osd/modules/opengl/osd_opengl.h", + } + defines { + "USE_OPENGL=1", + } + if _OPTIONS["USE_DISPATCH_GL"]=="1" then + defines { + "USE_DISPATCH_GL=1", + } + end + end + + defines { + "__STDC_LIMIT_MACROS", + "__STDC_FORMAT_MACROS", + "__STDC_CONSTANT_MACROS", + } + + files { + MAME_DIR .. "src/osd/modules/render/drawbgfx.cpp", + MAME_DIR .. "src/osd/modules/render/aviwrite.cpp", + MAME_DIR .. "src/osd/modules/render/aviwrite.h", + MAME_DIR .. "src/osd/modules/render/bgfxutil.cpp", + MAME_DIR .. "src/osd/modules/render/bgfxutil.h", + MAME_DIR .. "src/osd/modules/render/binpacker.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/blendreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/blendreader.h", + MAME_DIR .. "src/osd/modules/render/bgfx/chain.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/chain.h", + MAME_DIR .. "src/osd/modules/render/bgfx/chainentry.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/chainentry.h", + MAME_DIR .. "src/osd/modules/render/bgfx/chainentryreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/chainentryreader.h", + MAME_DIR .. "src/osd/modules/render/bgfx/chainmanager.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/chainmanager.h", + MAME_DIR .. "src/osd/modules/render/bgfx/chainreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/chainreader.h", + MAME_DIR .. "src/osd/modules/render/bgfx/clear.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/clear.h", + MAME_DIR .. "src/osd/modules/render/bgfx/clearreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/clearreader.h", + MAME_DIR .. "src/osd/modules/render/bgfx/cullreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/cullreader.h", + MAME_DIR .. "src/osd/modules/render/bgfx/depthreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/depthreader.h", + MAME_DIR .. "src/osd/modules/render/bgfx/effect.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/effect.h", + MAME_DIR .. "src/osd/modules/render/bgfx/effectmanager.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/effectmanager.h", + MAME_DIR .. "src/osd/modules/render/bgfx/effectreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/effectreader.h", + MAME_DIR .. "src/osd/modules/render/bgfx/entryuniformreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/entryuniformreader.h", + MAME_DIR .. "src/osd/modules/render/bgfx/inputpair.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/inputpair.h", + MAME_DIR .. "src/osd/modules/render/bgfx/frameparameter.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/frameparameter.h", + MAME_DIR .. "src/osd/modules/render/bgfx/timeparameter.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/timeparameter.h", + MAME_DIR .. "src/osd/modules/render/bgfx/paramreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/paramreader.h", + MAME_DIR .. "src/osd/modules/render/bgfx/paramuniform.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/paramuniform.h", + MAME_DIR .. "src/osd/modules/render/bgfx/paramuniformreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/paramuniformreader.h", + MAME_DIR .. "src/osd/modules/render/bgfx/shadermanager.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/shadermanager.h", + MAME_DIR .. "src/osd/modules/render/bgfx/slider.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/slider.h", + MAME_DIR .. "src/osd/modules/render/bgfx/sliderreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/sliderreader.h", + MAME_DIR .. "src/osd/modules/render/bgfx/slideruniform.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/slideruniform.h", + MAME_DIR .. "src/osd/modules/render/bgfx/slideruniformreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/slideruniformreader.h", + MAME_DIR .. "src/osd/modules/render/bgfx/statereader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/statereader.h", + MAME_DIR .. "src/osd/modules/render/bgfx/suppressor.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/suppressor.h", + MAME_DIR .. "src/osd/modules/render/bgfx/suppressorreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/suppressorreader.h", + MAME_DIR .. "src/osd/modules/render/bgfx/target.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/target.h", + MAME_DIR .. "src/osd/modules/render/bgfx/targetreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/targetreader.h", + MAME_DIR .. "src/osd/modules/render/bgfx/targetmanager.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/targetmanager.h", + MAME_DIR .. "src/osd/modules/render/bgfx/texture.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/texture.h", + MAME_DIR .. "src/osd/modules/render/bgfx/texturehandleprovider.h", + MAME_DIR .. "src/osd/modules/render/bgfx/texturemanager.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/texturemanager.h", + MAME_DIR .. "src/osd/modules/render/bgfx/uniform.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/uniform.h", + MAME_DIR .. "src/osd/modules/render/bgfx/uniformreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/uniformreader.h", + MAME_DIR .. "src/osd/modules/render/bgfx/valueuniform.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/valueuniform.h", + MAME_DIR .. "src/osd/modules/render/bgfx/valueuniformreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/valueuniformreader.h", + MAME_DIR .. "src/osd/modules/render/bgfx/view.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/view.h", + MAME_DIR .. "src/osd/modules/render/bgfx/writereader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/writereader.h", + } + includedirs { + MAME_DIR .. "3rdparty/bgfx/examples/common", + MAME_DIR .. "3rdparty/bgfx/include", + MAME_DIR .. "3rdparty/bgfx/3rdparty", + MAME_DIR .. "3rdparty/bgfx/3rdparty/khronos", + MAME_DIR .. "3rdparty/bx/include", + ext_includedir("rapidjson") + } + + if _OPTIONS["NO_USE_PORTAUDIO"]=="1" then + defines { + "NO_USE_PORTAUDIO", + } + else + includedirs { + ext_includedir("portaudio"), + } + end + + if _OPTIONS["NO_USE_PULSEAUDIO"]=="1" then + defines { + "NO_USE_PULSEAUDIO", + } + end + + if _OPTIONS["NO_USE_MIDI"]=="1" then + defines { + "NO_USE_MIDI", + } + else + includedirs { + ext_includedir("portmidi"), + } + end + + if _OPTIONS["USE_QTDEBUG"]=="1" then + defines { + "USE_QTDEBUG=1", + } + else + defines { + "USE_QTDEBUG=0", + } + end + +end + + +function qtdebuggerbuild() + + removeflags { + "SingleOutputDir", + } + local version = str_to_version(_OPTIONS["gcc_version"]) + if _OPTIONS["gcc"]~=nil and (string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "asmjs")) then + configuration { "gmake or ninja" } + if (version >= 30600) then + buildoptions { + "-Wno-inconsistent-missing-override", + } + end + configuration { } + end + + files { + MAME_DIR .. "src/osd/modules/debugger/debugqt.cpp", + } + + if _OPTIONS["USE_QTDEBUG"]=="1" then + files { + MAME_DIR .. "src/osd/modules/debugger/qt/debuggerview.cpp", + MAME_DIR .. "src/osd/modules/debugger/qt/debuggerview.h", + MAME_DIR .. "src/osd/modules/debugger/qt/windowqt.cpp", + MAME_DIR .. "src/osd/modules/debugger/qt/windowqt.h", + MAME_DIR .. "src/osd/modules/debugger/qt/logwindow.cpp", + MAME_DIR .. "src/osd/modules/debugger/qt/logwindow.h", + MAME_DIR .. "src/osd/modules/debugger/qt/dasmwindow.cpp", + MAME_DIR .. "src/osd/modules/debugger/qt/dasmwindow.h", + MAME_DIR .. "src/osd/modules/debugger/qt/mainwindow.cpp", + MAME_DIR .. "src/osd/modules/debugger/qt/mainwindow.h", + MAME_DIR .. "src/osd/modules/debugger/qt/memorywindow.cpp", + MAME_DIR .. "src/osd/modules/debugger/qt/memorywindow.h", + MAME_DIR .. "src/osd/modules/debugger/qt/breakpointswindow.cpp", + MAME_DIR .. "src/osd/modules/debugger/qt/breakpointswindow.h", + MAME_DIR .. "src/osd/modules/debugger/qt/deviceswindow.cpp", + MAME_DIR .. "src/osd/modules/debugger/qt/deviceinformationwindow.cpp", + MAME_DIR .. "src/osd/modules/debugger/qt/deviceinformationwindow.h", + MAME_DIR .. "src/osd/modules/debugger/qt/deviceswindow.h", + GEN_DIR .. "osd/modules/debugger/qt/debuggerview.moc.cpp", + GEN_DIR .. "osd/modules/debugger/qt/windowqt.moc.cpp", + GEN_DIR .. "osd/modules/debugger/qt/logwindow.moc.cpp", + GEN_DIR .. "osd/modules/debugger/qt/dasmwindow.moc.cpp", + GEN_DIR .. "osd/modules/debugger/qt/mainwindow.moc.cpp", + GEN_DIR .. "osd/modules/debugger/qt/memorywindow.moc.cpp", + GEN_DIR .. "osd/modules/debugger/qt/breakpointswindow.moc.cpp", + GEN_DIR .. "osd/modules/debugger/qt/deviceswindow.moc.cpp", + GEN_DIR .. "osd/modules/debugger/qt/deviceinformationwindow.moc.cpp", + } + defines { + "USE_QTDEBUG=1", + } + + local MOC = "" + if (os.is("windows")) then + MOC = "moc" + else + if _OPTIONS["QT_HOME"]~=nil then + QMAKETST = backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake --version 2>/dev/null") + if (QMAKETST=='') then + print("Qt's Meta Object Compiler (moc) wasn't found!") + os.exit(1) + end + MOC = _OPTIONS["QT_HOME"] .. "/bin/moc" + else + MOCTST = backtick("which moc-qt5 2>/dev/null") + if (MOCTST=='') then + MOCTST = backtick("which moc 2>/dev/null") + end + if (MOCTST=='') then + print("Qt's Meta Object Compiler (moc) wasn't found!") + os.exit(1) + end + MOC = MOCTST + end + end + + + custombuildtask { + { MAME_DIR .. "src/osd/modules/debugger/qt/debuggerview.h", GEN_DIR .. "osd/modules/debugger/qt/debuggerview.moc.cpp", { }, { MOC .. "$(MOCINCPATH) -b emu.h $(<) -o $(@)" }}, + { MAME_DIR .. "src/osd/modules/debugger/qt/windowqt.h", GEN_DIR .. "osd/modules/debugger/qt/windowqt.moc.cpp", { }, { MOC .. "$(MOCINCPATH) -b emu.h $(<) -o $(@)" }}, + { MAME_DIR .. "src/osd/modules/debugger/qt/logwindow.h", GEN_DIR .. "osd/modules/debugger/qt/logwindow.moc.cpp", { }, { MOC .. "$(MOCINCPATH) -b emu.h $(<) -o $(@)" }}, + { MAME_DIR .. "src/osd/modules/debugger/qt/dasmwindow.h", GEN_DIR .. "osd/modules/debugger/qt/dasmwindow.moc.cpp", { }, { MOC .. "$(MOCINCPATH) -b emu.h $(<) -o $(@)" }}, + { MAME_DIR .. "src/osd/modules/debugger/qt/mainwindow.h", GEN_DIR .. "osd/modules/debugger/qt/mainwindow.moc.cpp", { }, { MOC .. "$(MOCINCPATH) -b emu.h $(<) -o $(@)" }}, + { MAME_DIR .. "src/osd/modules/debugger/qt/memorywindow.h", GEN_DIR .. "osd/modules/debugger/qt/memorywindow.moc.cpp", { }, { MOC .. "$(MOCINCPATH) -b emu.h $(<) -o $(@)" }}, + { MAME_DIR .. "src/osd/modules/debugger/qt/breakpointswindow.h", GEN_DIR .. "osd/modules/debugger/qt/breakpointswindow.moc.cpp", { }, { MOC .. "$(MOCINCPATH) -b emu.h $(<) -o $(@)" }}, + { MAME_DIR .. "src/osd/modules/debugger/qt/deviceswindow.h", GEN_DIR .. "osd/modules/debugger/qt/deviceswindow.moc.cpp", { }, { MOC .. "$(MOCINCPATH) -b emu.h $(<) -o $(@)" }}, + { MAME_DIR .. "src/osd/modules/debugger/qt/deviceinformationwindow.h", GEN_DIR .. "osd/modules/debugger/qt/deviceinformationwindow.moc.cpp", { },{ MOC .. "$(MOCINCPATH) -b emu.h $(<) -o $(@)" }}, + + } + + if _OPTIONS["targetos"]=="windows" then + configuration { "mingw*" } + buildoptions { + "-I$(shell qmake -query QT_INSTALL_HEADERS)", + } + configuration { } + elseif _OPTIONS["targetos"]=="macosx" then + buildoptions { + "-F" .. backtick("qmake -query QT_INSTALL_LIBS"), + } + else + if _OPTIONS["QT_HOME"]~=nil then + buildoptions { + "-I" .. backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_INSTALL_HEADERS"), + } + else + buildoptions { + backtick(pkgconfigcmd() .. " --cflags Qt5Widgets"), + } + end + end + else + defines { + "USE_QTDEBUG=0", + } + end + +end + + +function osdmodulestargetconf() + + if _OPTIONS["NO_OPENGL"]~="1" then + if _OPTIONS["targetos"]=="macosx" then + links { + "OpenGL.framework", + } + elseif _OPTIONS["USE_DISPATCH_GL"]~="1" then + if _OPTIONS["targetos"]=="windows" then + links { + "opengl32", + } + else + links { + "GL", + } + end + end + end + + if _OPTIONS["NO_USE_MIDI"]~="1" then + if _OPTIONS["targetos"]=="linux" then + local str = backtick(pkgconfigcmd() .. " --libs alsa") + addlibfromstring(str) + addoptionsfromstring(str) + elseif _OPTIONS["targetos"]=="macosx" then + links { + "CoreMIDI.framework", + } + end + end + + if _OPTIONS["USE_QTDEBUG"]=="1" then + if _OPTIONS["targetos"]=="windows" then + linkoptions { + "-L$(shell qmake -query QT_INSTALL_LIBS)", + } + links { + "Qt5Core.dll", + "Qt5Gui.dll", + "Qt5Widgets.dll", + } + elseif _OPTIONS["targetos"]=="macosx" then + linkoptions { + "-F" .. backtick("qmake -query QT_INSTALL_LIBS"), + } + links { + "Qt5Core.framework", + "Qt5Gui.framework", + "Qt5Widgets.framework", + } + else + if _OPTIONS["QT_HOME"]~=nil then + linkoptions { + "-L" .. backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_INSTALL_LIBS"), + } + links { + "Qt5Core", + "Qt5Gui", + "Qt5Widgets", + } + else + local str = backtick(pkgconfigcmd() .. " --libs Qt5Widgets") + addlibfromstring(str) + addoptionsfromstring(str) + end + end + end + + if _OPTIONS["targetos"]=="windows" then + links { + "gdi32", + "dsound", + "dxguid", + "oleaut32", + "winmm", + } + elseif _OPTIONS["targetos"]=="macosx" then + links { + "AudioUnit.framework", + "AudioToolbox.framework", + "CoreAudio.framework", + "CoreServices.framework", + } + end + + if _OPTIONS["NO_USE_PULSEAUDIO"]=="0" then + links { + ext_lib("pulse"), + } + end +end + + +newoption { + trigger = "USE_TAPTUN", + description = "Include tap/tun network module", + allowed = { + { "0", "Don't include tap/tun network module" }, + { "1", "Include tap/tun network module" }, + }, +} + +newoption { + trigger = "USE_PCAP", + description = "Include pcap network module", + allowed = { + { "0", "Don't include pcap network module" }, + { "1", "Include pcap network module" }, + }, +} + +newoption { + trigger = "NO_OPENGL", + description = "Disable use of OpenGL", + allowed = { + { "0", "Enable OpenGL" }, + { "1", "Disable OpenGL" }, + }, +} + +newoption { + trigger = "USE_DISPATCH_GL", + description = "Use GL-dispatching", + allowed = { + { "0", "Link to OpenGL library" }, + { "1", "Use GL-dispatching" }, + }, +} + +if not _OPTIONS["USE_DISPATCH_GL"] then + _OPTIONS["USE_DISPATCH_GL"] = "0" +end + +newoption { + trigger = "NO_USE_MIDI", + description = "Disable MIDI I/O", + allowed = { + { "0", "Enable MIDI" }, + { "1", "Disable MIDI" }, + }, +} + +if not _OPTIONS["NO_USE_MIDI"] then + if _OPTIONS["targetos"]=="freebsd" or _OPTIONS["targetos"]=="openbsd" or _OPTIONS["targetos"]=="netbsd" or _OPTIONS["targetos"]=="solaris" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"] == "asmjs" then + _OPTIONS["NO_USE_MIDI"] = "1" + else + _OPTIONS["NO_USE_MIDI"] = "0" + end +end + +newoption { + trigger = "NO_USE_PORTAUDIO", + description = "Disable PortAudio interface", + allowed = { + { "0", "Enable PortAudio" }, + { "1", "Disable PortAudio" }, + }, +} + +if not _OPTIONS["NO_USE_PORTAUDIO"] then + if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="linux" or _OPTIONS["targetos"]=="macosx" then + _OPTIONS["NO_USE_PORTAUDIO"] = "0" + else + _OPTIONS["NO_USE_PORTAUDIO"] = "1" + end +end + +newoption { + trigger = "NO_USE_PULSEAUDIO", + description = "Disable PulseAudio interface", + allowed = { + { "0", "Enable PulseAudio" }, + { "1", "Disable PulseAudio" }, + }, +} + +if not _OPTIONS["NO_USE_PULSEAUDIO"] then + if _OPTIONS["targetos"]=="linux" then + _OPTIONS["NO_USE_PULSEAUDIO"] = "0" + else + _OPTIONS["NO_USE_PULSEAUDIO"] = "1" + end +end + +newoption { + trigger = "MODERN_WIN_API", + description = "Use Modern Windows APIs", + allowed = { + { "0", "Use classic Windows APIs - allows support for XP and later" }, + { "1", "Use Modern Windows APIs - support for Windows 8.1 and later" }, + }, +} + +newoption { + trigger = "USE_QTDEBUG", + description = "Use QT debugger", + allowed = { + { "0", "Don't use Qt debugger" }, + { "1", "Use Qt debugger" }, + }, +} + +newoption { + trigger = "QT_HOME", + description = "QT lib location", +} + + +if not _OPTIONS["USE_TAPTUN"] then + if _OPTIONS["targetos"]=="linux" or _OPTIONS["targetos"]=="windows" then + _OPTIONS["USE_TAPTUN"] = "1" + else + _OPTIONS["USE_TAPTUN"] = "0" + end +end + +if not _OPTIONS["USE_PCAP"] then + if _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="netbsd" then + _OPTIONS["USE_PCAP"] = "1" + else + _OPTIONS["USE_PCAP"] = "0" + end +end + +if not _OPTIONS["USE_QTDEBUG"] then + if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="solaris" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"]=="asmjs" then + _OPTIONS["USE_QTDEBUG"] = "0" + else + _OPTIONS["USE_QTDEBUG"] = "1" + end +end diff --git a/unused/scripts/src/osd/sdl.lua b/unused/scripts/src/osd/sdl.lua new file mode 100644 index 0000000..25ef22f --- /dev/null +++ b/unused/scripts/src/osd/sdl.lua @@ -0,0 +1,504 @@ +-- license:BSD-3-Clause +-- copyright-holders:MAMEdev Team + +--------------------------------------------------------------------------- +-- +-- sdl.lua +-- +-- Rules for the building with SDL +-- +--------------------------------------------------------------------------- + +dofile("modules.lua") + + +function maintargetosdoptions(_target,_subtarget) + osdmodulestargetconf() + + if _OPTIONS["USE_DISPATCH_GL"]~="1" and _OPTIONS["MESA_INSTALL_ROOT"] then + libdirs { + path.join(_OPTIONS["MESA_INSTALL_ROOT"],"lib"), + } + linkoptions { + "-Wl,-rpath=" .. path.join(_OPTIONS["MESA_INSTALL_ROOT"],"lib"), + } + end + + if _OPTIONS["NO_X11"]~="1" then + links { + "X11", + "Xinerama", + } + else + if _OPTIONS["targetos"]=="linux" or _OPTIONS["targetos"]=="netbsd" or _OPTIONS["targetos"]=="openbsd" then + links { + "EGL", + } + end + end + + if _OPTIONS["NO_USE_XINPUT"]~="1" then + links { + "Xext", + "Xi", + } + end + + if BASE_TARGETOS=="unix" and _OPTIONS["targetos"]~="macosx" and _OPTIONS["targetos"]~="android" and _OPTIONS["targetos"]~="asmjs" then + links { + "SDL2_ttf", + } + local str = backtick(pkgconfigcmd() .. " --libs fontconfig") + addlibfromstring(str) + addoptionsfromstring(str) + end + + if _OPTIONS["targetos"]=="windows" then + if _OPTIONS["with-bundled-sdl2"]~=nil then + configuration { "mingw*"} + links { + "SDL2", + "imm32", + "version", + "ole32", + "oleaut32", + } + configuration { "vs*" } + links { + "SDL2", + "imm32", + "version", + } + configuration { } + else + if _OPTIONS["USE_LIBSDL"]~="1" then + configuration { "mingw*"} + links { + "SDL2main", + "SDL2", + } + configuration { "vs*" } + links { + "SDL2", + "imm32", + "version", + } + configuration { } + else + local str = backtick(sdlconfigcmd() .. " --libs | sed 's/ -lSDLmain//'") + addlibfromstring(str) + addoptionsfromstring(str) + end + configuration { "x32", "vs*" } + libdirs { + path.join(_OPTIONS["SDL_INSTALL_ROOT"],"lib","x86") + } + configuration { "x64", "vs*" } + libdirs { + path.join(_OPTIONS["SDL_INSTALL_ROOT"],"lib","x64") + } + configuration { } + end + links { + "psapi", + } + elseif _OPTIONS["targetos"]=="haiku" then + links { + "network", + "bsd", + } + end + + configuration { "mingw*" or "vs*" } + targetprefix "sdl" + links { + "psapi", + "ole32", + } + configuration { } + + if _OPTIONS["targetos"]=="macosx" then + if _OPTIONS["with-bundled-sdl2"]~=nil then + links { + "SDL2", + } + end + end + +end + + +function sdlconfigcmd() + if _OPTIONS["targetos"]=="asmjs" then + return "sdl2-config" + elseif not _OPTIONS["SDL_INSTALL_ROOT"] then + return pkgconfigcmd() .. " sdl2" + else + return path.join(_OPTIONS["SDL_INSTALL_ROOT"],"bin","sdl2") .. "-config" + end +end + + +newoption { + trigger = "MESA_INSTALL_ROOT", + description = "link against specific GL-Library - also adds rpath to executable (overridden by USE_DISPATCH_GL)", +} + +newoption { + trigger = "SDL_INI_PATH", + description = "Default search path for .ini files", +} + +newoption { + trigger = "NO_X11", + description = "Disable use of X11", + allowed = { + { "0", "Enable X11" }, + { "1", "Disable X11" }, + }, +} + +if not _OPTIONS["NO_X11"] then + if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"]=="asmjs" then + _OPTIONS["NO_X11"] = "1" + else + _OPTIONS["NO_X11"] = "0" + end +end + +newoption { + trigger = "NO_USE_XINPUT", + description = "Disable use of Xinput", + allowed = { + { "0", "Enable Xinput" }, + { "1", "Disable Xinput" }, + }, +} + +if not _OPTIONS["NO_USE_XINPUT"] then + if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"]=="asmjs" then + _OPTIONS["NO_USE_XINPUT"] = "1" + else + _OPTIONS["NO_USE_XINPUT"] = "0" + end +end + +newoption { + trigger = "NO_USE_XINPUT_WII_LIGHTGUN_HACK", + description = "Disable use of Xinput Wii Lightgun Hack", + allowed = { + { "0", "Enable Xinput Wii Lightgun Hack" }, + { "1", "Disable Xinput Wii Lightgun Hack" }, + }, +} + +if not _OPTIONS["NO_USE_XINPUT_WII_LIGHTGUN_HACK"] then + _OPTIONS["NO_USE_XINPUT_WII_LIGHTGUN_HACK"] = "1" +end + +newoption { + trigger = "SDL2_MULTIAPI", + description = "Use couriersud's multi-keyboard patch for SDL 2.1? (this API was removed prior to the 2.0 release)", + allowed = { + { "0", "Use single-keyboard API" }, + { "1", "Use multi-keyboard API" }, + }, +} + +if not _OPTIONS["SDL2_MULTIAPI"] then + _OPTIONS["SDL2_MULTIAPI"] = "0" +end + +newoption { + trigger = "SDL_INSTALL_ROOT", + description = "Equivalent to the ./configure --prefix=", +} + +newoption { + trigger = "SDL_FRAMEWORK_PATH", + description = "Location of SDL framework for custom OS X installations", +} + +if not _OPTIONS["SDL_FRAMEWORK_PATH"] then + _OPTIONS["SDL_FRAMEWORK_PATH"] = "/Library/Frameworks/" +end + +newoption { + trigger = "USE_LIBSDL", + description = "Use SDL library on OS (rather than framework/dll)", + allowed = { + { "0", "Use framework/dll" }, + { "1", "Use library" }, + }, +} + +if not _OPTIONS["USE_LIBSDL"] then + _OPTIONS["USE_LIBSDL"] = "0" +end + + +BASE_TARGETOS = "unix" +SDLOS_TARGETOS = "unix" +if _OPTIONS["targetos"]=="linux" then +elseif _OPTIONS["targetos"]=="openbsd" then +elseif _OPTIONS["targetos"]=="netbsd" then +elseif _OPTIONS["targetos"]=="haiku" then +elseif _OPTIONS["targetos"]=="asmjs" then +elseif _OPTIONS["targetos"]=="windows" then + BASE_TARGETOS = "win32" + SDLOS_TARGETOS = "win32" +elseif _OPTIONS["targetos"]=="macosx" then + SDLOS_TARGETOS = "macosx" +end + +if _OPTIONS["with-bundled-sdl2"]~=nil then + includedirs { + GEN_DIR .. "includes", + } +end +if BASE_TARGETOS=="unix" then + if _OPTIONS["targetos"]=="macosx" then + local os_version = str_to_version(backtick("sw_vers -productVersion")) + + links { + "Cocoa.framework", + } + linkoptions { + "-framework QuartzCore", + "-framework OpenGL", + } + + + if os_version>=101100 then + linkoptions { + "-weak_framework Metal", + } + end + if _OPTIONS["with-bundled-sdl2"]~=nil then + linkoptions { + "-framework AudioToolbox", + "-framework AudioUnit", + "-framework CoreAudio", + "-framework Carbon", + "-framework ForceFeedback", + "-framework IOKit", + "-framework CoreVideo", + } + else + if _OPTIONS["USE_LIBSDL"]~="1" then + linkoptions { + "-F" .. _OPTIONS["SDL_FRAMEWORK_PATH"], + } + links { + "SDL2.framework", + } + else + local str = backtick(sdlconfigcmd() .. " --libs --static | sed 's/-lSDLmain//'") + addlibfromstring(str) + addoptionsfromstring(str) + end + end + else + if _OPTIONS["NO_X11"]=="1" then + _OPTIONS["USE_QTDEBUG"] = "0" + else + libdirs { + "/usr/X11/lib", + "/usr/X11R6/lib", + "/usr/openwin/lib", + } + end + if _OPTIONS["with-bundled-sdl2"]~=nil then + if _OPTIONS["targetos"]~="android" then + links { + "SDL2", + } + end + else + local str = backtick(sdlconfigcmd() .. " --libs") + addlibfromstring(str) + addoptionsfromstring(str) + end + + if _OPTIONS["targetos"]~="haiku" and _OPTIONS["targetos"]~="android" then + links { + "m", + "pthread", + } + if _OPTIONS["targetos"]=="solaris" then + links { + "socket", + "nsl", + } + elseif _OPTIONS["targetos"]~="asmjs" then + links { + "util", + } + end + end + end +end + +project ("qtdbg_" .. _OPTIONS["osd"]) + uuid (os.uuid("qtdbg_" .. _OPTIONS["osd"])) + kind (LIBTYPE) + + dofile("sdl_cfg.lua") + includedirs { + MAME_DIR .. "src/emu", + MAME_DIR .. "src/devices", -- accessing imagedev from debugger + MAME_DIR .. "src/osd", + MAME_DIR .. "src/lib", + MAME_DIR .. "src/lib/util", + MAME_DIR .. "src/osd/modules/render", + MAME_DIR .. "3rdparty", + } + configuration { "linux-* or freebsd" } + buildoptions { + "-fPIC", + } + configuration { } + + qtdebuggerbuild() + +project ("osd_" .. _OPTIONS["osd"]) + targetsubdir(_OPTIONS["target"] .."_" .._OPTIONS["subtarget"]) + uuid (os.uuid("osd_" .. _OPTIONS["osd"])) + kind (LIBTYPE) + + dofile("sdl_cfg.lua") + osdmodulesbuild() + + includedirs { + MAME_DIR .. "src/emu", + MAME_DIR .. "src/devices", -- accessing imagedev from debugger + MAME_DIR .. "src/osd", + MAME_DIR .. "src/lib", + MAME_DIR .. "src/lib/util", + MAME_DIR .. "src/osd/modules/file", + MAME_DIR .. "src/osd/modules/render", + MAME_DIR .. "3rdparty", + MAME_DIR .. "src/osd/sdl", + } + + if _OPTIONS["targetos"]=="macosx" then + files { + MAME_DIR .. "src/osd/modules/debugger/debugosx.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/breakpointsview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/breakpointsview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/consoleview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/consoleview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/debugcommandhistory.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/debugcommandhistory.h", + MAME_DIR .. "src/osd/modules/debugger/osx/debugconsole.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/debugconsole.h", + MAME_DIR .. "src/osd/modules/debugger/osx/debugview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/debugview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/debugwindowhandler.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/debugwindowhandler.h", + MAME_DIR .. "src/osd/modules/debugger/osx/deviceinfoviewer.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/deviceinfoviewer.h", + MAME_DIR .. "src/osd/modules/debugger/osx/devicesviewer.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/devicesviewer.h", + MAME_DIR .. "src/osd/modules/debugger/osx/disassemblyview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/disassemblyviewer.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/disassemblyviewer.h", + MAME_DIR .. "src/osd/modules/debugger/osx/errorlogview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/errorlogview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/disassemblyview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/errorlogviewer.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/errorlogviewer.h", + MAME_DIR .. "src/osd/modules/debugger/osx/memoryview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/memoryview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/memoryviewer.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/memoryviewer.h", + MAME_DIR .. "src/osd/modules/debugger/osx/pointsviewer.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/pointsviewer.h", + MAME_DIR .. "src/osd/modules/debugger/osx/registerpointsview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/registerpointsview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/registersview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/registersview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/watchpointsview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/watchpointsview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/debugosx.h", + } + end + + files { + MAME_DIR .. "src/osd/sdl/osdsdl.h", + MAME_DIR .. "src/osd/sdl/sdlprefix.h", + MAME_DIR .. "src/osd/sdl/sdlmain.cpp", + MAME_DIR .. "src/osd/osdepend.h", + MAME_DIR .. "src/osd/sdl/video.cpp", + MAME_DIR .. "src/osd/sdl/window.cpp", + MAME_DIR .. "src/osd/sdl/window.h", + MAME_DIR .. "src/osd/modules/osdwindow.cpp", + MAME_DIR .. "src/osd/modules/osdwindow.h", + MAME_DIR .. "src/osd/modules/render/drawsdl.cpp", + } + files { + MAME_DIR .. "src/osd/modules/render/draw13.cpp", + MAME_DIR .. "src/osd/modules/render/blit13.h", + } + + +project ("ocore_" .. _OPTIONS["osd"]) + targetsubdir(_OPTIONS["target"] .."_" .. _OPTIONS["subtarget"]) + uuid (os.uuid("ocore_" .. _OPTIONS["osd"])) + kind (LIBTYPE) + + removeflags { + "SingleOutputDir", + } + + dofile("sdl_cfg.lua") + + includedirs { + MAME_DIR .. "src/emu", + MAME_DIR .. "src/osd", + MAME_DIR .. "src/lib", + MAME_DIR .. "src/lib/util", + MAME_DIR .. "src/osd/sdl", + } + + files { + MAME_DIR .. "src/osd/osdcore.cpp", + MAME_DIR .. "src/osd/osdcore.h", + MAME_DIR .. "src/osd/osdfile.h", + MAME_DIR .. "src/osd/strconv.cpp", + MAME_DIR .. "src/osd/strconv.h", + MAME_DIR .. "src/osd/osdsync.cpp", + MAME_DIR .. "src/osd/osdsync.h", + MAME_DIR .. "src/osd/modules/osdmodule.cpp", + MAME_DIR .. "src/osd/modules/osdmodule.h", + MAME_DIR .. "src/osd/modules/lib/osdlib_" .. SDLOS_TARGETOS .. ".cpp", + MAME_DIR .. "src/osd/modules/lib/osdlib.h", + } + + if BASE_TARGETOS=="unix" then + files { + MAME_DIR .. "src/osd/modules/file/posixdir.cpp", + MAME_DIR .. "src/osd/modules/file/posixfile.cpp", + MAME_DIR .. "src/osd/modules/file/posixfile.h", + MAME_DIR .. "src/osd/modules/file/posixptty.cpp", + MAME_DIR .. "src/osd/modules/file/posixsocket.cpp", + } + elseif BASE_TARGETOS=="win32" then + includedirs { + MAME_DIR .. "src/osd/windows", + } + files { + MAME_DIR .. "src/osd/modules/file/windir.cpp", + MAME_DIR .. "src/osd/modules/file/winfile.cpp", + MAME_DIR .. "src/osd/modules/file/winfile.h", + MAME_DIR .. "src/osd/modules/file/winptty.cpp", + MAME_DIR .. "src/osd/modules/file/winsocket.cpp", + MAME_DIR .. "src/osd/windows/winutil.cpp", -- FIXME put the necessary functions somewhere more appropriate + } + else + files { + MAME_DIR .. "src/osd/modules/file/stdfile.cpp", + } + end + + diff --git a/unused/scripts/src/osd/sdl_cfg.lua b/unused/scripts/src/osd/sdl_cfg.lua new file mode 100644 index 0000000..26850d4 --- /dev/null +++ b/unused/scripts/src/osd/sdl_cfg.lua @@ -0,0 +1,174 @@ +-- license:BSD-3-Clause +-- copyright-holders:MAMEdev Team + +dofile('modules.lua') + +forcedincludes { + MAME_DIR .. "src/osd/sdl/sdlprefix.h" +} + +if _OPTIONS["USE_TAPTUN"]=="1" or _OPTIONS["USE_PCAP"]=="1" then + defines { + "USE_NETWORK", + } + if _OPTIONS["USE_TAPTUN"]=="1" then + defines { + "OSD_NET_USE_TAPTUN", + } + end + if _OPTIONS["USE_PCAP"]=="1" then + defines { + "OSD_NET_USE_PCAP", + } + end +end + +if _OPTIONS["NO_OPENGL"]~="1" and _OPTIONS["USE_DISPATCH_GL"]~="1" and _OPTIONS["MESA_INSTALL_ROOT"] then + includedirs { + path.join(_OPTIONS["MESA_INSTALL_ROOT"],"include"), + } +end + +if _OPTIONS["SDL_INI_PATH"]~=nil then + defines { + "'INI_PATH=\"" .. _OPTIONS["SDL_INI_PATH"] .. "\"'", + } +end + +if _OPTIONS["NO_X11"]=="1" then + defines { + "SDLMAME_NO_X11", + } +else + defines { + "SDLMAME_X11", + } + includedirs { + "/usr/X11/include", + "/usr/X11R6/include", + "/usr/openwin/include", + } +end + +if _OPTIONS["NO_USE_XINPUT"]=="1" then + defines { + "USE_XINPUT=0", + } +else + defines { + "USE_XINPUT=1", + "USE_XINPUT_DEBUG=0", + } +end + +if _OPTIONS["NO_USE_XINPUT_WII_LIGHTGUN_HACK"]=="1" then + defines { + "USE_XINPUT_WII_LIGHTGUN_HACK=0", + } +else + defines { + "USE_XINPUT_WII_LIGHTGUN_HACK=1", + } +end + +if _OPTIONS["NO_USE_MIDI"]~="1" and _OPTIONS["targetos"]=="linux" then + buildoptions { + backtick(pkgconfigcmd() .. " --cflags alsa"), + } +end + +defines { + "SDLMAME_SDL2=1", +} +if _OPTIONS["SDL2_MULTIAPI"]=="1" then + defines { + "SDL2_MULTIAPI", + } +end + +defines { + "OSD_SDL", +} + +if BASE_TARGETOS=="unix" then + defines { + "SDLMAME_UNIX", + } + if _OPTIONS["targetos"]=="macosx" then + if _OPTIONS["with-bundled-sdl2"]==nil then + if _OPTIONS["USE_LIBSDL"]~="1" then + buildoptions { + "-F" .. _OPTIONS["SDL_FRAMEWORK_PATH"], + } + else + defines { + "MACOSX_USE_LIBSDL", + } + buildoptions { + backtick(sdlconfigcmd() .. " --cflags | sed 's:/SDL2::'"), + } + end + end + else + buildoptions { + backtick(sdlconfigcmd() .. " --cflags"), + } + if _OPTIONS["targetos"]~="asmjs" then + buildoptions { + backtick(pkgconfigcmd() .. " --cflags fontconfig"), + } + end + end +end + +if _OPTIONS["targetos"]=="windows" then + configuration { "mingw* or vs*" } + defines { + "UNICODE", + "_UNICODE", + "_WIN32_WINNT=0x0501", + "WIN32_LEAN_AND_MEAN", + "NOMINMAX", + } + + configuration { } + +elseif _OPTIONS["targetos"]=="linux" then + if _OPTIONS["QT_HOME"]~=nil then + buildoptions { + "-I" .. backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_INSTALL_HEADERS"), + } + else + buildoptions { + backtick(pkgconfigcmd() .. " --cflags Qt5Widgets"), + } + end +elseif _OPTIONS["targetos"]=="macosx" then + defines { + "SDLMAME_MACOSX", + "SDLMAME_DARWIN", + } +elseif _OPTIONS["targetos"]=="freebsd" then + buildoptions { + -- /usr/local/include is not considered a system include director on FreeBSD. GL.h resides there and throws warnings + "-isystem /usr/local/include", + } +end + +configuration { "osx*" } + includedirs { + MAME_DIR .. "3rdparty/bx/include/compat/osx", + } + +configuration { "freebsd" } + includedirs { + MAME_DIR .. "3rdparty/bx/include/compat/freebsd", + } + +configuration { "netbsd" } + includedirs { + MAME_DIR .. "3rdparty/bx/include/compat/freebsd", + } + +configuration { } + diff --git a/unused/scripts/src/osd/windows.lua b/unused/scripts/src/osd/windows.lua new file mode 100644 index 0000000..2d5ca91 --- /dev/null +++ b/unused/scripts/src/osd/windows.lua @@ -0,0 +1,264 @@ +-- license:BSD-3-Clause +-- copyright-holders:MAMEdev Team + +--------------------------------------------------------------------------- +-- +-- windows.lua +-- +-- Rules for the building for Windows +-- +--------------------------------------------------------------------------- + +dofile("modules.lua") + + +function maintargetosdoptions(_target,_subtarget) + osdmodulestargetconf() + + configuration { "mingw*" } + links { + "mingw32", + } + + configuration { } + + if _OPTIONS["USE_SDL"] == "1" then + links { + "SDL.dll", + } + end + + links { + "dinput8", + "comctl32", + "comdlg32", + "psapi", + "ole32", + "shlwapi", + } +end + + +newoption { + trigger = "USE_SDL", + description = "Enable SDL sound output", + allowed = { + { "0", "Disable SDL sound output" }, + { "1", "Enable SDL sound output" }, + }, +} + +if not _OPTIONS["USE_SDL"] then + _OPTIONS["USE_SDL"] = "0" +end + +newoption { + trigger = "CYGWIN_BUILD", + description = "Build with Cygwin tools", + allowed = { + { "0", "Build with MinGW tools" }, + { "1", "Build with Cygwin tools" }, + }, +} + +if not _OPTIONS["CYGWIN_BUILD"] then + _OPTIONS["CYGWIN_BUILD"] = "0" +end + + +if _OPTIONS["CYGWIN_BUILD"] == "1" then + buildoptions { + "-mmo-cygwin", + } + linkoptions { + "-mno-cygwin", + } +end + + +project ("qtdbg_" .. _OPTIONS["osd"]) + uuid (os.uuid("qtdbg_" .. _OPTIONS["osd"])) + kind (LIBTYPE) + + dofile("windows_cfg.lua") + includedirs { + MAME_DIR .. "src/emu", + MAME_DIR .. "src/devices", -- accessing imagedev from debugger + MAME_DIR .. "src/osd", + MAME_DIR .. "src/lib", + MAME_DIR .. "src/lib/util", + MAME_DIR .. "src/osd/modules/render", + MAME_DIR .. "3rdparty", + } + qtdebuggerbuild() + +project ("osd_" .. _OPTIONS["osd"]) + uuid (os.uuid("osd_" .. _OPTIONS["osd"])) + kind (LIBTYPE) + + dofile("windows_cfg.lua") + osdmodulesbuild() + + defines { + "DIRECT3D_VERSION=0x0900", + "DIRECTINPUT_VERSION=0x0800", + } + + includedirs { + MAME_DIR .. "src/emu", + MAME_DIR .. "src/devices", -- accessing imagedev from debugger + MAME_DIR .. "src/osd", + MAME_DIR .. "src/lib", + MAME_DIR .. "src/lib/util", + MAME_DIR .. "src/osd/modules/file", + MAME_DIR .. "src/osd/modules/render", + MAME_DIR .. "3rdparty", + } + + includedirs { + MAME_DIR .. "src/osd/windows", + } + + if _OPTIONS["gcc"]~=nil and string.find(_OPTIONS["gcc"], "clang") then + buildoptions_cpp { + "-Wno-ignored-attributes",-- many instances in ImGui + } + end + + files { + MAME_DIR .. "src/osd/modules/render/d3d/d3dhlsl.cpp", + MAME_DIR .. "src/osd/modules/render/d3d/d3dcomm.h", + MAME_DIR .. "src/osd/modules/render/d3d/d3dhlsl.h", + MAME_DIR .. "src/osd/modules/render/drawd3d.cpp", + MAME_DIR .. "src/osd/modules/render/drawd3d.h", + MAME_DIR .. "src/osd/modules/render/drawgdi.cpp", + MAME_DIR .. "src/osd/modules/render/drawgdi.h", + MAME_DIR .. "src/osd/modules/render/drawnone.cpp", + MAME_DIR .. "src/osd/modules/render/drawnone.h", + MAME_DIR .. "src/osd/windows/video.cpp", + MAME_DIR .. "src/osd/windows/video.h", + MAME_DIR .. "src/osd/windows/window.cpp", + MAME_DIR .. "src/osd/windows/window.h", + MAME_DIR .. "src/osd/modules/osdwindow.cpp", + MAME_DIR .. "src/osd/modules/osdwindow.h", + MAME_DIR .. "src/osd/windows/winmenu.cpp", + MAME_DIR .. "src/osd/windows/winmain.cpp", + MAME_DIR .. "src/osd/windows/winmain.h", + MAME_DIR .. "src/osd/osdepend.h", + MAME_DIR .. "src/osd/modules/debugger/win/consolewininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/consolewininfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/debugbaseinfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/debugbaseinfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/debugviewinfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/debugviewinfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/debugwininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/debugwininfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/disasmbasewininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/disasmbasewininfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/disasmviewinfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/disasmviewinfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/disasmwininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/disasmwininfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/editwininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/editwininfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/logwininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/logwininfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/logviewinfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/logviewinfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/memoryviewinfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/memoryviewinfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/memorywininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/memorywininfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/pointswininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/pointswininfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/uimetrics.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/uimetrics.h", + MAME_DIR .. "src/osd/modules/debugger/win/debugwin.h", + } + + +project ("ocore_" .. _OPTIONS["osd"]) + uuid (os.uuid("ocore_" .. _OPTIONS["osd"])) + kind (LIBTYPE) + + removeflags { + "SingleOutputDir", + } + + dofile("windows_cfg.lua") + + includedirs { + MAME_DIR .. "3rdparty", + MAME_DIR .. "src/emu", + MAME_DIR .. "src/osd", + MAME_DIR .. "src/osd/modules/file", + MAME_DIR .. "src/lib", + MAME_DIR .. "src/lib/util", + } + + BASE_TARGETOS = "win32" + SDLOS_TARGETOS = "win32" + + includedirs { + MAME_DIR .. "src/osd/windows", + } + + files { + MAME_DIR .. "src/osd/eigccppc.h", + MAME_DIR .. "src/osd/eigccx86.h", + MAME_DIR .. "src/osd/eivc.h", + MAME_DIR .. "src/osd/eivcarm.h", + MAME_DIR .. "src/osd/eivcx86.h", + MAME_DIR .. "src/osd/eminline.h", + MAME_DIR .. "src/osd/osdcomm.h", + MAME_DIR .. "src/osd/osdcore.cpp", + MAME_DIR .. "src/osd/osdcore.h", + MAME_DIR .. "src/osd/strconv.cpp", + MAME_DIR .. "src/osd/strconv.h", + MAME_DIR .. "src/osd/osdsync.cpp", + MAME_DIR .. "src/osd/osdsync.h", + MAME_DIR .. "src/osd/windows/winutf8.cpp", + MAME_DIR .. "src/osd/windows/winutf8.h", + MAME_DIR .. "src/osd/windows/winutil.cpp", + MAME_DIR .. "src/osd/windows/winutil.h", + MAME_DIR .. "src/osd/modules/osdmodule.cpp", + MAME_DIR .. "src/osd/modules/osdmodule.h", + MAME_DIR .. "src/osd/modules/file/windir.cpp", + MAME_DIR .. "src/osd/modules/file/winfile.cpp", + MAME_DIR .. "src/osd/modules/file/winfile.h", + MAME_DIR .. "src/osd/modules/file/winptty.cpp", + MAME_DIR .. "src/osd/modules/file/winsocket.cpp", + MAME_DIR .. "src/osd/modules/lib/osdlib_win32.cpp", + } + + + +-------------------------------------------------- +-- ledutil +-------------------------------------------------- + +if _OPTIONS["with-tools"] then + project("ledutil") + uuid ("061293ca-7290-44ac-b2b5-5913ae8dc9c0") + kind "ConsoleApp" + + flags { + "Symbols", -- always include minimum symbols for executables + } + + if _OPTIONS["SEPARATE_BIN"]~="1" then + targetdir(MAME_DIR) + end + + links { + "ocore_" .. _OPTIONS["osd"], + } + + includedirs { + MAME_DIR .. "src/osd", + } + + files { + MAME_DIR .. "src/osd/windows/ledutil.cpp", + } +end diff --git a/unused/scripts/src/osd/windows_cfg.lua b/unused/scripts/src/osd/windows_cfg.lua new file mode 100644 index 0000000..8faf636 --- /dev/null +++ b/unused/scripts/src/osd/windows_cfg.lua @@ -0,0 +1,67 @@ +-- license:BSD-3-Clause +-- copyright-holders:MAMEdev Team + +defines { + "OSD_WINDOWS", + "WIN32_LEAN_AND_MEAN", + "NOMINMAX", +} + +configuration { "mingw* or vs*" } + defines { + "UNICODE", + "_UNICODE" + } + +configuration { "vs*" } + flags { + "Unicode", + } + +configuration { } + +if not _OPTIONS["MODERN_WIN_API"] then + _OPTIONS["MODERN_WIN_API"] = "0" +end + +if _OPTIONS["MODERN_WIN_API"]=="1" then + defines { + "WINVER=0x0602", + "_WIN32_WINNT=0x0602", + "NTDDI_VERSION=0x06030000", + "MODERN_WIN_API", + } +else + defines { + "_WIN32_WINNT=0x0501", + } +end + +if _OPTIONS["USE_TAPTUN"]=="1" or _OPTIONS["USE_PCAP"]=="1" then + defines { + "USE_NETWORK", + } + if _OPTIONS["USE_TAPTUN"]=="1" then + defines { + "OSD_NET_USE_TAPTUN", + } + end + if _OPTIONS["USE_PCAP"]=="1" then + defines { + "OSD_NET_USE_PCAP", + } + end +end + +if _OPTIONS["USE_SDL"]=="1" then + defines { + "SDLMAME_SDL2=1", + "USE_XINPUT=0", + "USE_SDL=1", + "USE_SDL_SOUND", + } +else + defines { + "USE_SDL=0", + } +end diff --git a/unused/scripts/toolchain.lua b/unused/scripts/toolchain.lua new file mode 100644 index 0000000..4a3eac0 --- /dev/null +++ b/unused/scripts/toolchain.lua @@ -0,0 +1,720 @@ +-- +-- Copyright 2010-2021 Branimir Karadzic. All rights reserved. +-- License: https://github.com/bkaradzic/bx#license-bsd-2-clause +-- + +local naclToolchain = "" +local toolchainPrefix = "" + +if _OPTIONS['TOOLCHAIN'] then + toolchainPrefix = _OPTIONS["TOOLCHAIN"] +end + +newoption { + trigger = "gcc", + value = "GCC", + description = "Choose GCC flavor", + allowed = { + { "android-arm", "Android - ARM" }, + { "android-arm64", "Android - ARM64" }, + { "android-x86", "Android - x86" }, + { "android-x64", "Android - x64" }, + { "asmjs", "Emscripten/asm.js" }, + { "freebsd", "FreeBSD" }, + { "freebsd-clang", "FreeBSD (clang compiler)"}, + { "linux-gcc", "Linux (GCC compiler)" }, + { "linux-clang", "Linux (Clang compiler)" }, + { "mingw32-gcc", "MinGW32" }, + { "mingw64-gcc", "MinGW64" }, + { "mingw-clang", "MinGW (clang compiler)" }, + { "netbsd", "NetBSD" }, + { "netbsd-clang", "NetBSD (clang compiler)"}, + { "openbsd", "OpenBSD" }, + { "osx", "OSX (GCC compiler)" }, + { "osx-clang", "OSX (Clang compiler)" }, + { "solaris", "Solaris" }, + }, +} + +newoption { + trigger = "vs", + value = "toolset", + description = "Choose VS toolset", + allowed = { + { "intel-15", "Intel C++ Compiler XE 15.0" }, + { "clangcl", "Visual Studio 2019 using Clang/LLVM" }, + }, +} + +newoption { + trigger = "with-android", + value = "#", + description = "Set Android platform version (default: android-21).", +} + +function toolchain(_buildDir, _subDir) + + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION) + + local androidPlatform = "android-24" + if _OPTIONS["with-android"] then + androidPlatform = "android-" .. _OPTIONS["with-android"] + elseif _OPTIONS["PLATFORM"]:find("64", -2) then + androidPlatform = "android-24" + end + + if _ACTION == "gmake" or _ACTION == "ninja" then + + if nil == _OPTIONS["gcc"] or nil == _OPTIONS["gcc_version"] then + print("GCC flavor and version must be specified!") + os.exit(1) + end + + if string.find(_OPTIONS["gcc"], "android") then + -- 64-bit android platform requires >= 21 + if _OPTIONS["PLATFORM"]:find("64", -2) and tonumber(androidPlatform:sub(9)) < 21 then + error("64-bit android requires platform 21 or higher") + end + if not os.getenv("ANDROID_NDK_ROOT") then + print("Set ANDROID_NDK_ROOT environment variable.") + end + if not os.getenv("ANDROID_NDK_LLVM") then + print("Set ANDROID_NDK_LLVM envrionment variable.") + end + platform_ndk_env = "ANDROID_NDK_" .. _OPTIONS["PLATFORM"]:upper() + if not os.getenv(platform_ndk_env) then + print("Set " .. platform_ndk_env .. " environment variable.") + end + + local platformToolchainMap = { + ['arm'] = "arm-linux-androideabi", + ['arm64'] = "aarch64-linux-android", + ['x86'] = "i686-linux-android", + ['x64'] = "x86_64-linux-android", + } + + toolchainPrefix = os.getenv(platform_ndk_env) .. "/bin/" .. platformToolchainMap[_OPTIONS["PLATFORM"]] .. "-" + + premake.gcc.cc = "$(ANDROID_NDK_LLVM)/bin/clang" + premake.gcc.cxx = "$(ANDROID_NDK_LLVM)/bin/clang++" + premake.gcc.ar = toolchainPrefix .. "ar" + premake.gcc.llvm = true + + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-android-" .. _OPTIONS["PLATFORM"]) + end + + if "asmjs" == _OPTIONS["gcc"] then + + if not os.getenv("EMSCRIPTEN") then + print("Set EMSCRIPTEN enviroment variables.") + end + + premake.gcc.cc = "$(EMSCRIPTEN)/emcc" + premake.gcc.cxx = "$(EMSCRIPTEN)/em++" + premake.gcc.ar = "$(EMSCRIPTEN)/emar" + premake.gcc.llvm = true + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-asmjs") + end + + if "freebsd" == _OPTIONS["gcc"] then + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-freebsd") + end + + if "freebsd-clang" == _OPTIONS["gcc"] then + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-freebsd-clang") + end + + if "netbsd" == _OPTIONS["gcc"] then + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-netbsd") + end + + if "netbsd-clang" == _OPTIONS["gcc"] then + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-netbsd-clang") + end + + if "openbsd" == _OPTIONS["gcc"] then + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-openbsd") + end + + if "linux-gcc" == _OPTIONS["gcc"] then + -- Force gcc-4.2 on ubuntu-intrepid + if _OPTIONS["distro"]=="ubuntu-intrepid" then + premake.gcc.cc = "@gcc -V 4.2" + premake.gcc.cxx = "@g++-4.2" + end + premake.gcc.ar = "ar" + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-linux") + end + + if "solaris" == _OPTIONS["gcc"] then + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-solaris") + end + + + if "linux-clang" == _OPTIONS["gcc"] then + premake.gcc.cc = "clang" + premake.gcc.cxx = "clang++" + premake.gcc.ar = "ar" + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-linux-clang") + end + + if "mingw32-gcc" == _OPTIONS["gcc"] then + if not os.getenv("MINGW32") then + print("Set MINGW32 envrionment variable.") + end + if toolchainPrefix == nil or toolchainPrefix == "" then + toolchainPrefix = "$(MINGW32)/bin/i686-w64-mingw32-" + end + premake.gcc.cc = toolchainPrefix .. "gcc" + premake.gcc.cxx = toolchainPrefix .. "g++" + premake.gcc.ar = toolchainPrefix .. "gcc-ar" + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-mingw32-gcc") + end + + if "mingw64-gcc" == _OPTIONS["gcc"] then + if not os.getenv("MINGW64") then + print("Set MINGW64 envrionment variable.") + end + if toolchainPrefix == nil or toolchainPrefix == "" then + toolchainPrefix = "$(MINGW64)/bin/x86_64-w64-mingw32-" + end + premake.gcc.cc = toolchainPrefix .. "gcc" + premake.gcc.cxx = toolchainPrefix .. "g++" + premake.gcc.ar = toolchainPrefix .. "gcc-ar" + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-mingw64-gcc") + end + + if "mingw-clang" == _OPTIONS["gcc"] then + premake.gcc.cc = "clang" + premake.gcc.cxx = "clang++" + premake.gcc.ar = "llvm-ar" + premake.gcc.llvm = true + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-mingw-clang") + end + + if "osx" == _OPTIONS["gcc"] then + if os.is("linux") then + premake.gcc.cc = toolchainPrefix .. "clang" + premake.gcc.cxx = toolchainPrefix .. "clang++" + premake.gcc.ar = toolchainPrefix .. "ar" + end + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-osx") + end + + if "osx-clang" == _OPTIONS["gcc"] then + premake.gcc.cc = toolchainPrefix .. "clang" + premake.gcc.cxx = toolchainPrefix .. "clang++" + premake.gcc.ar = toolchainPrefix .. "ar" + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-osx-clang") + end + elseif _ACTION == "vs2019" then + + if "clangcl" == _OPTIONS["vs"] then + premake.vstudio.toolset = ("ClangCL") + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-clang") + end + + if "intel-15" == _OPTIONS["vs"] then + premake.vstudio.toolset = "Intel C++ Compiler XE 15.0" + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-intel") + end + end + + if (_OPTIONS["CC"] ~= nil) then + premake.gcc.cc = _OPTIONS["CC"] + end + if (_OPTIONS["CXX"] ~= nil) then + premake.gcc.cxx = _OPTIONS["CXX"] + end + if (_OPTIONS["LD"] ~= nil) then + premake.gcc.ld = _OPTIONS["LD"] + end + if (_OPTIONS["AR"] ~= nil) then + premake.gcc.ar = _OPTIONS["AR"] + end + + configuration {} -- reset configuration + + + configuration { "x32", "vs*" } + objdir (_buildDir .. _ACTION .. "/obj") + + configuration { "x32", "vs*", "Release" } + targetdir (_buildDir .. _ACTION .. "/bin/x32/Release") + + configuration { "x32", "vs*", "Debug" } + targetdir (_buildDir .. _ACTION .. "/bin/x32/Debug") + + configuration { "x64", "vs*" } + defines { "_WIN64" } + objdir (_buildDir .. _ACTION .. "/obj") + + configuration { "x64", "vs*", "Release" } + targetdir (_buildDir .. _ACTION .. "/bin/x64/Release") + + configuration { "x64", "vs*", "Debug" } + targetdir (_buildDir .. _ACTION .. "/bin/x64/Debug") + + configuration { "x32", "vs*-clang" } + objdir (_buildDir .. _ACTION .. "-clang/obj") + + configuration { "x32", "vs*-clang", "Release" } + targetdir (_buildDir .. _ACTION .. "-clang/bin/x32/Release") + + configuration { "x32", "vs*-clang", "Debug" } + targetdir (_buildDir .. _ACTION .. "-clang/bin/x32/Debug") + + configuration { "x64", "vs*-clang" } + objdir (_buildDir .. _ACTION .. "-clang/obj") + + configuration { "x64", "vs*-clang", "Release" } + targetdir (_buildDir .. _ACTION .. "-clang/bin/x64/Release") + + configuration { "x64", "vs*-clang", "Debug" } + targetdir (_buildDir .. _ACTION .. "-clang/bin/x64/Debug") + + configuration { "vs*-clang" } + buildoptions { + "-Qunused-arguments", + } + + configuration { "mingw*" } + defines { "WIN32" } + + configuration { "x32", "mingw32-gcc" } + objdir (_buildDir .. "mingw-gcc" .. "/obj") + buildoptions { "-m32" } + + configuration { "x32", "mingw32-gcc", "Release" } + targetdir (_buildDir .. "mingw-gcc" .. "/bin/x32/Release") + + configuration { "x32", "mingw32-gcc", "Debug" } + targetdir (_buildDir .. "mingw-gcc" .. "/bin/x32/Debug") + + configuration { "x64", "mingw64-gcc" } + objdir (_buildDir .. "mingw-gcc" .. "/obj") + buildoptions { "-m64" } + + configuration { "x64", "mingw64-gcc", "Release" } + targetdir (_buildDir .. "mingw-gcc" .. "/bin/x64/Release") + + configuration { "x64", "mingw64-gcc", "Debug" } + targetdir (_buildDir .. "mingw-gcc" .. "/bin/x64/Debug") + + configuration { "mingw-clang" } + buildoptions { + "-femulated-tls", + } + linkoptions { + "-Wl,--allow-multiple-definition", + } + + configuration { "x32", "mingw-clang" } + objdir ( _buildDir .. "mingw-clang/obj") + buildoptions { "-m32" } + + configuration { "x32", "mingw-clang", "Release" } + targetdir (_buildDir .. "mingw-clang/bin/x32/Release") + + configuration { "x32", "mingw-clang", "Debug" } + targetdir (_buildDir .. "mingw-clang/bin/x32/Debug") + + configuration { "x64", "mingw-clang" } + objdir (_buildDir .. "mingw-clang/obj") + buildoptions { "-m64" } + + configuration { "x64", "mingw-clang", "Release" } + targetdir (_buildDir .. "mingw-clang/bin/x64/Release") + + configuration { "x64", "mingw-clang", "Debug" } + targetdir (_buildDir .. "mingw-clang/bin/x64/Debug") + + configuration { "linux-gcc", "x32" } + objdir (_buildDir .. "linux_gcc" .. "/obj") + buildoptions { + "-m32", + } + + configuration { "linux-gcc", "x32", "Release" } + targetdir (_buildDir .. "linux_gcc" .. "/bin/x32/Release") + + configuration { "linux-gcc", "x32", "Debug" } + targetdir (_buildDir .. "linux_gcc" .. "/bin/x32/Debug") + + configuration { "linux-gcc", "x64" } + objdir (_buildDir .. "linux_gcc" .. "/obj") + buildoptions { + "-m64", + } + + configuration { "linux-gcc", "x64", "Release" } + targetdir (_buildDir .. "linux_gcc" .. "/bin/x64/Release") + + configuration { "linux-gcc", "x64", "Debug" } + targetdir (_buildDir .. "linux_gcc" .. "/bin/x64/Debug") + + configuration { "linux-clang", "x32" } + objdir (_buildDir .. "linux_clang" .. "/obj") + buildoptions { + "-m32", + } + + configuration { "linux-clang", "x32", "Release" } + targetdir (_buildDir .. "linux_clang" .. "/bin/x32/Release") + + configuration { "linux-clang", "x32", "Debug" } + targetdir (_buildDir .. "linux_clang" .. "/bin/x32/Debug") + + configuration { "linux-clang", "x64" } + objdir (_buildDir .. "linux_clang" .. "/obj") + buildoptions { + "-m64", + } + + configuration { "linux-clang", "x64", "Release" } + targetdir (_buildDir .. "linux_clang" .. "/bin/x64/Release") + + configuration { "linux-clang", "x64", "Debug" } + targetdir (_buildDir .. "linux_clang" .. "/bin/x64/Debug") + + configuration { "solaris", "x32" } + objdir (_buildDir .. "solaris" .. "/obj") + buildoptions { + "-m32", + } + + configuration { "solaris", "x32", "Release" } + targetdir (_buildDir .. "solaris" .. "/bin/x32/Release") + + configuration { "solaris", "x32", "Debug" } + targetdir (_buildDir .. "solaris" .. "/bin/x32/Debug") + + configuration { "solaris", "x64" } + objdir (_buildDir .. "solaris" .. "/obj") + buildoptions { + "-m64", + } + + configuration { "solaris", "x64", "Release" } + targetdir (_buildDir .. "solaris" .. "/bin/x64/Release") + + configuration { "solaris", "x64", "Debug" } + targetdir (_buildDir .. "solaris" .. "/bin/x64/Debug") + + configuration { "freebsd", "x32" } + objdir (_buildDir .. "freebsd" .. "/obj") + buildoptions { + "-m32", + } + + configuration { "freebsd", "x32", "Release" } + targetdir (_buildDir .. "freebsd" .. "/bin/x32/Release") + + configuration { "freebsd", "x32", "Debug" } + targetdir (_buildDir .. "freebsd" .. "/bin/x32/Debug") + + configuration { "freebsd", "x64" } + objdir (_buildDir .. "freebsd" .. "/obj") + buildoptions { + "-m64", + } + configuration { "freebsd", "x64", "Release" } + targetdir (_buildDir .. "freebsd" .. "/bin/x64/Release") + + configuration { "freebsd", "x64", "Debug" } + targetdir (_buildDir .. "freebsd" .. "/bin/x64/Debug") + + configuration { "netbsd", "x32" } + objdir (_buildDir .. "netbsd" .. "/obj") + buildoptions { + "-m32", + } + configuration { "netbsd", "x32", "Release" } + targetdir (_buildDir .. "netbsd" .. "/bin/x32/Release") + + configuration { "netbsd", "x32", "Debug" } + targetdir (_buildDir .. "netbsd" .. "/bin/x32/Debug") + + configuration { "netbsd", "x64" } + objdir (_buildDir .. "netbsd" .. "/obj") + buildoptions { + "-m64", + } + configuration { "netbsd", "x64", "Release" } + targetdir (_buildDir .. "netbsd" .. "/bin/x64/Release") + + configuration { "netbsd", "x64", "Debug" } + targetdir (_buildDir .. "netbsd" .. "/bin/x64/Debug") + + configuration { "openbsd", "x32" } + objdir (_buildDir .. "openbsd" .. "/obj") + buildoptions { + "-m32", + } + configuration { "openbsd", "x32", "Release" } + targetdir (_buildDir .. "openbsd" .. "/bin/x32/Release") + + configuration { "openbsd", "x32", "Debug" } + targetdir (_buildDir .. "openbsd" .. "/bin/x32/Debug") + + configuration { "openbsd", "x64" } + objdir (_buildDir .. "openbsd" .. "/obj") + buildoptions { + "-m64", + } + configuration { "openbsd", "x64", "Release" } + targetdir (_buildDir .. "openbsd" .. "/bin/x64/Release") + + configuration { "openbsd", "x64", "Debug" } + targetdir (_buildDir .. "openbsd" .. "/bin/x64/Debug") + + configuration { "android-*", "Release" } + targetdir (_buildDir .. "android/bin/" .. _OPTIONS["PLATFORM"] .. "/Release") + + configuration { "android-*", "Debug" } + targetdir (_buildDir .. "android/bin/" .. _OPTIONS["PLATFORM"] .. "/Debug") + + configuration { "android-*" } + objdir (_buildDir .. "android/obj/" .. _OPTIONS["PLATFORM"]) + includedirs { + MAME_DIR .. "3rdparty/bgfx/3rdparty/khronos", + "$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/libcxx/include", + "$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/include", + "$(ANDROID_NDK_ROOT)/sysroot/usr/include", + "$(ANDROID_NDK_ROOT)/sources/android/support/include", + "$(ANDROID_NDK_ROOT)/sources/android/native_app_glue", + } + linkoptions { + "-nostdlib", + } + flags { + "NoImportLib", + } + links { + "c", + "dl", + "m", + "android", + "log", + "c++_static", + "c++abi", + "stdc++", + "gcc", + } + buildoptions_c { + "-Wno-strict-prototypes", + } + buildoptions { + "-fpic", + "-ffunction-sections", + "-funwind-tables", + "-fstack-protector-strong", + "-no-canonical-prefixes", + "-fno-integrated-as", + "-Wunused-value", + "-Wundef", + "-Wno-cast-align", + "-Wno-unknown-attributes", + "-Wno-macro-redefined", + "-DASIO_HAS_STD_STRING_VIEW", + "-Wno-unused-function", + } + linkoptions { + "-no-canonical-prefixes", + "-Wl,--no-undefined", + "-Wl,-z,noexecstack", + "-Wl,-z,relro", + "-Wl,-z,now", + } + + + configuration { "android-arm" } + libdirs { + "$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a", + "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm/usr/lib", + } + includedirs { + "$(ANDROID_NDK_ROOT)/sysroot/usr/include/arm-linux-androideabi", + } + buildoptions { + "-gcc-toolchain $(ANDROID_NDK_ARM)", + "-target armv7-none-linux-androideabi", + "-march=armv7-a", + "-mfloat-abi=softfp", + "-mfpu=vfpv3-d16", + "-mthumb", + } + links { + "unwind", + } + linkoptions { + "-gcc-toolchain $(ANDROID_NDK_ARM)", + "--sysroot=$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm", + "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm/usr/lib/crtbegin_so.o", + "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm/usr/lib/crtend_so.o", + "-target armv7-none-linux-androideabi", + "-march=armv7-a", + "-mthumb", + } + + configuration { "android-arm64" } + libdirs { + "$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/arm64-v8a", + "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm64/usr/lib64", + } + includedirs { + "$(ANDROID_NDK_ROOT)/sysroot/usr/include/aarch64-linux-android", + } + buildoptions { + "-gcc-toolchain $(ANDROID_NDK_ARM64)", + "-target aarch64-none-linux-android", + } + linkoptions { + "-gcc-toolchain $(ANDROID_NDK_ARM64)", + "--sysroot=$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm64", + "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm64/usr/lib/crtbegin_so.o", + "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm64/usr/lib/crtend_so.o", + "-target aarch64-none-linux-android", + } + + configuration { "android-x86" } + libdirs { + "$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/x86", + "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86/usr/lib", + } + includedirs { + "$(ANDROID_NDK_ROOT)/sysroot/usr/include/i686-linux-android", + } + buildoptions { + "-gcc-toolchain $(ANDROID_NDK_X86)", + "-target i686-none-linux-android", + "-mssse3" + } + linkoptions { + "-gcc-toolchain $(ANDROID_NDK_X86)", + "-target i686-none-linux-android", + "-mssse3", + "--sysroot=$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86", + "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86/usr/lib/crtbegin_so.o", + "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86/usr/lib/crtend_so.o", + } + + configuration { "android-x64" } + libdirs { + "$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/x86_64", + "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86_64/usr/lib64", + } + includedirs { + "$(ANDROID_NDK_ROOT)/sysroot/usr/include/x86_64-linux-android", + } + buildoptions { + "-gcc-toolchain $(ANDROID_NDK_X64)", + "-target x86_64-none-linux-android", + } + linkoptions { + "-gcc-toolchain $(ANDROID_NDK_X64)", + "-target x86_64-none-linux-android", + "--sysroot=$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86_64", + "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86_64/usr/lib64/crtbegin_so.o", + "$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86_64/usr/lib64/crtend_so.o", + } + + configuration { "asmjs" } + targetdir (_buildDir .. "asmjs" .. "/bin") + objdir (_buildDir .. "asmjs" .. "/obj") + buildoptions { + "-Wno-cast-align", + "-Wno-tautological-compare", + "-Wno-self-assign-field", + "-Wno-format-security", + "-Wno-inline-new-delete", + "-Wno-constant-logical-operand", + "-Wno-absolute-value", + "-Wno-unknown-warning-option", + "-Wno-extern-c-compat", + } + + configuration { "osx*", "x32", "not arm64" } + objdir (_buildDir .. "osx_clang" .. "/obj") + buildoptions { + "-m32", + } + configuration { "osx*", "x32", "not arm64", "Release" } + targetdir (_buildDir .. "osx_clang" .. "/bin/x32/Release") + + configuration { "osx*", "x32", "not arm64", "Debug" } + targetdir (_buildDir .. "osx_clang" .. "/bin/x32/Debug") + + configuration { "osx*", "x64", "not arm64" } + objdir (_buildDir .. "osx_clang" .. "/obj") + buildoptions { + "-m64", "-DHAVE_IMMINTRIN_H=1", + } + + configuration { "osx*", "x64", "not arm64", "Release" } + targetdir (_buildDir .. "osx_clang" .. "/bin/x64/Release") + + configuration { "osx*", "x64", "not arm64", "Debug" } + targetdir (_buildDir .. "osx_clang" .. "/bin/x64/Debug") + + configuration { "osx*", "arm64" } + objdir (_buildDir .. "osx_clang" .. "/obj") + buildoptions { + "-m64", "-DHAVE_IMMINTRIN_H=0", "-DSDL_DISABLE_IMMINTRIN_H=1", "-DHAVE_SSE=0" + } + + configuration { "osx*", "arm64", "Release" } + targetdir (_buildDir .. "osx_clang" .. "/bin/x64/Release") + + configuration { "osx*", "arm64", "Debug" } + targetdir (_buildDir .. "osx_clang" .. "/bin/x64/Debug") + + configuration {} -- reset configuration + + return true +end + +function strip() + if _OPTIONS["STRIP_SYMBOLS"]~="1" then + return true + end + + configuration { "osx-*" } + postbuildcommands { + "$(SILENT) echo Stripping symbols.", + "$(SILENT) " .. (_OPTIONS['TOOLCHAIN'] and toolchainPrefix) .. "strip \"$(TARGET)\"", + } + + configuration { "android-*" } + postbuildcommands { + "$(SILENT) echo Stripping symbols.", + "$(SILENT) " .. toolchainPrefix .. "strip -s \"$(TARGET)\"" + } + + configuration { "linux-*" } + postbuildcommands { + "$(SILENT) echo Stripping symbols.", + "$(SILENT) strip -s \"$(TARGET)\"" + } + + configuration { "mingw*", "x64" } + postbuildcommands { + "$(SILENT) echo Stripping symbols.", + "$(SILENT) " .. (_OPTIONS['TOOLCHAIN'] or "$(MINGW64)/bin/") .. "strip -s \"$(TARGET)\"", + } + configuration { "mingw*", "x32" } + postbuildcommands { + "$(SILENT) echo Stripping symbols.", + "$(SILENT) " .. (_OPTIONS['TOOLCHAIN'] or "$(MINGW32)/bin/") .. "strip -s \"$(TARGET)\"", + } + + configuration { "asmjs" } + postbuildcommands { + "$(SILENT) echo Running asmjs finalize.", + "$(SILENT) $(EMSCRIPTEN)/emcc -O2 -s TOTAL_MEMORY=268435456 \"$(TARGET)\" -o \"$(TARGET)\".html" + -- ALLOW_MEMORY_GROWTH + } + + configuration {} -- reset configuration +end +