|
|
1.1 root 1: 1.1.1.5 ! root 2: include_directories(. ../.. ../includes ${SDL_INCLUDE_DIR} softfloat) 1.1 root 3: 1.1.1.4 root 4: # The sources generated by gencpu: 5: set(CPUEMU_SRCS cpustbl.c cpuemu_0.c cpuemu_11.c cpuemu_13.c 6: cpuemu_20.c cpuemu_21.c cpuemu_22.c cpuemu_23.c cpuemu_24.c 1.1.1.5 ! root 7: cpuemu_31.c cpuemu_32.c cpuemu_33.c cpuemu_34.c cpuemu_35.c ! 8: cpuemu_40.c cpuemu_50.c) ! 9: ! 10: # Sources that are synchronized with WinUAE: ! 11: set(WINUAE_SRCS cpudefs.c cpummu.c cpummu030.c debug.c newcpu_common.c newcpu.c ! 12: readcpu.c writelog.c fpp.c fpp_native.c fpp_softfloat.c ! 13: softfloat/softfloat.c softfloat/softfloat_decimal.c ! 14: softfloat/softfloat_fpsp.c) 1.1.1.4 root 15: 1.1 root 16: # Unfortunately we've got to specify the rules for the generated files twice, 17: # once for cross compiling (with calling the host cc directly) and once 18: # for native compiling so that the rules also work for non-Unix environments... 19: if(CMAKE_CROSSCOMPILING) 20: 21: add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/build68k 1.1.1.4 root 22: COMMAND cc -I${CMAKE_CURRENT_SOURCE_DIR} 23: ${CMAKE_CURRENT_SOURCE_DIR}/build68k.c 24: ${CMAKE_CURRENT_SOURCE_DIR}/writelog.c 25: -o ${CMAKE_CURRENT_BINARY_DIR}/build68k 1.1 root 26: DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/build68k.c) 27: 28: add_custom_command(OUTPUT cpudefs.c 29: COMMAND ./build68k < ${CMAKE_CURRENT_SOURCE_DIR}/table68k >cpudefs.c 30: DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/table68k 31: ${CMAKE_CURRENT_BINARY_DIR}/build68k) 32: 33: add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/gencpu 34: COMMAND cc -I${CMAKE_CURRENT_SOURCE_DIR} 35: cpudefs.c ${CMAKE_CURRENT_SOURCE_DIR}/gencpu.c 36: ${CMAKE_CURRENT_SOURCE_DIR}/readcpu.c 37: -o ${CMAKE_CURRENT_BINARY_DIR}/gencpu 38: DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gencpu.c 39: ${CMAKE_CURRENT_SOURCE_DIR}/readcpu.c cpudefs.c) 40: 1.1.1.4 root 41: add_custom_command(OUTPUT ${CPUEMU_SRCS} 1.1 root 42: COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gencpu 43: DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gencpu) 44: 45: else() # Rules for normal build follow 46: 1.1.1.4 root 47: add_executable(build68k build68k.c writelog.c) 1.1 root 48: 49: add_custom_command(OUTPUT cpudefs.c 1.1.1.5 ! root 50: COMMAND build68k < ${CMAKE_CURRENT_SOURCE_DIR}/table68k >cpudefs.c 1.1 root 51: DEPENDS table68k build68k) 52: 53: add_executable(gencpu gencpu.c readcpu.c cpudefs.c) 54: 1.1.1.5 ! root 55: add_custom_command(OUTPUT ${CPUEMU_SRCS} COMMAND gencpu DEPENDS gencpu) 1.1 root 56: 57: endif(CMAKE_CROSSCOMPILING) 58: 1.1.1.5 ! root 59: if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") ! 60: # Silence some warnings for the autogenerated sources - the generated ! 61: # cpuemu_xx.c contains a lot of warnings we don't really care about... ! 62: set(CPUEMU_CFLAGS "-Wno-sign-compare -Wno-shadow -Wno-unused-variable") ! 63: if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.6) ! 64: set (CPUEMU_CFLAGS "${CPUEMU_CFLAGS} -Wno-unused-but-set-variable") ! 65: endif() ! 66: set_source_files_properties(${CPUEMU_SRCS} 1.1.1.3 root 67: PROPERTIES COMPILE_FLAGS ${CPUEMU_CFLAGS}) 68: 1.1.1.4 root 69: # For the other files, hide some harmless warnings, too (since we 70: # try to keep the files in sync with WinUAE, it's hard to fix them) 1.1.1.5 ! root 71: set(CPUMAIN_CFLAGS "-Wno-unused-variable -Wno-unused-function -Wno-unused-label") ! 72: if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.6) ! 73: set (CPUMAIN_CFLAGS "${CPUMAIN_CFLAGS} -Wno-unused-but-set-variable") ! 74: endif() ! 75: # The remaining warnings should be hidden for release builds: ! 76: if (CMAKE_BUILD_TYPE STREQUAL "Release") ! 77: set(CPUMAIN_CFLAGS "${CPUMAIN_CFLAGS} -Wno-sign-compare -Wno-bad-function-cast") ! 78: set(CPUMAIN_CFLAGS "${CPUMAIN_CFLAGS} -Wno-missing-braces") ! 79: if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.7) ! 80: set(CPUMAIN_CFLAGS "${CPUMAIN_CFLAGS} -Wno-maybe-uninitialized") 1.1.1.4 root 81: endif() 1.1.1.3 root 82: endif() 1.1.1.5 ! root 83: set_source_files_properties(${WINUAE_SRCS} ! 84: PROPERTIES COMPILE_FLAGS ${CPUMAIN_CFLAGS}) ! 85: endif() 1.1.1.3 root 86: 1.1.1.5 ! root 87: add_library(UaeCpu ${CPUEMU_SRCS} ${WINUAE_SRCS} custom.c events.c memory.c ! 88: hatari-glue.c)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.