-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
45 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
set(CMAKE_SYSTEM_NAME Generic) | ||
set(cmake_system_processor arm) | ||
set(cmake_crosscompiling 1) | ||
set(DEVKITARM $ENV{DEVKITARM}) | ||
set(DEVKITPRO $ENV{DEVKITPRO}) | ||
|
||
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") | ||
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "") | ||
set(CMAKE_C_COMPILER ${DEVKITARM}/bin/arm-none-eabi-gcc) | ||
set(CMAKE_C_FLAGS "-mthumb-interwork -mthumb -O2 -Wall -fno-strict-aliasing -specs=gba.specs") | ||
set(CMAKE_CXX_COMPILER ${DEVKITARM}/bin/arm-none-eabi-gcc) | ||
set(CMAKE_CXX_FLAGS "-mthumb-interwork -mthumb -O2 -Wall -fno-strict-aliasing -specs=gba.specs") | ||
|
||
function(add_gba_rom ROMNAME) | ||
set(ROM_SRC ${ARGV}) | ||
list(REMOVE_AT ROM_SRC 0) | ||
add_executable(${ROMNAME}.elf ${ROM_SRC}) | ||
add_custom_target(${ROMNAME}.gba ALL | ||
COMMAND ${DEVKITARM}/bin/arm-none-eabi-objcopy -v -O binary ${ROMNAME}.elf ${ROMNAME}.gba | ||
COMMAND ${DEVKITARM}/bin/gbafix ${ROMNAME}.gba | ||
DEPENDS ${ROMNAME}.elf | ||
COMMENT "Creating GBA ROM ${ROMNAME}.gba") | ||
add_dependencies(${ROMNAME}.gba ${ROMNAME}.elf) | ||
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${ROMNAME}.gba) | ||
endfunction(add_gba_rom) |
File renamed without changes.
File renamed without changes.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/******************************************* | ||
** QTCreator Homebrew Project | ||
** Author: Javier J. Salmeron-Garcia | ||
** mail: [email protected] | ||
** | ||
****************************************************************************/ | ||
--> | ||
<wizard version="1" kind="project" firstpage="10" id="Game Boy Advance (CMake)" category="Homebrew.Projects" | ||
platformIndependent="true" featuresRequired="Plugin.CMakeProjectManager"> | ||
<icon>mgba.png</icon> | ||
<description>Game Boy Advance ROM using CMake. Devkitarm required.</description> | ||
<displayname>Game Boy Advance (CMake)</displayname>; | ||
<displaycategory>Homebrew Development</displaycategory> | ||
<files> | ||
<file source="main.c" target="main.c" openeditor="true"/> | ||
<file source="CMakeLists.txt" openproject="true"/> | ||
</files> | ||
</wizard> |
This file was deleted.
Oops, something went wrong.