Skip to content

Commit 9890b75

Browse files
committed
Add OpenOrbis project files.
1 parent 2a8f7c1 commit 9890b75

File tree

5 files changed

+199
-0
lines changed

5 files changed

+199
-0
lines changed

OpenOrbis/build.bat

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
SETLOCAL EnableDelayedExpansion
2+
3+
REM Libraries to link in
4+
SET libraries=-lc -lkernel
5+
6+
REM Read the script arguments into local vars
7+
SET intdir=%1
8+
SET targetname=%~2
9+
SET outputPath=%~3
10+
11+
SET outputElf=%intdir%%targetname%.elf
12+
SET outputOelf=%intdir%%targetname%.oelf
13+
SET outputPrx=%intdir%%targetname%.prx
14+
SET outputStub=%intdir%%targetname%_stub.so
15+
16+
REM Compile object files for all the source files
17+
FOR %%f in (..\*.c) DO (
18+
ECHO Compiling %%~f...
19+
clang -cc1 -triple x86_64-scei-ps4-elf -munwind-tables -I"%OO_PS4_TOOLCHAIN%\include" -emit-obj -o %intdir%\%%~nf.o "%%~f"
20+
)
21+
FOR %%f in (..\*.cpp) DO (
22+
ECHO Compiling %%~f...
23+
clang++ -cc1 -triple x86_64-scei-ps4-elf -munwind-tables -I"%OO_PS4_TOOLCHAIN%\include" -emit-obj -o %intdir%\%%~nf.o "%%~f"
24+
)
25+
26+
REM Get a list of object files for linking
27+
SET obj_files=
28+
FOR %%f IN (%intdir%\\*.o) DO SET obj_files=!obj_files! .\%%f
29+
30+
REM Link the input ELF
31+
ECHO Linking...
32+
ld.lld -m elf_x86_64 -pie --version-script="%targetname%.version" --script "%OO_PS4_TOOLCHAIN%\link.x" --eh-frame-hdr -o "%outputElf%" "-L%OO_PS4_TOOLCHAIN%\lib" -lc -lkernel --verbose "%OO_PS4_TOOLCHAIN%\lib\crtlib.o" %obj_files%
33+
34+
REM Create stub shared libraries
35+
FOR %%f in (..\*.c) DO (
36+
clang -target x86_64-pc-linux-gnu -ffreestanding -nostdlib -fno-builtin -fPIC -c -I"%OO_PS4_TOOLCHAIN%\include" -o %intdir%\%%~nf.o.stub "%%~f"
37+
)
38+
FOR %%f in (..\*.cpp) DO (
39+
clang++ -target x86_64-pc-linux-gnu -ffreestanding -nostdlib -fno-builtin -fPIC -c -I"%OO_PS4_TOOLCHAIN%\include" -o %intdir%\%%~nf.o.stub "%%~f"
40+
)
41+
42+
SET stub_obj_files=
43+
FOR %%f in (%intdir%\\*.o.stub) DO SET stub_obj_files=!stub_obj_files! .\%%f
44+
45+
clang++ -target x86_64-pc-linux-gnu -shared -fuse-ld=lld -ffreestanding -nostdlib -fno-builtin "-L%OO_PS4_TOOLCHAIN%\lib" %libraries% %stub_obj_files% -o "%outputStub%"
46+
47+
REM Create the prx
48+
%OO_PS4_TOOLCHAIN%\bin\windows\create-lib.exe -in "%outputElf%" --out "%outputOelf%" --paid 0x3800000000000011
49+
50+
REM Cleanup
51+
COPY "%outputPrx%" "%outputPath%\%targetname%.prx"
52+
DEL "%outputPrx%"

OpenOrbis/right.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.28010.2016
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "right", "right.vcxproj", "{A84D4D62-C8E8-4047-8BFF-528F6296417A}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|x64 = Debug|x64
11+
Release|x64 = Release|x64
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{A84D4D62-C8E8-4047-8BFF-528F6296417A}.Debug|x64.ActiveCfg = Debug|x64
15+
{A84D4D62-C8E8-4047-8BFF-528F6296417A}.Debug|x64.Build.0 = Debug|x64
16+
{A84D4D62-C8E8-4047-8BFF-528F6296417A}.Release|x64.ActiveCfg = Release|x64
17+
{A84D4D62-C8E8-4047-8BFF-528F6296417A}.Release|x64.Build.0 = Release|x64
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {82213F2A-7C95-4934-B123-C2F739005EEA}
24+
EndGlobalSection
25+
EndGlobal

OpenOrbis/right.vcxproj

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|x64">
5+
<Configuration>Debug</Configuration>
6+
<Platform>x64</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|x64">
9+
<Configuration>Release</Configuration>
10+
<Platform>x64</Platform>
11+
</ProjectConfiguration>
12+
</ItemGroup>
13+
<PropertyGroup Label="Globals">
14+
<VCProjectVersion>15.0</VCProjectVersion>
15+
<ProjectGuid>{A84D4D62-C8E8-4047-8BFF-528F6296417A}</ProjectGuid>
16+
<Keyword>Win32Proj</Keyword>
17+
</PropertyGroup>
18+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
19+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
20+
<ConfigurationType>Makefile</ConfigurationType>
21+
<UseDebugLibraries>true</UseDebugLibraries>
22+
<PlatformToolset>v142</PlatformToolset>
23+
</PropertyGroup>
24+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
25+
<ConfigurationType>Makefile</ConfigurationType>
26+
<UseDebugLibraries>false</UseDebugLibraries>
27+
<PlatformToolset>v142</PlatformToolset>
28+
</PropertyGroup>
29+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
30+
<ImportGroup Label="ExtensionSettings">
31+
</ImportGroup>
32+
<ImportGroup Label="Shared">
33+
</ImportGroup>
34+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
35+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
36+
</ImportGroup>
37+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
38+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
39+
</ImportGroup>
40+
<PropertyGroup Label="UserMacros" />
41+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
42+
<NMakePreprocessorDefinitions>WIN32;_DEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
43+
</PropertyGroup>
44+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
45+
<NMakePreprocessorDefinitions>_DEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
46+
<NMakeBuildCommandLine>call build.bat $(IntDir) "$(TargetName)" "$(SolutionDir)"</NMakeBuildCommandLine>
47+
<NMakeReBuildCommandLine>del /s /q /f $(IntDir)\*.o
48+
del /s /q /f $(IntDir)\*.elf
49+
del /s /q /f $(IntDir)\*.oelf
50+
call build.bat $(IntDir) "$(TargetName)" "$(SolutionDir)"</NMakeReBuildCommandLine>
51+
<NMakeCleanCommandLine>del /s /q /f $(IntDir)\*.o
52+
del /s /q /f $(IntDir)\*.elf
53+
del /s /q /f $(IntDir)\*.oelf</NMakeCleanCommandLine>
54+
<OutDir>$(SolutionDir)</OutDir>
55+
<NMakeIncludeSearchPath>$(OO_PS4_TOOLCHAIN)\include;$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
56+
</PropertyGroup>
57+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
58+
<NMakePreprocessorDefinitions>WIN32;NDEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
59+
</PropertyGroup>
60+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
61+
<NMakePreprocessorDefinitions>NDEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
62+
</PropertyGroup>
63+
<ItemDefinitionGroup>
64+
</ItemDefinitionGroup>
65+
<ItemGroup>
66+
<ClCompile Include="..\module.c" Link="module.c" />
67+
</ItemGroup>
68+
<ItemGroup>
69+
<ClInclude Include="..\logo_data.h" Link="logo_data.h" />
70+
</ItemGroup>
71+
<ItemGroup>
72+
<ClInclude Include="..\string_data.h" Link="string_data.h" />
73+
</ItemGroup>
74+
<ItemGroup>
75+
<None Include="build.bat" />
76+
</ItemGroup>
77+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
78+
<ImportGroup Label="ExtensionTargets">
79+
</ImportGroup>
80+
</Project>

OpenOrbis/right.vcxproj.filters

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Source Files">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Header Files">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Resource Files">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<ClCompile Include="module.c">
19+
<Filter>Source Files</Filter>
20+
</ClCompile>
21+
</ItemGroup>
22+
<ItemGroup>
23+
<ClInclude Include="logo_data.h">
24+
<Filter>Header Files</Filter>
25+
</ClInclude>
26+
</ItemGroup>
27+
<ItemGroup>
28+
<ClInclude Include="string_data.h">
29+
<Filter>Header Files</Filter>
30+
</ClInclude>
31+
</ItemGroup>
32+
<ItemGroup>
33+
<None Include="build.bat" />
34+
</ItemGroup>
35+
</Project>

OpenOrbis/right.version

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
right.prx {
2+
global:
3+
module_start;
4+
module_stop;
5+
sceGameRight*;
6+
local: *;
7+
};

0 commit comments

Comments
 (0)