2022-05-12 01:54:48 +08:00
|
|
|
cmake_minimum_required(VERSION 3.10)
|
2018-12-22 01:17:44 +08:00
|
|
|
|
2018-05-09 18:07:18 +08:00
|
|
|
option(PANDORA "Set to ON if targeting an OpenPandora device" ${PANDORA})
|
2019-12-21 02:42:12 +08:00
|
|
|
option(PYRA "Set to ON if targeting an OpenPandora device" ${PYRA})
|
|
|
|
option(RPI2 "Set to ON if targeting an RaspberryPI2 device" ${RPI2})
|
|
|
|
option(RPI3 "Set to ON if targeting an RaspberryPI3 device" ${RPI3})
|
2020-01-10 21:49:36 +08:00
|
|
|
option(RPI4 "Set to ON if targeting an RaspberryPI4 device" ${RPI4})
|
2023-02-10 22:11:29 +08:00
|
|
|
option(RPI3ARM64 "Set to ON if targeting an RaspberryPI3 device with multiarch arm64 and armhf" ${RPI3ARM64})
|
2021-01-07 03:23:21 +08:00
|
|
|
option(RPI4ARM64 "Set to ON if targeting an RaspberryPI4 device with multiarch arm64 and armhf" ${RPI4ARM64})
|
2021-03-12 07:26:41 +08:00
|
|
|
option(GOA_CLONE "Set to ON if targeting GO Advance clones, like RG351p/v, Gameforce Chi, RGB10..." ${GOA_CLONE})
|
2021-11-04 04:28:58 +08:00
|
|
|
option(RK3288 "Set to ON if targeting an Rockchip RK3288 based device" ${RK3288})
|
2020-11-12 01:08:08 +08:00
|
|
|
option(RK3399 "Set to ON if targeting an Rockchip RK3399 based device" ${RK3399})
|
2023-02-25 01:02:29 +08:00
|
|
|
option(RK3588 "Set to ON if targeting an Rockchip RK3588 / RK3588S based device" ${RK3588})
|
2024-06-18 04:56:11 +08:00
|
|
|
option(ODROIDN2 "Set to ON if targeting an ODROID-N2 device" ${ODROIDN2})
|
2022-07-08 07:54:13 +08:00
|
|
|
option(TEGRAX1 "Set to ON if targeting an Tegra X1 (ARM64) based device" ${TEGRAX1})
|
|
|
|
option(TEGRAX1ARM32 "Set to ON if targeting an Tegra X1 (ARM32) based device" ${TEGRAX1ARM32})
|
2024-01-26 15:21:20 +08:00
|
|
|
option(TEGRA_T194 "Set to ON if targeting an Tegra Xavier based device" ${TEGRA_T194})
|
|
|
|
option(TEGRA_T234 "Set to ON if targeting an Tegra Orin based device" ${TEGRA_T234})
|
2021-10-02 15:58:25 +08:00
|
|
|
option(PHYTIUM "Set to ON if targeting an Phytium (D2000 or FT2000/4) based device" ${PHYTIUM})
|
2020-04-16 15:30:40 +08:00
|
|
|
option(GAMESHELL "Set to ON if targeting a GameShell device" ${GAMESHELL})
|
2024-06-18 04:56:11 +08:00
|
|
|
option(ODROIDXU4 "Set to ON if targeting an ODROID-XU4 device" ${ODROIDXU4})
|
2020-12-25 05:14:50 +08:00
|
|
|
option(POWER9 "Set to ON if targeting a POWER9 processor" ${POWER9})
|
2021-10-18 02:39:47 +08:00
|
|
|
option(SD845 "Set to ON if targeting a Snapragon 845 based device" ${SD845})
|
2024-11-05 22:43:49 +08:00
|
|
|
option(SD865 "Set to ON if targeting a Snapragon 865 based device" ${SD865})
|
2023-09-25 19:45:58 +08:00
|
|
|
option(SD888 "Set to ON if targeting a Snapragon 888 based device" ${SD888})
|
|
|
|
option(ADLINK "Set to ON if targeting an ADLink AmpereAltra based device" ${ADLINK})
|
2021-10-30 23:33:59 +08:00
|
|
|
option(A64 "Set to ON if targeting an Allwinner A64 based device" ${A64})
|
2023-02-25 01:02:29 +08:00
|
|
|
option(ARM64 "Set to ON if targeting a generic ARM64 based device" ${ARM64})
|
2023-03-06 03:58:33 +08:00
|
|
|
option(BAD_SIGNAL "Set to ON to activate the workaround for incoherent si_info on SIGSEGV" ${BAD_SIGNAL})
|
2022-04-17 06:16:56 +08:00
|
|
|
option(LX2160A "Set to ON if targeting an LX2160A based device" ${LX2160A})
|
2021-04-12 18:44:28 +08:00
|
|
|
option(ANDROID "Set to ON if targeting an Android device" ${ANDROID})
|
2023-11-28 00:37:19 +08:00
|
|
|
option(TERMUX "Set to ON if targeting an Android device with Termux" ${TERMUX})
|
2018-11-10 16:47:20 +08:00
|
|
|
option(USE_CCACHE "Set to ON to use ccache if present in the system" ${USE_CCACHE})
|
2019-01-31 18:48:25 +08:00
|
|
|
option(HAVE_TRACE "Set to ON to have Trace ability (needs ZydisInfo library)" ${HAVE_TRACE})
|
2019-06-20 22:50:19 +08:00
|
|
|
option(NOLOADADDR "Set to ON to avoid fixing the load address of Box86" ${NO_LOADAADR})
|
2019-11-23 19:50:52 +08:00
|
|
|
option(NOGETCLOCK "Set to ON to avoid using clock_gettime with CLOCK_MONOTONIC_COARSE for RDTSC opcode (use gltimeofday instead)" ${NOGETCLOCK})
|
2020-10-06 16:59:12 +08:00
|
|
|
option(NOGIT "Set to ON if not building from a git clone repo (like when building from a zip download from github)" ${NOGIT})
|
2023-05-04 03:43:16 +08:00
|
|
|
option(NO_LIB_INSTALL "Set ON to not install a few x86 libs that are used by many program" ${NO_LIB_INSTALL})
|
|
|
|
option(NO_CONF_INSTALL "Set ON to not install config files" ${NO_CONF_INSTALL})
|
|
|
|
|
2024-11-05 22:41:26 +08:00
|
|
|
if(PANDORA OR PYRA OR RPI2 OR RPI3 OR RPI4 OR GAMESHELL OR ODROIDXU4 OR GOA_CLONE OR RK3288 OR RK3399 OR ODROIDN2 OR TEGRAX1 OR TEGRAX1ARM32 OR TEGRA_T194 OR TEGRA_T234 OR RPI3ARM64 OR RPI4ARM64 OR PHYTIUM OR SD845 OR SD865 OR SD888 OR ADLINK OR A64 OR LX2160A OR ARM64 OR RK3588)
|
2020-11-12 01:08:08 +08:00
|
|
|
set(LD80BITS OFF CACHE BOOL "")
|
|
|
|
set(NOALIGN OFF CACHE BOOL "")
|
|
|
|
set(ARM_DYNAREC ON CACHE BOOL "")
|
2023-03-06 03:58:33 +08:00
|
|
|
if(RK3588)
|
|
|
|
set(BAD_SIGNAL ON CACHE BOOL "")
|
|
|
|
endif()
|
2020-11-12 01:08:08 +08:00
|
|
|
endif()
|
2023-11-28 00:37:19 +08:00
|
|
|
if(TERMUX)
|
|
|
|
set(ANDROID ON CACHE BOOL "")
|
2023-11-28 19:10:29 +08:00
|
|
|
set(TERMUX_PATH "/data/data/com.termux/files")
|
2023-11-28 00:37:19 +08:00
|
|
|
endif()
|
2021-04-12 18:44:28 +08:00
|
|
|
if(ANDROID)
|
|
|
|
set(NOLOADADDR ON CACHE BOOL "")
|
2023-09-02 17:15:28 +08:00
|
|
|
set(BAD_SIGNAL ON CACHE BOOL "")
|
2021-04-12 18:44:28 +08:00
|
|
|
endif()
|
2020-11-12 01:08:08 +08:00
|
|
|
option(LD80BITS "Set to ON if host device have 80bits long double (i.e. i386)" ${LD80BITS})
|
|
|
|
option(NOALIGN "Set to ON if host device doesn't need re-align (i.e. i386)" ${NOALIGN})
|
2021-03-15 20:47:10 +08:00
|
|
|
option(ARM_DYNAREC "Set to ON to use ARM Dynamic Recompilation" ${ARM_DYNAREC})
|
2020-12-25 05:14:50 +08:00
|
|
|
option(POWERPCLE "Set to ON if targeting a little-endian PowerPC device" ${POWERPCLE})
|
|
|
|
option(SYSV_VARARG "Set to ON if host device uses SysVR4 vararg calling convention" ${SYSV_VARARG})
|
2018-05-09 18:07:18 +08:00
|
|
|
|
2020-05-05 19:21:39 +08:00
|
|
|
if(${CMAKE_VERSION} VERSION_LESS "3.12.2")
|
2020-05-07 01:28:14 +08:00
|
|
|
find_package(PythonInterp 3)
|
2020-05-05 19:21:39 +08:00
|
|
|
if(NOT PYTHONINTERP_FOUND)
|
|
|
|
message( FATAL_ERROR "You need a Python interpretor, CMake will exit." )
|
|
|
|
endif()
|
2020-05-07 01:28:14 +08:00
|
|
|
if(${PYTHON_VERSION_MAJOR} LESS 3)
|
2020-05-05 19:21:39 +08:00
|
|
|
message( FATAL_ERROR "You need a Python 3 interpretor, CMake will exit." )
|
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
find_package(Python3)
|
|
|
|
if(NOT Python3_Interpreter_FOUND)
|
|
|
|
message( FATAL_ERROR "You need a Python interpretor, CMake will exit." )
|
|
|
|
endif()
|
|
|
|
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE} CACHE INTERNAL "The Python3 executable" FORCE)
|
2019-09-15 15:05:32 +08:00
|
|
|
endif()
|
|
|
|
|
2022-01-05 12:53:18 +08:00
|
|
|
cmake_host_system_information(RESULT CMAKE_HOST_SYSTEM_PROCESSOR QUERY OS_PLATFORM)
|
|
|
|
|
2024-10-29 23:56:37 +08:00
|
|
|
if("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "aarch64" AND (RK3399 OR ODROIDN2 OR TEGRAX1 OR TEGRA_T194 OR TEGRA_T234 OR RPI3ARM64 OR RPI4ARM64 OR PHYTIUM OR SD845 OR SD888 OR ADLINK OR A64 OR LX2160A OR RK3588 OR ARM64))
|
2024-07-16 16:00:03 +08:00
|
|
|
set(COMPILER_TRIPLE arm-linux-gnueabihf-gcc)
|
|
|
|
find_program(COMPILER_FOUND ${COMPILER_TRIPLE})
|
|
|
|
|
|
|
|
if(COMPILER_FOUND)
|
|
|
|
set(CMAKE_C_COMPILER ${COMPILER_FOUND})
|
|
|
|
else()
|
|
|
|
message(STATUS "Cross compiler ${COMPILER_TRIPLE} not found, using CC or -DCMAKE_C_COMPILER")
|
|
|
|
endif()
|
2020-11-12 01:08:08 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
project(box86 C ASM)
|
|
|
|
|
|
|
|
enable_testing()
|
|
|
|
|
2024-10-29 23:56:37 +08:00
|
|
|
string(COMPARE EQUAL "${CMAKE_SYSTEM_PROCESSOR}" "i686" _x86)
|
|
|
|
string(COMPARE EQUAL "${CMAKE_SYSTEM_PROCESSOR}" "x86_64" _x86_64)
|
|
|
|
string(COMPARE EQUAL "${CMAKE_SYSTEM_PROCESSOR}" "aarch64" _aarch64)
|
|
|
|
string(COMPARE EQUAL "${CMAKE_SYSTEM_PROCESSOR}" "armhf" _armhf)
|
|
|
|
string(COMPARE EQUAL "${CMAKE_SYSTEM_PROCESSOR}" "arm" _arm)
|
|
|
|
string(COMPARE EQUAL "${CMAKE_SYSTEM_PROCESSOR}" "armv8l" _armv8l)
|
|
|
|
|
2020-06-05 14:28:04 +08:00
|
|
|
set(default_build_type "RelwithDebInfo")
|
|
|
|
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
|
|
|
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
|
|
|
|
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Choose the type of build." FORCE)
|
|
|
|
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
|
|
|
|
endif()
|
|
|
|
|
2020-01-07 15:29:57 +08:00
|
|
|
if(PANDORA)
|
|
|
|
add_definitions(-DPANDORA)
|
|
|
|
#add_definitions(-mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize -fsingle-precision-constant -ffast-math)
|
2022-12-03 05:42:01 +08:00
|
|
|
set(CMAKE_ASM_FLAGS "-marm -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp")
|
2021-10-30 16:11:19 +08:00
|
|
|
elseif(GAMESHELL)
|
2021-11-19 17:04:30 +08:00
|
|
|
add_definitions(-DGAMESHELL)
|
2020-02-05 19:04:54 +08:00
|
|
|
add_definitions(-marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard)
|
|
|
|
set(CMAKE_ASM_FLAGS "-marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard")
|
2021-10-30 16:11:19 +08:00
|
|
|
elseif(PYRA)
|
2020-11-23 01:41:05 +08:00
|
|
|
add_definitions(-DPYRA)
|
2020-01-07 15:29:57 +08:00
|
|
|
add_definitions(-mcpu=cortex-a15 -mfpu=neon -mfloat-abi=hard -marm)
|
|
|
|
set(CMAKE_ASM_FLAGS "-marm -mcpu=cortex-a15 -mfpu=neon -mfloat-abi=hard")
|
2021-10-30 16:11:19 +08:00
|
|
|
elseif(RPI2)
|
2020-01-07 15:29:57 +08:00
|
|
|
add_definitions(-DRPI)
|
|
|
|
add_definitions(-DRPI2)
|
|
|
|
add_definitions(-marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard)
|
|
|
|
set(CMAKE_ASM_FLAGS "-marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard")
|
2021-10-30 16:11:19 +08:00
|
|
|
elseif(RPI3)
|
2020-01-07 15:29:57 +08:00
|
|
|
add_definitions(-DRPI)
|
|
|
|
add_definitions(-DRPI3)
|
|
|
|
add_definitions(-marm -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard)
|
|
|
|
set(CMAKE_ASM_FLAGS "-marm -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard")
|
2021-10-30 16:11:19 +08:00
|
|
|
elseif(RPI4)
|
2020-01-07 15:29:57 +08:00
|
|
|
add_definitions(-DRPI)
|
2020-11-23 01:41:05 +08:00
|
|
|
add_definitions(-DRPI4)
|
2020-01-07 15:29:57 +08:00
|
|
|
add_definitions(-marm -march=armv8-a+crc -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard)
|
|
|
|
set(CMAKE_ASM_FLAGS "-marm -march=armv8-a+crc -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard")
|
2023-02-10 22:11:29 +08:00
|
|
|
elseif(RPI3ARM64)
|
|
|
|
add_definitions(-DRPI)
|
|
|
|
add_definitions(-DRPI3ARM64)
|
|
|
|
add_definitions(-marm -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard)
|
|
|
|
set(CMAKE_ASM_FLAGS "-marm -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard")
|
2021-10-30 16:11:19 +08:00
|
|
|
elseif(RPI4ARM64)
|
2021-01-07 03:23:21 +08:00
|
|
|
add_definitions(-DRPI)
|
|
|
|
add_definitions(-DRPI4ARM64)
|
|
|
|
add_definitions(-marm -march=armv8-a+crc -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard)
|
|
|
|
set(CMAKE_ASM_FLAGS "-marm -march=armv8-a+crc -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard")
|
2024-06-18 04:56:11 +08:00
|
|
|
elseif(ODROIDXU4)
|
|
|
|
add_definitions(-DODROIDXU4)
|
|
|
|
add_definitions(-marm -mcpu=cortex-a15.cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard)
|
|
|
|
set(CMAKE_ASM_FLAGS "-marm -mcpu=cortex-a15.cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard")
|
2021-11-04 04:28:58 +08:00
|
|
|
elseif(RK3288)
|
|
|
|
add_definitions(-DRK3288)
|
|
|
|
add_definitions(-mcpu=cortex-a17 -mfpu=neon -mfloat-abi=hard -marm)
|
|
|
|
set(CMAKE_ASM_FLAGS "-marm -mcpu=cortex-a17 -mfpu=neon -mfloat-abi=hard")
|
2021-10-30 16:11:19 +08:00
|
|
|
elseif(SD845)
|
2021-10-18 02:39:47 +08:00
|
|
|
add_definitions(-DSD845)
|
2021-10-30 21:33:19 +08:00
|
|
|
add_definitions(-marm -march=armv8.2-a+simd+crypto -mtune=cortex-a75.cortex-a55 -mfpu=neon-fp-armv8 -mfloat-abi=hard)
|
|
|
|
set(CMAKE_ASM_FLAGS "-marm -march=armv8.2-a+simd+crypto -mtune=cortex-a75.cortex-a55 -mfpu=neon-fp-armv8 -mfloat-abi=hard")
|
2024-11-05 22:41:26 +08:00
|
|
|
elseif(SD865)
|
|
|
|
add_definitions(-DSD865)
|
2024-11-06 18:52:31 +08:00
|
|
|
#note that cortex-a77.cortex-a55 is not supported, so fall back to a76 instead
|
|
|
|
add_definitions(-marm -march=armv8.2-a+simd+crypto -mtune=cortex-a76.cortex-a55 -mfpu=neon-fp-armv8 -mfloat-abi=hard)
|
|
|
|
set(CMAKE_ASM_FLAGS "-marm -march=armv8.2-a+simd+crypto -mtune=cortex-a76.cortex-a55 -mfpu=neon-fp-armv8 -mfloat-abi=hard")
|
2023-09-25 19:45:58 +08:00
|
|
|
elseif(SD888)
|
|
|
|
add_definitions(-DSD888)
|
|
|
|
add_definitions(-marm -march=armv8.4-a+simd+crypto -mfpu=neon-fp-armv8 -mfloat-abi=hard)
|
|
|
|
set(CMAKE_ASM_FLAGS "-marm -march=armv8.4-a+simd+crypto -mfpu=neon-fp-armv8 -mfloat-abi=hard")
|
|
|
|
elseif(ADLINK)
|
|
|
|
add_definitions(-DADLINK)
|
|
|
|
add_definitions(-marm -mcpu=neoverse-n1 -mfpu=neon-fp-armv8 -mfloat-abi=hard)
|
|
|
|
set(CMAKE_ASM_FLAGS "-marm -mcpu=neoverse-n1 -mfpu=neon-fp-armv8 -mfloat-abi=hard")
|
2021-10-30 23:33:59 +08:00
|
|
|
elseif(A64)
|
|
|
|
add_definitions(-DA64)
|
|
|
|
add_definitions(-marm -march=armv8-a+crc+simd+crypto -mcpu=cortex-a53+crypto -mfpu=neon-fp-armv8 -mfloat-abi=hard)
|
|
|
|
set(CMAKE_ASM_FLAGS "-marm -march=armv8-a+crc+simd+crypto -mcpu=cortex-a53+crypto -mfpu=neon-fp-armv8 -mfloat-abi=hard")
|
2021-10-30 16:11:19 +08:00
|
|
|
elseif(GOA_CLONE)
|
2021-03-12 07:26:41 +08:00
|
|
|
add_definitions(-DGOA_CLONE)
|
|
|
|
add_definitions(-marm -mcpu=cortex-a35 -mfpu=neon-vfpv3 -march=armv8-a+crc+simd+crypto -mfloat-abi=hard)
|
|
|
|
set(CMAKE_ASM_FLAGS "-marm -mcpu=cortex-a35 -mfpu=neon-vfpv3 -march=armv8-a+crc+simd+crypto -mfloat-abi=hard")
|
2021-10-30 16:11:19 +08:00
|
|
|
elseif(RK3399)
|
2020-11-23 01:41:05 +08:00
|
|
|
add_definitions(-DRK3399)
|
2021-10-30 21:33:19 +08:00
|
|
|
add_definitions(-pipe -march=armv8-a+crc+simd+crypto -mcpu=cortex-a72+crypto -mfpu=neon-fp-armv8 -mfloat-abi=hard)
|
|
|
|
set(CMAKE_ASM_FLAGS "-pipe -march=armv8-a+crc+simd+crypto -mcpu=cortex-a72+crypto -mfpu=neon-fp-armv8 -mfloat-abi=hard")
|
2023-02-25 01:02:29 +08:00
|
|
|
elseif(RK3588)
|
|
|
|
add_definitions(-DRK3588)
|
|
|
|
add_definitions(-pipe -mcpu=cortex-a76.cortex-a55+crypto -mfpu=neon-fp-armv8 -mfloat-abi=hard)
|
2023-03-06 06:04:27 +08:00
|
|
|
add_definitions(-DBAD_SIGNAL)
|
2023-02-25 01:02:29 +08:00
|
|
|
set(CMAKE_ASM_FLAGS "-pipe -mcpu=cortex-a76.cortex-a55+crypto -mfpu=neon-fp-armv8 -mfloat-abi=hard")
|
|
|
|
elseif(ARM64)
|
|
|
|
add_definitions(-DARM64)
|
|
|
|
add_definitions(-pipe -march=armv8-a+crc+simd+crypto -mfpu=neon-fp-armv8 -mfloat-abi=hard)
|
|
|
|
set(CMAKE_ASM_FLAGS "-pipe -march=armv8-a+crc+simd+crypto -mfpu=neon-fp-armv8 -mfloat-abi=hard")
|
2022-02-27 21:34:07 +08:00
|
|
|
elseif(ODROIDN2)
|
|
|
|
add_definitions(-DODROIDN2)
|
|
|
|
add_definitions(-pipe -march=armv8-a+crc+simd+crypto -mcpu=cortex-a73.cortex-a53+crypto -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard)
|
|
|
|
set(CMAKE_ASM_FLAGS "-pipe -march=armv8-a+crc+simd+crypto -mcpu=cortex-a73.cortex-a53+crypto -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard")
|
2022-07-08 07:54:13 +08:00
|
|
|
elseif(TEGRAX1)
|
|
|
|
add_definitions(-DTEGRAX1)
|
|
|
|
add_definitions(-marm -pipe -march=armv8-a+crc -mcpu=cortex-a57 -mfpu=neon-fp-armv8 -mfloat-abi=hard)
|
|
|
|
set(CMAKE_ASM_FLAGS "-marm -pipe -march=armv8-a+crc -mcpu=cortex-a57 -mfpu=neon-fp-armv8 -mfloat-abi=hard")
|
|
|
|
elseif(TEGRAX1ARM32)
|
|
|
|
add_definitions(-DTEGRAX1ARM32)
|
|
|
|
add_definitions(-marm -pipe -march=armv8-a+crc -mcpu=cortex-a57 -mfpu=neon-fp-armv8 -mfloat-abi=hard)
|
|
|
|
set(CMAKE_ASM_FLAGS "-marm -pipe -march=armv8-a+crc -mcpu=cortex-a57 -mfpu=neon-fp-armv8 -mfloat-abi=hard")
|
2024-01-26 15:21:20 +08:00
|
|
|
elseif(TEGRA_T194)
|
|
|
|
add_definitions(-DTEGRA_T194)
|
2024-01-27 05:23:43 +08:00
|
|
|
add_definitions(-marm -pipe -march=armv8.2-a+fp16+simd+crypto+predres -mfpu=crypto-neon-fp-armv8 -mcpu=cortex-a76+crypto -mtune=cortex-a76 -mfloat-abi=hard)
|
2024-01-26 15:21:20 +08:00
|
|
|
set(CMAKE_ASM_FLAGS "-marm -pipe -march=armv8.2-a+fp16+simd+crypto+predres -mfpu=crypto-neon-fp-armv8 -mcpu=cortex-a76+crypto -mtune=cortex-a76 -mfloat-abi=hard")
|
|
|
|
elseif(TEGRA_T234)
|
|
|
|
add_definitions(-DTEGRA_T234)
|
2024-01-27 05:23:43 +08:00
|
|
|
add_definitions(-marm -pipe -march=armv8.2-a+fp16+simd+crypto+predres -mfpu=crypto-neon-fp-armv8 -mcpu=cortex-a78ae+crypto -mtune=cortex-a78ae -mfloat-abi=hard)
|
2024-01-26 15:21:20 +08:00
|
|
|
set(CMAKE_ASM_FLAGS "-marm -pipe -march=armv8.2-a+fp16+simd+crypto+predres -mfpu=crypto-neon-fp-armv8 -mcpu=cortex-a78ae+crypto -mtune=cortex-a78ae -mfloat-abi=hard")
|
2021-10-30 16:11:19 +08:00
|
|
|
elseif(PHYTIUM)
|
2021-10-02 15:58:25 +08:00
|
|
|
add_definitions(-DPHYTIUM)
|
2021-10-30 21:33:19 +08:00
|
|
|
add_definitions(-pipe -march=armv8.1-a+simd+crypto -mfpu=neon-fp-armv8 -mfloat-abi=hard)
|
|
|
|
set(CMAKE_ASM_FLAGS "-pipe -march=armv8.1-a+simd+crypto -mfpu=neon-fp-armv8 -mfloat-abi=hard")
|
2022-04-17 06:16:56 +08:00
|
|
|
elseif(LX2160A)
|
|
|
|
add_definitions(-DLX2160A)
|
|
|
|
add_definitions(-pipe -march=armv8-a+crypto+crc -mcpu=cortex-a72+crypto -mfpu=neon-fp-armv8 -mfloat-abi=hard)
|
|
|
|
set(CMAKE_ASM_FLAGS "-pipe -march=armv8-a+crypto+crc -mcpu=cortex-a72+crypto -mfpu=neon-fp-armv8 -mfloat-abi=hard")
|
2021-10-30 16:11:19 +08:00
|
|
|
elseif(ARM_DYNAREC)
|
|
|
|
#if DYNAREC is selected alone, without any arch
|
2023-09-02 18:44:22 +08:00
|
|
|
if(NOT ANDROID)
|
|
|
|
set(CMAKE_ASM_FLAGS "-pipe -march=armv7-a+simd -mfpu=neon")
|
|
|
|
endif()
|
2021-10-02 15:58:25 +08:00
|
|
|
endif()
|
2023-09-02 17:15:28 +08:00
|
|
|
if(ANDROID)
|
|
|
|
add_definitions(-DANDROID)
|
|
|
|
endif()
|
2023-11-28 00:37:19 +08:00
|
|
|
if(TERMUX)
|
|
|
|
add_definitions(-DTERMUX)
|
|
|
|
endif()
|
2023-03-06 03:58:33 +08:00
|
|
|
if(BAD_SIGNAL)
|
|
|
|
add_definitions(-DBAD_SIGNAL)
|
|
|
|
endif()
|
|
|
|
|
2020-12-25 05:14:50 +08:00
|
|
|
if(POWER9)
|
|
|
|
add_definitions(-mcpu=power9 -mtune=power9)
|
|
|
|
endif()
|
|
|
|
|
2020-10-06 16:59:12 +08:00
|
|
|
if(NOGIT)
|
|
|
|
add_definitions(-DNOGIT)
|
|
|
|
endif()
|
2020-08-15 23:44:34 +08:00
|
|
|
|
|
|
|
if(BOX86LIB)
|
|
|
|
set(BOX86 box86)
|
|
|
|
elseif(HAVE_TRACE)
|
2021-07-13 00:39:27 +08:00
|
|
|
set(BOX86 box86)
|
2020-08-15 23:44:34 +08:00
|
|
|
else()
|
|
|
|
set(BOX86 box86)
|
|
|
|
endif()
|
|
|
|
|
2024-09-17 21:25:22 +08:00
|
|
|
try_compile(HAVE_ST_INO ${CMAKE_BINARY_DIR}/compile_tests ${CMAKE_SOURCE_DIR}/tests/test_st_ino.c)
|
|
|
|
|
|
|
|
if(HAVE_ST_INO)
|
|
|
|
message("stat64 has __st_info field")
|
|
|
|
add_definitions(-DHAVE_ST_INO)
|
|
|
|
endif()
|
2020-08-15 23:44:34 +08:00
|
|
|
|
2020-10-20 16:59:55 +08:00
|
|
|
set(BOX86_ELF_ADDRESS "0x62800000")
|
2020-07-02 15:53:55 +08:00
|
|
|
|
2019-01-14 16:19:18 +08:00
|
|
|
if(LD80BITS)
|
|
|
|
add_definitions(-DHAVE_LD80BITS)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(NOALIGN)
|
|
|
|
add_definitions(-DNOALIGN)
|
2022-04-11 02:55:57 +08:00
|
|
|
add_definitions(-pipe -march=core2 -msse2)
|
2019-01-14 16:19:18 +08:00
|
|
|
endif()
|
|
|
|
|
2019-01-31 18:48:25 +08:00
|
|
|
if(HAVE_TRACE)
|
|
|
|
add_definitions(-DHAVE_TRACE)
|
|
|
|
endif()
|
|
|
|
|
2019-09-28 22:11:14 +08:00
|
|
|
if(ARM_DYNAREC)
|
|
|
|
add_definitions(-DDYNAREC)
|
|
|
|
add_definitions(-DARM)
|
2019-11-08 01:20:11 +08:00
|
|
|
add_definitions(-marm)
|
2019-09-29 16:23:23 +08:00
|
|
|
enable_language(ASM)
|
2019-09-28 22:11:14 +08:00
|
|
|
endif()
|
|
|
|
|
2020-12-25 05:14:50 +08:00
|
|
|
if(POWERPCLE)
|
|
|
|
add_definitions(-DPOWERPCLE)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(SYSV_VARARG)
|
|
|
|
add_definitions(-DSYSV_VARARG)
|
|
|
|
endif()
|
|
|
|
|
2019-11-23 19:50:52 +08:00
|
|
|
if(NOGETCLOCK)
|
|
|
|
add_definitions(-DNOGETCLOCK)
|
|
|
|
endif()
|
2019-11-08 01:20:11 +08:00
|
|
|
|
2020-01-15 04:40:43 +08:00
|
|
|
if(BOX86LIB)
|
|
|
|
add_definitions(-DBUILD_LIB)
|
2020-05-06 20:09:56 +08:00
|
|
|
if(BOX86DYNAMIC)
|
|
|
|
add_definitions(-DBUILD_DYNAMIC)
|
|
|
|
endif()
|
2020-01-15 15:49:02 +08:00
|
|
|
add_definitions(-fPIC)
|
2020-01-15 04:40:43 +08:00
|
|
|
if(NOT BOX86_ROOT)
|
|
|
|
message(FATAL_ERROR "BOX86_ROOT not set when build as lib")
|
|
|
|
endif()
|
|
|
|
else()
|
2020-10-06 17:59:33 +08:00
|
|
|
set(BOX86_ROOT ${CMAKE_SOURCE_DIR})
|
2020-01-15 04:40:43 +08:00
|
|
|
endif()
|
|
|
|
|
2019-11-08 01:20:11 +08:00
|
|
|
|
2020-11-05 21:01:32 +08:00
|
|
|
add_definitions(-std=gnu11 -funwind-tables -fvisibility=hidden)
|
2018-05-09 18:07:18 +08:00
|
|
|
|
2018-11-10 16:47:20 +08:00
|
|
|
if(USE_CCACHE)
|
|
|
|
find_program(CCACHE_FOUND ccache)
|
|
|
|
if(CCACHE_FOUND)
|
|
|
|
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
|
|
|
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2019-07-28 20:01:19 +08:00
|
|
|
include_directories(
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/include"
|
|
|
|
"${BOX86_ROOT}/src"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/generated"
|
2019-07-28 20:01:19 +08:00
|
|
|
)
|
2018-05-09 18:07:18 +08:00
|
|
|
|
2020-08-15 20:23:37 +08:00
|
|
|
# git_head.h is a generated file
|
|
|
|
set_source_files_properties(
|
2020-08-15 23:44:34 +08:00
|
|
|
"${BOX86_ROOT}/src/git_head.h"
|
2020-08-15 20:23:37 +08:00
|
|
|
PROPERTIES GENERATED TRUE
|
|
|
|
HEADER_FILE_ONLY TRUE)
|
2020-08-14 16:03:32 +08:00
|
|
|
|
2019-01-03 01:28:15 +08:00
|
|
|
set(ELFLOADER_SRC
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/main.c"
|
|
|
|
"${BOX86_ROOT}/src/box86context.c"
|
2020-08-14 16:03:32 +08:00
|
|
|
"${BOX86_ROOT}/src/build_info.c"
|
2021-01-03 23:39:58 +08:00
|
|
|
"${BOX86_ROOT}/src/custommem.c"
|
2022-11-01 22:13:22 +08:00
|
|
|
"${BOX86_ROOT}/src/mallochook.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/tools/bridge.c"
|
|
|
|
"${BOX86_ROOT}/src/tools/pathcoll.c"
|
|
|
|
"${BOX86_ROOT}/src/tools/fileutils.c"
|
|
|
|
"${BOX86_ROOT}/src/tools/callback.c"
|
|
|
|
"${BOX86_ROOT}/src/tools/box86stack.c"
|
2020-08-08 17:22:48 +08:00
|
|
|
"${BOX86_ROOT}/src/tools/my_cpuid.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/tools/gtkclass.c"
|
2022-11-28 01:50:58 +08:00
|
|
|
"${BOX86_ROOT}/src/tools/rcfile.c"
|
2024-01-21 17:26:10 +08:00
|
|
|
"${BOX86_ROOT}/src/tools/rbtree.c"
|
2020-07-13 23:38:40 +08:00
|
|
|
"${BOX86_ROOT}/src/tools/wine_tools.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/elfs/elfloader.c"
|
|
|
|
"${BOX86_ROOT}/src/elfs/elfparser.c"
|
|
|
|
"${BOX86_ROOT}/src/elfs/elfload_dump.c"
|
|
|
|
"${BOX86_ROOT}/src/librarian/library.c"
|
|
|
|
"${BOX86_ROOT}/src/librarian/librarian.c"
|
2021-05-28 01:55:17 +08:00
|
|
|
"${BOX86_ROOT}/src/librarian/dictionnary.c"
|
|
|
|
"${BOX86_ROOT}/src/librarian/symbols.c"
|
2021-06-03 20:51:22 +08:00
|
|
|
"${BOX86_ROOT}/src/librarian/globalsymbols.c"
|
2023-11-08 01:06:11 +08:00
|
|
|
"${BOX86_ROOT}/src/emu/x86compstrings.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/emu/x86emu.c"
|
2023-04-30 01:30:35 +08:00
|
|
|
"${BOX86_ROOT}/src/emu/x86run_private.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x86syscall.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x86primop.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x86trace.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x86int3.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x86tls.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x87emu_private.c"
|
|
|
|
"${BOX86_ROOT}/src/libtools/auxval.c"
|
|
|
|
"${BOX86_ROOT}/src/libtools/myalign.c"
|
|
|
|
"${BOX86_ROOT}/src/libtools/myalign64.c"
|
2024-08-11 20:51:26 +08:00
|
|
|
"${BOX86_ROOT}/src/libtools/myalignsys64.c"
|
2024-06-16 04:59:26 +08:00
|
|
|
"${BOX86_ROOT}/src/libtools/stat64_helper.c"
|
2023-04-30 01:30:35 +08:00
|
|
|
"${BOX86_ROOT}/src/libtools/myfts.c"
|
|
|
|
"${BOX86_ROOT}/src/libtools/sdl1rwops.c"
|
|
|
|
"${BOX86_ROOT}/src/libtools/sdl2rwops.c"
|
|
|
|
"${BOX86_ROOT}/src/libtools/signals.c"
|
|
|
|
"${BOX86_ROOT}/src/libtools/threads.c"
|
|
|
|
"${BOX86_ROOT}/src/libtools/vkalign.c"
|
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/generated/wrapper.c"
|
|
|
|
)
|
|
|
|
if(NOT ANDROID)
|
|
|
|
list(APPEND ELFLOADER_SRC "${BOX86_ROOT}/src/libtools/obstack.c")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(INTERPRETER
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/emu/x86run.c"
|
2023-04-29 20:14:37 +08:00
|
|
|
"${BOX86_ROOT}/src/emu/x86run0f.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x86run64.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x86run640f.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x86run6466.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x86run6467.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/emu/x86run66.c"
|
2020-09-24 23:45:37 +08:00
|
|
|
"${BOX86_ROOT}/src/emu/x86run660f.c"
|
2023-04-29 20:14:37 +08:00
|
|
|
"${BOX86_ROOT}/src/emu/x86run66d9.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x86run66dd.c"
|
2023-11-08 01:06:11 +08:00
|
|
|
"${BOX86_ROOT}/src/emu/x86run66f20f.c"
|
2023-04-29 20:14:37 +08:00
|
|
|
"${BOX86_ROOT}/src/emu/x86run67.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x86run6766.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x86rund8.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x86rund9.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x86runda.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x86rundb.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x86rundc.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x86rundd.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x86runde.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x86rundf.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x86runf0.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x86runf066.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x86runf20f.c"
|
|
|
|
"${BOX86_ROOT}/src/emu/x86runf30f.c"
|
2018-05-09 18:07:18 +08:00
|
|
|
)
|
|
|
|
|
2019-01-03 01:28:15 +08:00
|
|
|
set(WRAPPEDS
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibc.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibpthread.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibrt.c"
|
2023-12-01 04:51:42 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibbsd.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibgl.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibglu.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibx11.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibasound.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibdl.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibm.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedsdl1.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedsdl1mixer.c"
|
2021-04-14 14:53:03 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedsdl1net.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedsdl1image.c"
|
2021-04-14 14:36:24 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedsdl1sound.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedsdl1ttf.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedsdl2.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedsdl2mixer.c"
|
2021-04-14 14:41:05 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedsdl2net.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedsdl2image.c"
|
2020-12-10 20:51:31 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedsdl2ttf.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedsmpeg.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedsmpeg2.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedvorbisfile.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibvorbis.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibogg.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedpng12.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedpng16.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxxf86vm.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxrandr.c"
|
2023-01-30 05:27:23 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxpresent.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxext.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedxinerama.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxfixes.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxcursor.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxrender.c"
|
2021-04-17 23:12:30 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxft.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxi.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxss.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxpm.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxau.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxdmcp.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibx11xcb.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxcb.c"
|
2020-09-05 05:37:43 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxcbxfixes.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxcbshape.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxcbshm.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxcbrandr.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxcbimage.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxcbkeysyms.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxcbxtest.c"
|
2020-10-05 20:29:56 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxcbdri2.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxcbdri3.c"
|
2020-10-05 21:20:26 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxcbpresent.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxtst.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxt.c"
|
2020-03-14 02:31:13 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxcomposite.c"
|
2020-03-14 03:21:43 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxdamage.c"
|
2020-03-28 17:25:28 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibxmu.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibz.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedopenal.c"
|
2021-03-08 01:17:59 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedalure.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedalut.c"
|
2023-12-09 00:00:51 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedopencl.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedcurl.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedudev0.c"
|
2020-05-18 16:54:01 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedudev1.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappeddbus.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappediconv.c"
|
2020-04-25 01:26:59 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibdrm.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedcrypto.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibssl.c"
|
2021-02-07 23:21:01 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibcrypt.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedutil.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibuuid.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibresolv.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedpulsesimple.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedpulse.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibsndfile.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedfontconfig.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedfreetype.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedbz2.c"
|
2021-05-16 16:32:37 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedexpat.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibsm.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibice.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibusb1.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibncursesw.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibformw.c"
|
2020-06-30 06:09:59 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibncurses.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibtinfo.c"
|
2021-06-02 23:38:10 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibpanel.c"
|
2020-07-20 00:21:45 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibncurses6.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibtinfo6.c"
|
2022-03-20 19:00:04 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgmp.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgcrypt.c"
|
2020-01-15 04:49:05 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgtkx112.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgdkx112.c"
|
2020-11-06 21:08:10 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgtk3.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgdk3.c"
|
2020-01-15 04:49:05 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgdkpixbuf2.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgio2.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgmodule2.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgobject2.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedglib2.c"
|
2021-09-21 03:53:14 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgconf2.c"
|
2020-01-26 22:29:45 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgstreamer010.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgstinterfaces010.c"
|
2022-03-20 18:46:26 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgstreamer.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgstaudio.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgstvideo.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgsttag.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgstbase.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgstapp.c"
|
2023-03-04 20:09:38 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibibus.c"
|
2020-01-15 04:49:05 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappeddbusmenugtk.c"
|
2020-03-22 01:54:35 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappeddbusmenuglib.c"
|
2020-09-21 19:17:08 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedappindicator.c"
|
2022-04-24 17:10:06 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedappindicator3.c"
|
2023-12-09 17:47:47 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedayatanaappindicator3.c"
|
2020-01-15 04:49:05 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedatk.c"
|
2021-04-13 15:36:37 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedatkbridge.c"
|
2020-01-15 04:49:05 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedpangoft2.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedpangocairo.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgthread2.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedcairo.c"
|
2022-11-24 01:24:14 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedcairogobject.c"
|
2020-01-15 04:49:05 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedpango.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappeddbusglib1.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgudev1.c"
|
2020-03-23 02:05:33 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibnm.c"
|
2020-06-20 17:45:16 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedtcmallocminimal.c"
|
2020-07-07 15:40:16 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedmpg123.c"
|
2020-07-08 21:15:11 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgnutls.c"
|
2020-10-17 21:21:27 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibcups.c"
|
2020-10-03 09:48:41 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedd3dadapter9.c"
|
2020-10-30 23:08:46 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedvulkan.c"
|
2020-10-31 05:12:11 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedwaylandclient.c"
|
2020-12-01 01:42:09 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedxml2.c"
|
2020-12-01 03:02:57 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedxslt.c"
|
2020-12-08 15:09:55 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedldapr.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlber.c"
|
2020-12-13 17:05:28 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappednsl.c"
|
2020-12-18 22:55:34 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlcms2.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedkrb5.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgssapikrb5.c"
|
2021-02-27 22:32:41 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibtiff.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedldlinux.c"
|
2021-01-28 23:59:43 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedcrashhandler.c"
|
2021-07-09 22:10:39 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibv4l2.c"
|
2021-09-18 22:19:53 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappednspr4.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedsmime3.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappednssutil3.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappednss3.c"
|
2021-09-22 02:58:50 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedplds4.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedplc4.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedssl3.c"
|
2022-03-27 21:33:41 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedsoftokn3.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedfreebl3.c"
|
2021-09-25 19:08:08 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedsecret1.c"
|
2021-10-31 04:50:37 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedtbbmalloc.c"
|
2022-02-27 01:02:52 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedmimalloc.c"
|
2022-01-08 17:23:46 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedselinux.c"
|
2022-03-07 22:42:48 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibharfbuzz.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibcairogobject.c"
|
2022-03-08 17:56:09 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibvkd3d.c"
|
2022-03-27 21:33:41 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedgomp.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedcap.c"
|
2022-04-24 17:40:08 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedpcap.c"
|
2022-08-28 20:28:08 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedfaudio.c"
|
2022-11-01 22:13:22 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedtbbmallocproxy.c"
|
2023-04-07 03:09:33 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibfuse.c"
|
2023-12-09 17:43:16 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedatomic.c"
|
2023-12-09 18:48:24 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibpcre.c"
|
2019-01-03 01:28:15 +08:00
|
|
|
)
|
2021-06-18 17:03:54 +08:00
|
|
|
if(ANDROID)
|
|
|
|
list(APPEND WRAPPEDS
|
2021-06-18 20:23:39 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedandroidshmem.c"
|
2021-06-18 17:03:54 +08:00
|
|
|
)
|
|
|
|
else()
|
2021-04-14 00:22:02 +08:00
|
|
|
list(APPEND WRAPPEDS
|
2021-04-12 18:44:28 +08:00
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibjpeg.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedlibjpeg62.c"
|
|
|
|
"${BOX86_ROOT}/src/wrapped/wrappedturbojpeg.c"
|
|
|
|
)
|
|
|
|
endif()
|
2019-11-04 04:12:03 +08:00
|
|
|
|
2021-03-29 02:01:56 +08:00
|
|
|
# If BOX86_ROOT contains a ".c", the build breaks...
|
|
|
|
string(REPLACE ".c" "_private.h" MODROOT ${BOX86_ROOT})
|
2021-08-27 05:23:49 +08:00
|
|
|
set(WRAPPEDS_HEAD "${BOX86_ROOT}/src/wrapped/wrappedd3dadapter9_genvate.h")
|
2019-11-04 04:12:03 +08:00
|
|
|
foreach(A ${WRAPPEDS})
|
2021-03-29 02:01:56 +08:00
|
|
|
string(REPLACE ".c" "_private.h" C ${A})
|
|
|
|
string(REPLACE "${MODROOT}" "${BOX86_ROOT}" B ${C})
|
2019-11-04 04:12:03 +08:00
|
|
|
set(WRAPPEDS_HEAD ${WRAPPEDS_HEAD} ${B})
|
2020-03-08 00:11:11 +08:00
|
|
|
set_source_files_properties(${A} PROPERTIES OBJECT_DEPENDS ${B})
|
2019-11-04 04:12:03 +08:00
|
|
|
endforeach()
|
|
|
|
|
2020-01-15 04:49:05 +08:00
|
|
|
set(WRAPPER "${BOX86_ROOT}/src/wrapped/generated/wrapper.c" "${BOX86_ROOT}/src/wrapped/generated/wrapper.h")
|
|
|
|
|
2020-03-06 00:05:15 +08:00
|
|
|
add_custom_command(
|
|
|
|
OUTPUT "${BOX86_ROOT}/src/wrapped/generated/functions_list.txt"
|
2020-12-27 01:27:21 +08:00
|
|
|
COMMAND "${PYTHON_EXECUTABLE}" "${BOX86_ROOT}/rebuild_wrappers.py"
|
|
|
|
"${BOX86_ROOT}"
|
2023-12-05 01:04:52 +08:00
|
|
|
"PANDORA" "HAVE_LD80BITS" "NOALIGN" "HAVE_TRACE" "POWERPCLE" "ANDROID" "TERMUX" "--"
|
2020-12-27 01:27:21 +08:00
|
|
|
${WRAPPEDS_HEAD}
|
2020-03-06 00:05:15 +08:00
|
|
|
MAIN_DEPENDENCY "${BOX86_ROOT}/rebuild_wrappers.py"
|
|
|
|
DEPENDS ${WRAPPEDS} ${WRAPPEDS_HEAD}
|
|
|
|
BYPRODUCTS ${WRAPPER}
|
|
|
|
)
|
|
|
|
|
2020-05-05 19:26:48 +08:00
|
|
|
add_custom_command(
|
|
|
|
OUTPUT "${BOX86_ROOT}/src/dynarec/last_run.txt"
|
|
|
|
COMMAND "${PYTHON_EXECUTABLE}" "${BOX86_ROOT}/rebuild_printer.py" "${BOX86_ROOT}"
|
|
|
|
MAIN_DEPENDENCY "${BOX86_ROOT}/rebuild_printer.py"
|
|
|
|
DEPENDS "${BOX86_ROOT}/src/dynarec/arm_instructions.txt"
|
|
|
|
BYPRODUCTS "${BOX86_ROOT}/src/dynarec/arm_printer.c"
|
|
|
|
)
|
|
|
|
|
2020-03-06 00:05:15 +08:00
|
|
|
add_custom_target(WRAPPERS DEPENDS "${BOX86_ROOT}/src/wrapped/generated/functions_list.txt")
|
2020-05-05 19:26:48 +08:00
|
|
|
add_custom_target(PRINTER DEPENDS "${BOX86_ROOT}/src/dynarec/last_run.txt")
|
2019-01-03 01:28:15 +08:00
|
|
|
|
2019-09-28 22:11:14 +08:00
|
|
|
if(ARM_DYNAREC)
|
|
|
|
set(DYNAREC_SRC
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/dynarec/dynablock.c"
|
2019-09-29 16:23:23 +08:00
|
|
|
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm.c"
|
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_functions.c"
|
2023-05-07 02:45:13 +08:00
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_jmpnext.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/dynarec/arm_printer.c"
|
2023-04-30 01:30:35 +08:00
|
|
|
"${BOX86_ROOT}/src/emu/x86test.c"
|
2019-09-29 16:23:23 +08:00
|
|
|
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/dynarec/arm_prolog.S"
|
|
|
|
"${BOX86_ROOT}/src/dynarec/arm_epilog.S"
|
2021-01-22 23:16:12 +08:00
|
|
|
"${BOX86_ROOT}/src/dynarec/arm_next.S"
|
2020-09-24 02:22:44 +08:00
|
|
|
"${BOX86_ROOT}/src/dynarec/arm_lock_helper.S"
|
2019-09-28 22:11:14 +08:00
|
|
|
)
|
2019-10-11 22:26:48 +08:00
|
|
|
|
|
|
|
set(DYNAREC_PASS
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_helper.c"
|
2020-04-09 03:59:56 +08:00
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_emit_tests.c"
|
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_emit_math.c"
|
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_emit_logic.c"
|
2020-04-15 17:28:22 +08:00
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_emit_shift.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_pass.c"
|
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_00.c"
|
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_0f.c"
|
2020-06-30 02:41:44 +08:00
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_64.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_65.c"
|
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_66.c"
|
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_67.c"
|
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_d8.c"
|
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_d9.c"
|
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_da.c"
|
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_db.c"
|
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_dc.c"
|
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_dd.c"
|
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_de.c"
|
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_df.c"
|
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_f0.c"
|
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_660f.c"
|
2022-01-07 04:14:24 +08:00
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_66f0.c"
|
2020-01-15 04:40:43 +08:00
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_f20f.c"
|
|
|
|
"${BOX86_ROOT}/src/dynarec/dynarec_arm_f30f.c"
|
2019-10-11 22:26:48 +08:00
|
|
|
)
|
|
|
|
|
2020-01-15 04:49:05 +08:00
|
|
|
set(DYNAREC_PASS "${BOX86_ROOT}/src/wrapped/generated/wrapper.h" ${DYNAREC_PASS})
|
2020-01-15 03:33:50 +08:00
|
|
|
|
2019-10-11 22:26:48 +08:00
|
|
|
add_library(dynarec_arm OBJECT ${DYNAREC_SRC})
|
|
|
|
|
|
|
|
add_library(arm_pass0 OBJECT ${DYNAREC_PASS})
|
|
|
|
set_target_properties(arm_pass0 PROPERTIES COMPILE_FLAGS "-DSTEP=0")
|
|
|
|
add_library(arm_pass1 OBJECT ${DYNAREC_PASS})
|
|
|
|
set_target_properties(arm_pass1 PROPERTIES COMPILE_FLAGS "-DSTEP=1")
|
|
|
|
add_library(arm_pass2 OBJECT ${DYNAREC_PASS})
|
|
|
|
set_target_properties(arm_pass2 PROPERTIES COMPILE_FLAGS "-DSTEP=2")
|
|
|
|
add_library(arm_pass3 OBJECT ${DYNAREC_PASS})
|
|
|
|
set_target_properties(arm_pass3 PROPERTIES COMPILE_FLAGS "-DSTEP=3")
|
2023-04-30 01:30:35 +08:00
|
|
|
add_library(test_interpreter OBJECT ${INTERPRETER})
|
|
|
|
set_target_properties(test_interpreter PROPERTIES COMPILE_FLAGS "-DTEST_INTERPRETER")
|
2020-03-06 00:05:15 +08:00
|
|
|
add_dependencies(arm_pass0 WRAPPERS)
|
|
|
|
add_dependencies(arm_pass1 WRAPPERS)
|
|
|
|
add_dependencies(arm_pass2 WRAPPERS)
|
|
|
|
add_dependencies(arm_pass3 WRAPPERS)
|
2019-10-11 22:26:48 +08:00
|
|
|
|
|
|
|
add_library(dynarec STATIC
|
|
|
|
$<TARGET_OBJECTS:dynarec_arm>
|
|
|
|
$<TARGET_OBJECTS:arm_pass0>
|
|
|
|
$<TARGET_OBJECTS:arm_pass1>
|
|
|
|
$<TARGET_OBJECTS:arm_pass2>
|
|
|
|
$<TARGET_OBJECTS:arm_pass3>
|
2023-04-30 01:30:35 +08:00
|
|
|
$<TARGET_OBJECTS:test_interpreter>
|
2019-10-11 22:26:48 +08:00
|
|
|
)
|
2020-08-15 23:44:34 +08:00
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# creates git_head.h
|
|
|
|
if(ARM_DYNAREC)
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT "${BOX86_ROOT}/src/git_head.h"
|
2020-10-06 19:04:07 +08:00
|
|
|
COMMAND bash -c "echo \\\#define GITREV \\\"$(git rev-parse --short HEAD)\\\">\"${BOX86_ROOT}/src/git_head.h\""
|
2023-04-30 01:30:35 +08:00
|
|
|
DEPENDS dynarec ${ELFLOADER_SRC} ${INTERPRETER} ${WRAPPEDS}
|
2020-08-15 23:44:34 +08:00
|
|
|
VERBATIM)
|
|
|
|
else()
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT "${BOX86_ROOT}/src/git_head.h"
|
2020-10-06 19:04:07 +08:00
|
|
|
COMMAND bash -c "echo \\\#define GITREV \\\"$(git rev-parse --short HEAD)\\\">\"${BOX86_ROOT}/src/git_head.h\""
|
2023-04-30 01:30:35 +08:00
|
|
|
DEPENDS ${ELFLOADER_SRC} ${INTERPRETER} ${WRAPPEDS}
|
2020-08-15 23:44:34 +08:00
|
|
|
VERBATIM)
|
2019-09-28 22:11:14 +08:00
|
|
|
endif()
|
|
|
|
|
2023-04-30 01:30:35 +08:00
|
|
|
add_library(interpreter OBJECT ${INTERPRETER})
|
|
|
|
|
2020-01-15 04:40:43 +08:00
|
|
|
if(BOX86LIB)
|
2020-05-06 20:09:56 +08:00
|
|
|
#build a static or dynamic lib...
|
|
|
|
if(BOX86DYNAMIC)
|
2020-08-15 23:44:34 +08:00
|
|
|
add_library(box86 SHARED ${ELFLOADER_SRC} ${WRAPPEDS} "${BOX86_ROOT}/src/git_head.h")
|
2020-05-06 20:09:56 +08:00
|
|
|
else()
|
2020-08-15 23:44:34 +08:00
|
|
|
add_library(${BOX86} OBJECT ${ELFLOADER_SRC} ${WRAPPEDS} "${BOX86_ROOT}/src/git_head.h")
|
2020-05-06 20:09:56 +08:00
|
|
|
endif()
|
|
|
|
if(ARM_DYNAREC)
|
2021-04-12 18:44:28 +08:00
|
|
|
if(ANDROID)
|
2023-11-28 00:37:19 +08:00
|
|
|
if(TERMUX)
|
2023-12-03 02:37:43 +08:00
|
|
|
target_link_libraries(${BOX86} dynarec interpreter m dl android-sysv-semaphore android-spawn)
|
2023-11-28 00:37:19 +08:00
|
|
|
else()
|
2023-04-30 01:30:35 +08:00
|
|
|
target_link_libraries(${BOX86} dynarec interpreter m dl)
|
2023-11-28 00:37:19 +08:00
|
|
|
endif()
|
2021-04-12 18:44:28 +08:00
|
|
|
else()
|
2023-04-30 01:30:35 +08:00
|
|
|
target_link_libraries(${BOX86} dynarec interpreter m dl rt pthread resolv)
|
2021-04-12 18:44:28 +08:00
|
|
|
endif()
|
2020-05-06 20:09:56 +08:00
|
|
|
endif()
|
2020-05-07 02:49:16 +08:00
|
|
|
if(${CMAKE_VERSION} VERSION_LESS "3.13")
|
2020-08-15 23:44:34 +08:00
|
|
|
set_target_properties(${BOX86} PROPERTIES LINK_FLAGS -rdynamic)
|
2020-05-07 01:59:57 +08:00
|
|
|
else()
|
2020-08-15 23:44:34 +08:00
|
|
|
target_link_options(${BOX86} PUBLIC -rdynamic)
|
2020-05-07 01:59:57 +08:00
|
|
|
endif()
|
2020-08-15 23:44:34 +08:00
|
|
|
add_dependencies(${BOX86} WRAPPERS)
|
|
|
|
add_dependencies(${BOX86} PRINTER)
|
2020-01-15 04:40:43 +08:00
|
|
|
|
2020-08-15 23:44:34 +08:00
|
|
|
add_custom_target(buildinfo ${BOX86}
|
|
|
|
DEPENDS dynarec ${BOX86} )
|
2020-01-15 04:40:43 +08:00
|
|
|
|
2020-08-15 23:44:34 +08:00
|
|
|
else(BOX86LIB)
|
2019-02-24 20:58:31 +08:00
|
|
|
|
2020-08-15 23:44:34 +08:00
|
|
|
add_executable(${BOX86} ${ELFLOADER_SRC} ${WRAPPEDS} "${BOX86_ROOT}/src/git_head.h")
|
2020-03-06 00:05:15 +08:00
|
|
|
add_dependencies(${BOX86} WRAPPERS)
|
2020-05-05 19:26:48 +08:00
|
|
|
add_dependencies(${BOX86} PRINTER)
|
2021-04-12 18:44:28 +08:00
|
|
|
if(ANDROID)
|
2023-12-03 02:37:43 +08:00
|
|
|
if(TERMUX)
|
2023-12-07 19:07:00 +08:00
|
|
|
target_link_libraries(${BOX86} dynarec interpreter m dl android-complex-math android-sysv-semaphore android-spawn )
|
2023-12-03 02:37:43 +08:00
|
|
|
else()
|
|
|
|
target_link_libraries(${BOX86} dynarec interpreter m dl)
|
|
|
|
endif()
|
2022-03-04 02:34:10 +08:00
|
|
|
target_link_libraries(${BOX86} c m dl)
|
2021-04-12 18:44:28 +08:00
|
|
|
else()
|
2022-03-04 02:34:10 +08:00
|
|
|
#target_link_libraries(${BOX86} c m dl rt pthread resolv)
|
2022-03-20 03:08:04 +08:00
|
|
|
set_target_properties(${BOX86} PROPERTIES LINK_FLAGS "-Wl,--no-as-needed -lc -lm -ldl -lrt -lpthread -lresolv -Wl,--as-needed -pthread")
|
2021-04-12 18:44:28 +08:00
|
|
|
endif()
|
2019-10-11 22:26:48 +08:00
|
|
|
if(ARM_DYNAREC)
|
2023-04-30 01:30:35 +08:00
|
|
|
target_link_libraries(${BOX86} dynarec interpreter)
|
|
|
|
else()
|
|
|
|
target_link_libraries(${BOX86} interpreter)
|
2019-10-11 22:26:48 +08:00
|
|
|
endif()
|
2018-12-22 01:17:44 +08:00
|
|
|
|
2020-05-07 02:49:16 +08:00
|
|
|
if(${CMAKE_VERSION} VERSION_LESS "3.13")
|
2020-05-07 01:59:57 +08:00
|
|
|
if(NOT NOLOADADDR)
|
2023-10-07 15:22:29 +08:00
|
|
|
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
|
|
|
set_target_properties(${BOX86} PROPERTIES LINK_FLAGS "-rdynamic -Wl,--image-base,${BOX86_ELF_ADDRESS}")
|
|
|
|
else()
|
|
|
|
set_target_properties(${BOX86} PROPERTIES LINK_FLAGS "-rdynamic -Wl,-Ttext-segment,${BOX86_ELF_ADDRESS}")
|
|
|
|
endif()
|
2020-05-07 02:49:16 +08:00
|
|
|
else()
|
|
|
|
set_target_properties(${BOX86} PROPERTIES LINK_FLAGS -rdynamic)
|
2020-05-07 01:59:57 +08:00
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
target_link_options(${BOX86} PUBLIC -rdynamic)
|
|
|
|
if(NOT NOLOADADDR)
|
2023-10-07 15:22:29 +08:00
|
|
|
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
|
|
|
target_link_options(${BOX86} PUBLIC -Wl,--image-base,${BOX86_ELF_ADDRESS})
|
|
|
|
else()
|
|
|
|
target_link_options(${BOX86} PUBLIC -Wl,-Ttext-segment,${BOX86_ELF_ADDRESS})
|
|
|
|
endif()
|
2020-05-07 01:59:57 +08:00
|
|
|
endif()
|
2019-06-20 17:09:17 +08:00
|
|
|
endif()
|
2018-12-28 15:45:52 +08:00
|
|
|
|
2019-12-25 18:54:17 +08:00
|
|
|
if(NOT _x86 AND NOT _x86_64)
|
2023-12-03 23:38:54 +08:00
|
|
|
if(NOT TERMUX)
|
|
|
|
install(TARGETS ${BOX86}
|
2019-12-21 02:42:12 +08:00
|
|
|
RUNTIME DESTINATION bin)
|
2023-12-03 23:38:54 +08:00
|
|
|
else()
|
|
|
|
install(TARGETS ${BOX86}
|
|
|
|
RUNTIME DESTINATION ${TERMUX_PATH}/usr/bin)
|
|
|
|
endif()
|
2023-05-04 03:43:16 +08:00
|
|
|
if(NOT NO_CONF_INSTALL)
|
|
|
|
configure_file(system/box86.conf.cmake system/box86.conf)
|
2023-11-28 19:10:29 +08:00
|
|
|
if(NOT TERMUX)
|
|
|
|
install(FILES ${CMAKE_BINARY_DIR}/system/box86.conf DESTINATION /etc/binfmt.d/)
|
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/system/box86.box86rc DESTINATION /etc/)
|
|
|
|
else()
|
2023-12-04 00:47:52 +08:00
|
|
|
#install(FILES ${CMAKE_BINARY_DIR}/system/box86.conf DESTINATION ${TERMUX_PATH}/usr/etc/binfmt.d/)
|
2023-11-28 19:10:29 +08:00
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/system/box86.box86rc DESTINATION ${TERMUX_PATH}/usr/etc/)
|
|
|
|
endif()
|
2023-05-04 03:43:16 +08:00
|
|
|
endif()
|
2024-11-21 00:52:53 +08:00
|
|
|
set(INSTALL_PATH "/usr/lib/box86-i386-linux-gnu/")
|
2023-05-04 03:43:16 +08:00
|
|
|
if(NOT NO_LIB_INSTALL)
|
2023-11-28 19:10:29 +08:00
|
|
|
if(NOT TERMUX)
|
2024-11-21 00:52:53 +08:00
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libstdc++.so.6 DESTINATION ${INSTALL_PATH})
|
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libstdc++.so.5 DESTINATION ${INSTALL_PATH})
|
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libgcc_s.so.1 DESTINATION ${INSTALL_PATH})
|
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libpng12.so.0 DESTINATION ${INSTALL_PATH})
|
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libunwind.so.8 DESTINATION ${INSTALL_PATH})
|
2023-11-28 19:10:29 +08:00
|
|
|
else()
|
|
|
|
|
2024-11-21 00:52:53 +08:00
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libstdc++.so.6 DESTINATION ${TERMUX_PATH}${INSTALL_PATH})
|
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libstdc++.so.5 DESTINATION ${TERMUX_PATH}${INSTALL_PATH})
|
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libgcc_s.so.1 DESTINATION ${TERMUX_PATH}${INSTALL_PATH})
|
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libpng12.so.0 DESTINATION ${TERMUX_PATH}${INSTALL_PATH})
|
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/x86lib/libunwind.so.8 DESTINATION ${TERMUX_PATH}${INSTALL_PATH})
|
2023-11-28 19:10:29 +08:00
|
|
|
endif()
|
2023-05-04 03:43:16 +08:00
|
|
|
endif()
|
2019-12-25 18:54:17 +08:00
|
|
|
endif()
|
2019-12-21 02:42:12 +08:00
|
|
|
|
2020-01-18 23:38:44 +08:00
|
|
|
if(NOT TARGET uninstall)
|
|
|
|
configure_file(
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
|
|
|
IMMEDIATE @ONLY)
|
|
|
|
|
|
|
|
add_custom_target(uninstall
|
|
|
|
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
|
|
|
endif()
|
|
|
|
|
2021-07-09 20:31:54 +08:00
|
|
|
set(CPACK_GENERATOR "DEB")
|
|
|
|
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "ptitSeb")
|
|
|
|
set(CPACK_PACKAGE_CONTACT "ptitSeb@box86.org")
|
|
|
|
set(CPACK_PACKAGE_DESCRIPTION "Box86 - Linux Userspace x86 Emulator with a twist")
|
2023-12-03 23:38:54 +08:00
|
|
|
if(TERMUX)
|
2023-12-05 00:16:17 +08:00
|
|
|
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libandroid-sysv-semaphore, libandroid-spawn")
|
2023-12-03 23:38:54 +08:00
|
|
|
else()
|
2021-07-09 20:31:54 +08:00
|
|
|
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6")
|
2023-12-03 23:38:54 +08:00
|
|
|
endif()
|
2021-07-09 20:31:54 +08:00
|
|
|
set(CPACK_PACKAGE_HOMEPAGE_URL, "https://box86.org")
|
|
|
|
file(STRINGS "${BOX86_ROOT}/src/box86version.h" TEMP_STRING REGEX "BOX86_MAJOR\\s*")
|
|
|
|
string(REGEX REPLACE "BOX86_MAJOR" "" TEMP_STRING ${TEMP_STRING})
|
|
|
|
string(REGEX MATCH "[0-9]" BOX86_MAJOR ${TEMP_STRING})
|
|
|
|
file(STRINGS "${BOX86_ROOT}/src/box86version.h" TEMP_STRING REGEX "BOX86_MINOR\\s*")
|
|
|
|
string(REGEX REPLACE "BOX86_MINOR" "" TEMP_STRING ${TEMP_STRING})
|
|
|
|
string(REGEX MATCH "[0-9]" BOX86_MINOR ${TEMP_STRING})
|
|
|
|
file(STRINGS "${BOX86_ROOT}/src/box86version.h" TEMP_STRING REGEX "BOX86_REVISION\\s*")
|
|
|
|
string(REGEX REPLACE "BOX86_REVISION" "" TEMP_STRING ${TEMP_STRING})
|
|
|
|
string(REGEX MATCH "[0-9]" BOX86_REVISION ${TEMP_STRING})
|
|
|
|
set(CPACK_PACKAGE_VERSION_MAJOR ${BOX86_MAJOR})
|
|
|
|
set(CPACK_PACKAGE_VERSION_MINOR ${BOX86_MINOR})
|
|
|
|
set(CPACK_PACKAGE_VERSION_PATCH ${BOX86_REVISION})
|
2023-12-04 00:47:52 +08:00
|
|
|
if(NOT TERMUX)
|
2021-07-10 16:07:57 +08:00
|
|
|
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/postinst")
|
2023-12-04 00:47:52 +08:00
|
|
|
endif()
|
2023-12-03 23:38:54 +08:00
|
|
|
if(_aarch64 OR _armhf OR _arm OR _armv8l)
|
|
|
|
if(TERMUX)
|
|
|
|
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "arm")
|
|
|
|
else()
|
2021-07-10 16:07:57 +08:00
|
|
|
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "armhf")
|
2023-12-03 23:38:54 +08:00
|
|
|
endif()
|
2021-07-10 16:07:57 +08:00
|
|
|
elseif(_x86_64 OR _x86)
|
|
|
|
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "i386")
|
|
|
|
else()
|
|
|
|
#probably wrong...
|
|
|
|
execute_process(COMMAND "dpkg --print-architecture" OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
|
|
|
|
endif()
|
2023-12-04 00:47:52 +08:00
|
|
|
if(TERMUX)
|
|
|
|
set(CPACK_PACKAGING_INSTALL_PREFIX "${TERMUX_PATH}/usr")
|
|
|
|
endif()
|
|
|
|
if(NOT TERMUX)
|
|
|
|
set(CPACK_DEBIAN_FILE_NAME "${BOX86}-${BOX86_MAJOR}.${BOX86_MINOR}.${BOX86_REVISION}_${CMAKE_SYSTEM_NAME}-${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.deb")
|
|
|
|
else()
|
|
|
|
set(CPACK_DEBIAN_FILE_NAME "${BOX86}-${BOX86_MAJOR}.${BOX86_MINOR}.${BOX86_REVISION}_Termux-${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.deb")
|
|
|
|
endif()
|
2021-07-09 20:31:54 +08:00
|
|
|
INCLUDE(CPack)
|
|
|
|
|
2021-05-24 02:29:01 +08:00
|
|
|
add_test(NAME bootSyscall COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
2021-12-31 23:59:37 +08:00
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test01 -D TEST_OUTPUT=tmpfile01.txt
|
2018-12-22 01:17:44 +08:00
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref01.txt
|
2018-12-22 03:25:35 +08:00
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
|
|
|
|
2021-05-24 02:29:01 +08:00
|
|
|
add_test(NAME bootSyscallC COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
2021-12-31 23:59:37 +08:00
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test02 -D TEST_OUTPUT=tmpfile02.txt
|
2018-12-22 19:29:56 +08:00
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref02.txt
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
2018-12-22 03:25:35 +08:00
|
|
|
|
2021-05-24 02:29:01 +08:00
|
|
|
add_test(NAME printf COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
2021-12-31 23:59:37 +08:00
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test03 -D TEST_OUTPUT=tmpfile03.txt
|
2018-12-22 19:36:26 +08:00
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref03.txt
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
2018-12-22 03:25:35 +08:00
|
|
|
|
2021-05-24 02:29:01 +08:00
|
|
|
add_test(NAME args COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
2021-12-31 23:59:37 +08:00
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test04 -D TEST_ARGS2=yeah -D TEST_OUTPUT=tmpfile04.txt
|
2018-12-22 23:15:26 +08:00
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref04.txt
|
2018-12-24 18:57:42 +08:00
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
|
|
|
|
2021-05-24 02:29:01 +08:00
|
|
|
add_test(NAME maths1 COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
2021-12-31 23:59:37 +08:00
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test05 -D TEST_ARGS2=7 -D TEST_OUTPUT=tmpfile05.txt
|
2018-12-24 18:57:42 +08:00
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref05.txt
|
2018-12-25 01:24:43 +08:00
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
|
|
|
|
2021-05-24 02:29:01 +08:00
|
|
|
add_test(NAME threadsStart COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
2021-12-31 23:59:37 +08:00
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test06 -D TEST_OUTPUT=tmpfile06.txt
|
2018-12-25 01:24:43 +08:00
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref06.txt
|
2018-12-28 06:13:37 +08:00
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
|
|
|
|
2021-05-24 02:29:01 +08:00
|
|
|
add_test(NAME trig COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
2021-12-31 23:59:37 +08:00
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test07 -D TEST_OUTPUT=tmpfile07.txt
|
2018-12-28 06:13:37 +08:00
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref07.txt
|
2019-01-03 01:28:15 +08:00
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
2019-01-13 22:22:41 +08:00
|
|
|
|
2021-05-24 02:29:01 +08:00
|
|
|
add_test(NAME pi COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
2021-12-31 23:59:37 +08:00
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test08 -D TEST_OUTPUT=tmpfile08.txt
|
2019-01-13 22:22:41 +08:00
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref08.txt
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
2019-01-19 22:07:38 +08:00
|
|
|
|
2021-05-24 02:29:01 +08:00
|
|
|
add_test(NAME fork COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
2021-12-31 23:59:37 +08:00
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test09 -D TEST_OUTPUT=tmpfile09.txt
|
2019-01-19 22:07:38 +08:00
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref09.txt
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
2019-06-23 20:33:54 +08:00
|
|
|
|
2021-05-24 02:29:01 +08:00
|
|
|
add_test(NAME cppThreads COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
2021-12-31 23:59:37 +08:00
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test10 -D TEST_OUTPUT=tmpfile10.txt
|
2019-12-25 18:54:17 +08:00
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref10.txt
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
2019-07-01 01:47:54 +08:00
|
|
|
|
2021-05-24 02:29:01 +08:00
|
|
|
add_test(NAME tlsData COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
2021-12-31 23:59:37 +08:00
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test11 -D TEST_OUTPUT=tmpfile11.txt
|
2019-07-01 01:47:54 +08:00
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref11.txt
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
2019-09-26 03:26:35 +08:00
|
|
|
|
2021-05-24 02:29:01 +08:00
|
|
|
add_test(NAME fpu COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
2021-12-31 23:59:37 +08:00
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test12 -D TEST_OUTPUT=tmpfile12.txt
|
2019-11-04 16:43:47 +08:00
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref12.txt
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
|
|
|
|
2021-05-24 02:29:01 +08:00
|
|
|
add_test(NAME contexts COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
2021-12-31 23:59:37 +08:00
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test13 -D TEST_OUTPUT=tmpfile13.txt
|
2019-11-16 20:55:46 +08:00
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref13.txt
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
|
|
|
|
2022-03-08 18:54:38 +08:00
|
|
|
if(NOT LD80BITS)
|
|
|
|
add_test(NAME conditionalThreads COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test14 -D TEST_OUTPUT=tmpfile14.txt
|
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref14.txt
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
|
|
|
endif()
|
2020-04-19 21:58:54 +08:00
|
|
|
|
2021-05-28 01:55:17 +08:00
|
|
|
add_test(NAME linkingIndirectNoversion COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
2021-12-31 23:59:37 +08:00
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test15 -D TEST_OUTPUT=tmpfile15.txt
|
2021-05-28 01:55:17 +08:00
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref15.txt
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
|
|
|
|
|
|
|
add_test(NAME linkingIndirectVersion COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
2021-12-31 23:59:37 +08:00
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test16 -D TEST_OUTPUT=tmpfile16.txt
|
2021-05-28 01:55:17 +08:00
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref16.txt
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
2021-05-24 02:29:01 +08:00
|
|
|
|
2022-03-30 19:19:12 +08:00
|
|
|
add_test(NAME sse COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
2021-12-31 23:59:37 +08:00
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test17 -D TEST_OUTPUT=tmpfile17.txt
|
2021-06-29 20:35:16 +08:00
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref17.txt
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
|
|
|
|
2023-01-29 22:40:48 +08:00
|
|
|
set_tests_properties(sse PROPERTIES ENVIRONMENT "BOX86_DYNAREC_FASTNAN=0;BOX86_DYNAREC_FASTROUND=0")
|
2022-04-10 22:20:56 +08:00
|
|
|
|
2021-08-05 13:49:57 +08:00
|
|
|
add_test(NAME longjumpInSignals COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
2021-12-31 23:59:37 +08:00
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test18 -D TEST_OUTPUT=tmpfile18.txt
|
2021-08-05 13:49:57 +08:00
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref18.txt
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
|
|
|
|
2021-12-22 18:44:11 +08:00
|
|
|
add_test(NAME x87 COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
2021-12-31 23:59:37 +08:00
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test19 -D TEST_OUTPUT=tmpfile19.txt
|
2021-10-07 14:11:59 +08:00
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref19.txt
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
|
|
|
|
2021-12-22 18:44:11 +08:00
|
|
|
add_test(NAME idiv COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
2021-12-31 23:59:37 +08:00
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test20 -D TEST_OUTPUT=tmpfile20.txt
|
2021-12-22 18:44:11 +08:00
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref20.txt
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
|
|
|
|
2023-08-26 22:26:30 +08:00
|
|
|
add_test(NAME multiple_dlopen COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test21 -D TEST_OUTPUT=tmpfile21.txt
|
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref21.txt
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
|
|
|
|
2023-10-29 19:25:02 +08:00
|
|
|
add_test(NAME aes COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test22 -D TEST_OUTPUT=tmpfile22.txt
|
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref22.txt
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
|
|
|
|
2023-08-26 22:26:30 +08:00
|
|
|
file(GLOB extension_tests "${CMAKE_SOURCE_DIR}/tests/extensions/*.c")
|
2019-09-26 03:26:35 +08:00
|
|
|
foreach(file ${extension_tests})
|
2019-09-27 17:50:18 +08:00
|
|
|
get_filename_component(testname "${file}" NAME_WE)
|
|
|
|
add_test(NAME "${testname}" COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
2022-01-07 16:15:38 +08:00
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/extensions/${testname} -D TEST_OUTPUT=tmpfile-${testname}.txt
|
2019-09-27 17:50:18 +08:00
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/extensions/${testname}.txt
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake)
|
2023-08-26 22:26:30 +08:00
|
|
|
endforeach()
|
2020-01-15 04:40:43 +08:00
|
|
|
|
2023-01-30 01:39:30 +08:00
|
|
|
add_test(NAME sse_optimized COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test17_o2 -D TEST_OUTPUT=tmpfile17_o2.txt
|
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref17_o2.txt
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
|
|
|
|
2023-08-26 22:26:30 +08:00
|
|
|
set_tests_properties(sse_optimized PROPERTIES ENVIRONMENT "BOX86_DYNAREC_FASTNAN=0;BOX86_DYNAREC_FASTROUND=0")
|
2023-11-08 01:06:11 +08:00
|
|
|
|
|
|
|
add_test(bswap ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test23 -D TEST_OUTPUT=tmpfile23.txt
|
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref23.txt
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
|
|
|
|
2024-04-15 14:00:33 +08:00
|
|
|
add_test(feround ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test24 -D TEST_OUTPUT=tmpfile24.txt
|
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref24.txt
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
2023-11-08 01:06:11 +08:00
|
|
|
|
|
|
|
add_test(sse4_2 ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test25 -D TEST_OUTPUT=tmpfile25.txt
|
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref25.txt
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
2024-04-15 02:37:17 +08:00
|
|
|
|
|
|
|
add_test(fpu_rounding ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}
|
|
|
|
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test26 -D TEST_OUTPUT=tmpfile26.txt
|
|
|
|
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref26.txt
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
|
|
|
|
|
|
|
set_tests_properties(fpu_rounding PROPERTIES ENVIRONMENT "BOX86_DYNAREC_FASTROUND=0")
|
2023-11-08 01:06:11 +08:00
|
|
|
|
2020-02-05 19:04:54 +08:00
|
|
|
endif(BOX86LIB)
|