Annotation of hatari/src/uae-cpu/CMakeLists.txt, revision 1.1.1.4

1.1       root        1: 
1.1.1.4 ! root        2: include_directories(. ../.. ../includes ${SDL_INCLUDE_DIR})
1.1       root        3: 
                      4: # Unfortunately we've got to specify the rules for the generated files twice,
                      5: # once for cross compiling (with calling the host cc directly) and once
                      6: # for native compiling so that the rules also work for non-Unix environments...
                      7: if(CMAKE_CROSSCOMPILING)
                      8: 
                      9:        add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/build68k
                     10:                COMMAND cc ${CMAKE_CURRENT_SOURCE_DIR}/build68k.c
                     11:                           -o ${CMAKE_CURRENT_BINARY_DIR}/build68k
                     12:                DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/build68k.c)
                     13: 
                     14:        add_custom_command(OUTPUT cpudefs.c
                     15:                COMMAND ./build68k < ${CMAKE_CURRENT_SOURCE_DIR}/table68k >cpudefs.c
                     16:                DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/table68k
                     17:                        ${CMAKE_CURRENT_BINARY_DIR}/build68k)
                     18: 
                     19:        add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/gencpu
                     20:                COMMAND cc -I${CMAKE_CURRENT_SOURCE_DIR}
                     21:                           cpudefs.c ${CMAKE_CURRENT_SOURCE_DIR}/gencpu.c
                     22:                           ${CMAKE_CURRENT_SOURCE_DIR}/readcpu.c
                     23:                           -o ${CMAKE_CURRENT_BINARY_DIR}/gencpu
                     24:                DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gencpu.c
                     25:                        ${CMAKE_CURRENT_SOURCE_DIR}/readcpu.c cpudefs.c)
                     26: 
                     27:        add_custom_command(OUTPUT cpuemu.c cpustbl.c
                     28:                COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gencpu
                     29:                DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gencpu)
                     30: 
                     31: else() # Rules for normal build follow
                     32: 
                     33:        add_executable(build68k build68k.c)
                     34: 
                     35:        add_custom_command(OUTPUT cpudefs.c
1.1.1.3   root       36:                COMMAND build68k < ${CMAKE_CURRENT_SOURCE_DIR}/table68k >cpudefs.c
1.1       root       37:                DEPENDS table68k build68k)
                     38: 
                     39:        add_executable(gencpu gencpu.c readcpu.c cpudefs.c)
                     40: 
1.1.1.3   root       41:        add_custom_command(OUTPUT cpuemu.c cpustbl.c COMMAND gencpu DEPENDS gencpu)
1.1       root       42: 
                     43: endif(CMAKE_CROSSCOMPILING)
                     44: 
                     45: 
                     46: # Generated cpuemu.c contains a lot of warnings we don't really care about...
1.1.1.4 ! root       47: if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
1.1.1.2   root       48: set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-sign-compare -Wno-shadow")
                     49: set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-variable -Wno-unused-label")
                     50: endif(CMAKE_COMPILER_IS_GNUCC)
1.1       root       51: 
                     52: add_library(UaeCpu
                     53:        cpudefs.c cpuemu.c cpustbl.c
                     54:        hatari-glue.c memory.c newcpu.c readcpu.c fpp.c
                     55:        )

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.