Skip to content

Commit d074c74

Browse files
committed
minor changes
1 parent da90499 commit d074c74

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

CMakeLists.txt

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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

3644
add_executable(CtrBootManager ${SOURCE_FILES}) # Create the elf file
37-
set(CMAKE_C_FLAGS "-DARM9")
38-
#set(CMAKE_C_FLAGS "-DARM11")
3945
set(ARCH "-march=armv6k -mtune=mpcore -mfloat-abi=hard")
4046
set_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")
4248
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DKA_SUGGESTED_CXX_FLAGS}")
4349

4450
find_package(CTRULIB REQUIRED) # Look for ctrulib
4551
target_link_libraries(CtrBootManager 3ds::ctrulib)
46-
target_include_directories(CtrBootManager PUBLIC source/libconfig)
4752
target_include_directories(CtrBootManager PUBLIC ${DEVKITPRO}/portlibs/armv6k/include)
4853
target_link_libraries(CtrBootManager ${DEVKITPRO}/portlibs/armv6k/lib/libz.a)
49-
5054
target_include_directories(CtrBootManager PUBLIC source source/hb_menu source/CakeBrah/include)
5155
target_include_directories(CtrBootManager PUBLIC source/CakeBrah/source/libkhax)
5256

@@ -77,9 +81,8 @@ list(REMOVE_ITEM SOURCE_FILES_ARM9
7781

7882
add_executable(CtrBootManager9 ${SOURCE_FILES_ARM9})
7983
set(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")
8185
set_target_properties(CtrBootManager9 PROPERTIES COMPILE_FLAGS ${ARM9_FLAGS})
82-
target_compile_options(CtrBootManager9 PUBLIC -DARM9)
8386
set_source_files_properties(source/arm9/source/bs-start.s PROPERTIES COMPILE_FLAGS "-x assembler-with-cpp ${ARM9_FLAGS}")
8487
set_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

Comments
 (0)