Compiling Luma 3DS on OS X

Hi,

I've went through the process of compiling Luma 3DS on my mac and thought I'd do a write up of the different steps involved. This guide presupposes that you know your way around the command line Hope it's useful.


1. Install gcc from Homebrew and set the env variables + aliases:

export CC=/usr/local/bin/gcc-5
export CXX=/usr/local/bin/g++-5
export CPP=/usr/local/bin/cpp-5
export LD=/usr/local/bin/gcc-5
alias c++=/usr/local/bin/c++-5
alias g++=/usr/local/bin/g++-5
alias gcc=/usr/local/bin/gcc-5
alias cpp=/usr/local/bin/cpp-5
alias ld=/usr/local/bin/gcc-5
alias cc=/usr/local/bin/gcc-5

2. Download the perl script for devkitPro at http://sourceforge.net/projects/devkitpro/files/Automated Installer/devkitARMupdate.pl/download

cd /path/to/the/script
chmod +x devkitARMupdate.pl
sudo ./devkitARMupdate.pl /opt/devkitPro
echo "export DEVKITPRO=/opt/devkitPro" >> ~/.bashrc
echo "export DEVKITARM=\$DEVKITPRO/devkitARM" >> ~/.bashrc
echo "export PATH=\$PATH:\$DEVKITARM/bin" >> ~/.bashrc
source ~/.bashrc

4. Replace libctru with Smealum's version

You can get his libctru at https://github.com/smealum/ctrulib.git
Compile with make and then replace libctru from /opt/devkitPro with smealum's version

5. Install gcc-arm-embedded with brew install Caskroom/cask/gcc-arm-embedded

6. Armips and bincc

Armips:

First install cmake if you don't have it. Then:
git clone --recursive https://github.com/Kingcom/armips.git
cd armips
mkdir build; cd build; cmake ..; make

(Remember to build with gcc from homebrew not clang)

bin2c:

Get bin2c from here https://sourceforge.net/projects/bin2c/files/1.1/bin2c-1.1.zip/download
gcc bin2.c -o bin2c

7. Get Luma 3ds repository (clone --recursive) and run make

I've also made a gist with this content here https://gist.github.com/zentis/b3c55f67f79e2931a2ec0e257b15ef90

I'll upload the armips and bin2c binary later tomorrow if there's interest so that you can bypass step 6.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Veho @ Veho: https://i.imgur.com/bG1pQld.mp4 +1