@@ -29,24 +29,28 @@ list(REMOVE_ITEM SOURCE_FILES
2929 ${FILTER_FILES}
3030)
3131
32+
33+ ###############################
34+ # Fix Clion define manually...
35+ ###############################
36+ set (CMAKE_C_FLAGS "" )
37+ set (CMAKE_C_FLAGS "-DARM9" )
38+ #set(CMAKE_C_FLAGS "-DARM11")
39+
3240###################
3341# CtrBootManager
3442###################
3543
3644add_executable (CtrBootManager ${SOURCE_FILES} ) # Create the elf file
37- set (CMAKE_C_FLAGS "-DARM9" )
38- #set(CMAKE_C_FLAGS "-DARM11")
3945set (ARCH "-march=armv6k -mtune=mpcore -mfloat-abi=hard" )
4046set_target_properties (CtrBootManager PROPERTIES COMPILE_FLAGS
41- "-mword-relocations ${ARCH} -fomit-frame-pointer -ffast-math -O2 -mtp=soft -D_3DS -DHAVE_CONFIG_H" )
47+ "-mword-relocations ${ARCH} -fomit-frame-pointer -ffast-math -O2 -mtp=soft -D_3DS -DARM11 - DHAVE_CONFIG_H" )
4248set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DKA_SUGGESTED_CXX_FLAGS} " )
4349
4450find_package (CTRULIB REQUIRED ) # Look for ctrulib
4551target_link_libraries (CtrBootManager 3ds::ctrulib )
46- target_include_directories (CtrBootManager PUBLIC source /libconfig )
4752target_include_directories (CtrBootManager PUBLIC ${DEVKITPRO} /portlibs/armv6k/include )
4853target_link_libraries (CtrBootManager ${DEVKITPRO} /portlibs/armv6k/lib/libz.a )
49-
5054target_include_directories (CtrBootManager PUBLIC source source /hb_menu source /CakeBrah/include )
5155target_include_directories (CtrBootManager PUBLIC source /CakeBrah/source/libkhax )
5256
@@ -77,9 +81,8 @@ list(REMOVE_ITEM SOURCE_FILES_ARM9
7781
7882add_executable (CtrBootManager9 ${SOURCE_FILES_ARM9} )
7983set (ARCH9 "-march=armv5te -mtune=arm946e-s" )
80- set (ARM9_FLAGS "-DARM9 - mthumb -mthumb-interwork -g ${ARCH9} -Wall -O2 -fomit-frame-pointer -ffast-math -std=c99 -DARM9 -DINI_USE_STACK -DEXEC_BOOTSTRAP -DHAVE_CONFIG_H" )
84+ set (ARM9_FLAGS "-mthumb -mthumb-interwork -g ${ARCH9} -Wall -O2 -fomit-frame-pointer -ffast-math -std=c99 -DARM9 -DINI_USE_STACK -DEXEC_BOOTSTRAP -DHAVE_CONFIG_H" )
8185set_target_properties (CtrBootManager9 PROPERTIES COMPILE_FLAGS ${ARM9_FLAGS} )
82- target_compile_options (CtrBootManager9 PUBLIC -DARM9 )
8386set_source_files_properties (source /arm9/source/bs-start.s PROPERTIES COMPILE_FLAGS "-x assembler-with-cpp ${ARM9_FLAGS} " )
8487set_target_properties (CtrBootManager9 PROPERTIES LINK_FLAGS
8588 "-nostartfiles -g -mthumb -mthumb-interwork -Wl,-Map,CtrBootManager9.map -T ${CMAKE_SOURCE_DIR} /source/arm9/bootstrap.ld " )
0 commit comments