forked from milkytracker/MilkyTracker
-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeAmigaToolchain.txt
33 lines (25 loc) · 1.39 KB
/
CMakeAmigaToolchain.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
set(CMAKE_SYSTEM_NAME AmigaOS3)
set(CMAKE_SYSTEM_PROCESSOR m68k)
set(CMAKE_SYSROOT /opt/amiga)
set(tools ${CMAKE_SYSROOT})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
set(AMIGA 1)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
set(CMAKE_C_COMPILER ${tools}/bin/m68k-amigaos-gcc)
set(CMAKE_CXX_COMPILER ${tools}/bin/m68k-amigaos-g++)
set(CMAKE_AR ${tools}/bin/m68k-amigaos-ar)
# Compiler flags
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -m68040 -mhard-float -Os -fomit-frame-pointer -fno-exceptions -s -noixemul")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -m68040 -mhard-float -Os -fomit-frame-pointer -fno-exceptions -s -noixemul")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -m68040 -mhard-float -Os -fomit-frame-pointer -fno-exceptions -fpermissive -fno-rtti -s -noixemul")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -m68040 -mhard-float -Os -fomit-frame-pointer -fno-exceptions -fpermissive -fno-rtti -s -noixemul")
set(BUILD_SHARED_LIBS OFF)
# Linker configuration
set(CMAKE_EXE_LINKER_FLAGS "-noixemul -ldebug -s -Xlinker --allow-multiple-definition ")
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")