emu48android/app/CMakeLists.txt

110 lines
3.8 KiB
Text
Raw Normal View History

# For more information about using CMake with Android Studio, read the
# documentation: https://d.android.com/studio/projects/add-native-code.html
# Sets the minimum version of CMake required to build the native library.
2024-06-12 13:07:28 +02:00
cmake_minimum_required(VERSION 3.6.0)
#add_compile_options(-DDEBUG_DISPLAY)
#add_compile_options(-DDEBUG_SOUND)
#add_compile_options(-DDEBUG_DEBUGGER)
#add_compile_options(-DDEBUG_FLASH)
#add_compile_options(-DDEBUG_IO)
#add_compile_options(-DDEBUG_SERIAL)
2019-07-03 21:55:34 +02:00
#add_compile_options(-DDEBUG_ANDROID_WAVE_OUT)
#add_compile_options(-DDEBUG_ANDROID_TIMER)
#add_compile_options(-DDEBUG_ANDROID_PAINT)
#add_compile_options(-DDEBUG_ANDROID_THREAD)
#add_compile_options(-DDEBUG_ANDROID_FILE)
2021-10-06 07:34:26 +02:00
#add_compile_options(-DDEBUG_ANDROID_SERIAL)
#add_compile_options(-DNEW_WIN32_SOUND_ENGINE)
# For the library LodePNG
add_compile_options(-DLODEPNG_NO_COMPILE_ENCODER)
add_compile_options(-DLODEPNG_NO_COMPILE_DISK)
add_compile_options(-DLODEPNG_NO_COMPILE_ANCILLARY_CHUNKS)
add_compile_options(-DLODEPNG_NO_COMPILE_ERROR_TEXT)
add_compile_options(-DLODEPNG_NO_COMPILE_CPP)
# add_compile_options(-DLODEPNG_NO_COMPILE_CRC) # Disabled to use new CRC function from lodepng.
add_compile_options(-DEMUXX=48)
2024-06-12 13:07:28 +02:00
#add_compile_options(-Wno-error=implicit-function-declaration)
add_compile_options(-fpermissive)
add_compile_options(-Wno-error=incompatible-pointer-types)
if(CMAKE_BUILD_TYPE STREQUAL Release)
message("RELEASE BUILD")
add_compile_options(-Ofast)
endif()
2019-01-15 22:37:02 +01:00
include_directories(src/main/cpp/win32)
# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.
# You can define multiple libraries, and CMake builds them for you.
# Gradle automatically packages shared libraries with your APK.
add_library( # Sets the name of the library.
native-lib
# Sets the library as a shared library.
SHARED
# Provides a relative path to your source file(s).
2018-11-19 23:34:47 +01:00
2018-12-10 21:54:43 +01:00
src/main/cpp/core/apple.c
# src/main/cpp/core/cursor.c
# src/main/cpp/core/ddeserv.c
# src/main/cpp/core/debugger.c
src/main/cpp/core/disasm.c
src/main/cpp/core/dismem.c
src/main/cpp/core/display.c
src/main/cpp/core/disrpl.c
# src/main/cpp/core/Emu48.c #-> To rewrite
src/main/cpp/core/engine.c
# src/main/cpp/core/external.c # Removed 167/166+
2018-12-10 21:54:43 +01:00
src/main/cpp/core/fetch.c
src/main/cpp/core/files.c
src/main/cpp/core/i28f160.c
src/main/cpp/core/keyboard.c
src/main/cpp/core/keymacro.c
src/main/cpp/core/kml.c
src/main/cpp/core/lodepng.c
src/main/cpp/core/lowbat.c
src/main/cpp/core/mops.c
src/main/cpp/core/mru.c
src/main/cpp/core/opcodes.c
src/main/cpp/core/pch.c
# src/main/cpp/core/pngcrc.c # Disabled to use new CRC function from lodepng.
2019-06-11 20:46:27 +02:00
src/main/cpp/core/redeye.c
src/main/cpp/core/romcrc.c
2018-12-10 21:54:43 +01:00
src/main/cpp/core/rpl.c
src/main/cpp/core/serial.c
2018-12-10 21:54:43 +01:00
src/main/cpp/core/settings.c
# src/main/cpp/core/sndenum.c
2019-01-02 00:08:17 +01:00
src/main/cpp/core/sound.c
2018-12-10 21:54:43 +01:00
src/main/cpp/core/stack.c
src/main/cpp/core/symbfile.c
src/main/cpp/core/timer.c
# src/main/cpp/core/udp.c
2018-11-19 23:34:47 +01:00
2018-11-22 22:58:35 +01:00
src/main/cpp/win32-layer.c
src/main/cpp/android-layer.c
src/main/cpp/android-emu.c # Emu48.c rewrite
src/main/cpp/emu-jni.c
)
# Specifies libraries CMake should link to your target library. You
# can link multiple libraries, such as libraries you define in this
# build script, prebuilt third-party libraries, or system libraries.
target_link_libraries( # Specifies the target library.
native-lib
2018-11-25 23:44:31 +01:00
android
2018-11-30 23:38:09 +01:00
jnigraphics
2019-01-02 00:08:17 +01:00
OpenSLES
2024-06-12 13:07:28 +02:00
log)