My premake builds 3dsx files that only work on emulators and crash on real 3DS hardware, since I want to move from Makefiles i would like your help to debug which flags I am missing here. Translating the Makefile to a command line compilation would also help a lot since it doesn't output how the program is being linked.
Example premake file, the Makefile I want to translate is the default included in devkitpro 3ds examples:
Example premake file, the Makefile I want to translate is the default included in devkitpro 3ds examples:
Code:
workspace "v"
configurations { "Debug", "Release" }
local devkitpro = os.getenv("DEVKITPRO")
local devkitarm = os.getenv("DEVKITARM")
project "v"
kind "ConsoleApp"
language "C++"
targetdir "bin/%{cfg.buildcfg}"
makesettings [[
CXX = arm-none-eabi-g++
LD = arm-none-eabi-ld
]]
files {
"./src/**.h",
"./src/**.cpp"
}
defines {
"_3DS",
"ARM11",
}
includedirs {
"include",
"include/m3d",
"src",
devkitpro .. "/libctru/include",
devkitpro .. "/portlibs/3ds/include",
}
links {
"m3dia",
"citro2d",
"citro3d",
"ctru",
}
libdirs {
devkitpro .. "/libctru/lib",
devkitpro .. "/portlibs/3ds/lib",
}
buildoptions {
"-g",
"-Wall",
"-std=gnu++11",
"-mword-relocations",
"-ffunction-sections",
"-fno-rtti",
"-fno-exceptions",
"-fomit-frame-pointer",
"-march=armv6k",
"-mtune=mpcore",
"-mfloat-abi=hard",
"-mtp=soft",
}
linkoptions {
"-o vida.3dsx",
"-specs=3dsx.specs",
"-march=armv6k",
"-mtune=mpcore",
"-mfloat-abi=hard",
"-mtp=soft",
"-Wl,-Map,8.map",
}
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
filter "configurations:Release"
defines { "RELEASE" }
optimize "On"