mirror of
https://github.com/charlesthobe/chdman.git
synced 2024-11-24 07:25:31 +00:00
CMake building done, SDL still links dynamically
This commit is contained in:
parent
64ebd0339f
commit
bc53e23e0a
16
.gitignore
vendored
16
.gitignore
vendored
@ -1,7 +1,4 @@
|
|||||||
#quack
|
#quack
|
||||||
# osx annoyances
|
|
||||||
.DS_Store
|
|
||||||
|
|
||||||
# binaries folder
|
# binaries folder
|
||||||
/bin/
|
/bin/
|
||||||
/Build/
|
/Build/
|
||||||
@ -34,16 +31,3 @@ config.h
|
|||||||
*.so
|
*.so
|
||||||
*.dylib
|
*.dylib
|
||||||
|
|
||||||
# qt creator
|
|
||||||
CMakeLists.txt.user
|
|
||||||
|
|
||||||
# python bytecode
|
|
||||||
__pycache__
|
|
||||||
|
|
||||||
# other repos
|
|
||||||
/dep/mac
|
|
||||||
/android
|
|
||||||
|
|
||||||
# UWP crap
|
|
||||||
Generated Files
|
|
||||||
/packages
|
|
||||||
|
24
CMakeLists.txt
Normal file
24
CMakeLists.txt
Normal file
@ -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)
|
37
cmake_subdirs/7z/CMakeLists.txt
Normal file
37
cmake_subdirs/7z/CMakeLists.txt
Normal file
@ -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
|
||||||
|
)
|
8
cmake_subdirs/CMakeLists.txt
Normal file
8
cmake_subdirs/CMakeLists.txt
Normal file
@ -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)
|
||||||
|
|
47
cmake_subdirs/expat/CMakeLists.txt
Normal file
47
cmake_subdirs/expat/CMakeLists.txt
Normal file
@ -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
|
||||||
|
)
|
42
cmake_subdirs/flac/CMakeLists.txt
Normal file
42
cmake_subdirs/flac/CMakeLists.txt
Normal file
@ -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
|
||||||
|
)
|
29
cmake_subdirs/ocore_sdl/CMakeLists.txt
Normal file
29
cmake_subdirs/ocore_sdl/CMakeLists.txt
Normal file
@ -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
|
||||||
|
)
|
10
cmake_subdirs/utf8proc/CMakeLists.txt
Normal file
10
cmake_subdirs/utf8proc/CMakeLists.txt
Normal file
@ -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
|
||||||
|
)
|
125
cmake_subdirs/utils/CMakeLists.txt
Normal file
125
cmake_subdirs/utils/CMakeLists.txt
Normal file
@ -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
|
||||||
|
)
|
22
cmake_subdirs/zlib/CMakeLists.txt
Normal file
22
cmake_subdirs/zlib/CMakeLists.txt
Normal file
@ -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
|
||||||
|
)
|
503
unused/deprecated_big_cmake/CMakeLists.txt
Normal file
503
unused/deprecated_big_cmake/CMakeLists.txt
Normal file
@ -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)
|
128
unused/scripts/extlib.lua
Normal file
128
unused/scripts/extlib.lua
Normal file
@ -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 <libname:includedir>)
|
||||||
|
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
|
1469
unused/scripts/genie.lua
Normal file
1469
unused/scripts/genie.lua
Normal file
File diff suppressed because it is too large
Load Diff
2348
unused/scripts/src/3rdparty.lua
Normal file
2348
unused/scripts/src/3rdparty.lua
Normal file
File diff suppressed because it is too large
Load Diff
177
unused/scripts/src/osd/mac.lua
Normal file
177
unused/scripts/src/osd/mac.lua
Normal file
@ -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",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
40
unused/scripts/src/osd/mac_cfg.lua
Normal file
40
unused/scripts/src/osd/mac_cfg.lua
Normal file
@ -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 { }
|
||||||
|
|
660
unused/scripts/src/osd/modules.lua
Normal file
660
unused/scripts/src/osd/modules.lua
Normal file
@ -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
|
504
unused/scripts/src/osd/sdl.lua
Normal file
504
unused/scripts/src/osd/sdl.lua
Normal file
@ -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=<path>",
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
174
unused/scripts/src/osd/sdl_cfg.lua
Normal file
174
unused/scripts/src/osd/sdl_cfg.lua
Normal file
@ -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 { }
|
||||||
|
|
264
unused/scripts/src/osd/windows.lua
Normal file
264
unused/scripts/src/osd/windows.lua
Normal file
@ -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
|
67
unused/scripts/src/osd/windows_cfg.lua
Normal file
67
unused/scripts/src/osd/windows_cfg.lua
Normal file
@ -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
|
720
unused/scripts/toolchain.lua
Normal file
720
unused/scripts/toolchain.lua
Normal file
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user