Skip to content

Commit

Permalink
Merge branch 'cobra-dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
hoglet67 committed Jun 7, 2017
2 parents 1f8cc36 + c79645c commit 5c5fe50
Show file tree
Hide file tree
Showing 109 changed files with 10,208 additions and 10,444 deletions.
128 changes: 82 additions & 46 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,26 @@ cmake_minimum_required( VERSION 2.8 )
# cross-compiler's ability to compile a simple program because that will fail
project( tube-client C ASM )

set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" )

# Add any C compiler flags here. The C flags concerned with processor tuning
# are in the toolchain files toolchain-arm-none-eabi-bcm2835.cmake, etc.
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3" )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2" )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall" )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostartfiles" )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DPROFILING -fomit-frame-pointer" )
#set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fomit-frame-pointer " )
#set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffixed-ip" )

set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-delete-null-pointer-checks -fdata-sections -ffunction-sections ")

#set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --specs=nano.specs --specs=nosys.specs -u _printf_float" )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --specs=nano.specs --specs=nosys.specs -u _printf_float" )

# Set the linker flags so that we use our "custom" linker script

set( CMAKE_EXE_LINKER_FLAGS "-Wl,--gc-sections -Wl,-unresolved-symbols=ignore-in-object-files -Wl,-T,${PROJECT_SOURCE_DIR}/rpi.ld" )
#set( CMAKE_EXE_LINKER_FLAGS "-Wl,--gc-sections -Wl,--print-gc-sections -Wl,-unresolved-symbols=ignore-in-object-files -Wl,-T,${PROJECT_SOURCE_DIR}/rpi.ld" )

set( CMAKE_EXE_LINKER_FLAGS "-Wl,--gc-sections -Wl,-T,${PROJECT_SOURCE_DIR}/rpi.ld" )


file( GLOB core_files
armc-cstartup.c
Expand Down Expand Up @@ -80,6 +85,8 @@ file( GLOB core_files
performance.h
tubevc.c
tubevc.h
logging.c
logging.h
)

# 6502 Co Processor using 65tube Implementation
Expand Down Expand Up @@ -157,30 +164,6 @@ file( GLOB copro_z80_files
yaze/mem_mmu.h
)

# 6809 (version based on xroar emulator)
#file( GLOB copro_6809_files
# copro-mc6809.h
# copro-mc6809.c
# mc6809/config.h
# mc6809/pl-endian.h
# mc6809/delegate.c
# mc6809/delegate.h
# mc6809/xalloc.h
# mc6809/xmalloc.c
# mc6809/mc6809.c
# mc6809/mc6809.h
# mc6809/hd6309.c
# mc6809/hd6309.h
#)

# 6809 (version based on Sean Conner emulator)
#file( GLOB copro_6809sc_files
# copro-mc6809sc.h
# copro-mc6809sc.c
# mc6809sc/mc6809.c
# mc6809sc/mc6809.h
#)

# 6809 (version based on Neal Crook emulator)
file( GLOB copro_6809nc_files
copro-mc6809nc.h
Expand Down Expand Up @@ -239,16 +222,45 @@ file( GLOB copro_arm_files
darm/thumb-tbl.h
)

# Interactive debugger files
file( GLOB debugger_files
debugger/debugger.c
debugger/debugger.h
debugger/linenoise.c
debugger/linenoise.h
cpu_debug.h
lib6502_debug.c
lib6502_debug.h
yaze/z80dis.c
yaze/z80dis.h
NS32016/32016_debug.c
NS32016/32016_debug.h
mame/arm_debug.c
mame/arm_debug.h
mc6809nc/mc6809.c
mc6809nc/mc6809.h
mc6809nc/mc6809_debug.h
mc6809nc/mc6809_debug.c
mc6809nc/mc6809_dis.c
mc6809nc/mc6809_dis.h
cpu80186/cpu80186_debug.c
cpu80186/cpu80186_debug.h
)

if( ${DEBUG} )

set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDEBUG=1" )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDEBUG=1 " )

if( NOT ( ${MINIMAL_BUILD} ) )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DINCLUDE_DEBUGGER=1 " )
endif()

endif()


if( ${MINIMAL_BUILD} )

set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMINIMAL_BUILD=1" )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMINIMAL_BUILD=1" )

add_executable( tube-client
${core_files}
Expand All @@ -258,22 +270,46 @@ if( ${MINIMAL_BUILD} )

else()

add_executable( tube-client
${core_files}
${copro_65tube_files}
${copro_lib6502_files}
${shared_6502_files}
${copro_80186_files}
${copro_arm2_files}
${copro_32016_files}
${copro_z80_files}
${copro_6809_files}
${copro_6809sc_files}
${copro_6809nc_files}
${shared_6809_files}
${copro_null_files}
${copro_arm_files}
)
if( ${DEBUG} )

add_executable( tube-client
${core_files}
${copro_65tube_files}
${copro_lib6502_files}
${shared_6502_files}
${copro_80186_files}
${copro_arm2_files}
${copro_32016_files}
${copro_z80_files}
${copro_6809_files}
${copro_6809sc_files}
${copro_6809nc_files}
${shared_6809_files}
${copro_null_files}
${copro_arm_files}
${debugger_files}
)

else()

add_executable( tube-client
${core_files}
${copro_65tube_files}
${copro_lib6502_files}
${shared_6502_files}
${copro_80186_files}
${copro_arm2_files}
${copro_32016_files}
${copro_z80_files}
${copro_6809_files}
${copro_6809sc_files}
${copro_6809nc_files}
${shared_6809_files}
${copro_null_files}
${copro_arm_files}
)

endif()

endif()

Expand Down
Loading

0 comments on commit 5c5fe50

Please sign in to comment.