Commit Graph

45 Commits

Author SHA1 Message Date
Wouter Wijsman
7a57149eff Improve output of create_pbp_file command to specify target
Right now it's a bit of a mess when running builds in parallel.
2024-10-31 10:42:48 +01:00
Wouter Wijsman
64ea2da258 Add support for setting the output directory to create_pbp_file macro 2024-10-31 10:39:39 +01:00
Wouter Wijsman
6571d6ba5a Add add_prx_module macro to psp-cmake 2024-10-30 23:25:16 +01:00
Jon Daniel
dcc8e8c0c8 use $<TARGET_FILE_DIR> for RUNTIME_OUTPUT_DIRECTORY 2024-09-07 13:31:28 +02:00
Jon Daniel
be0b648a47 add RUNTIME_OUTPUT_DIRECTORY to CreatePBP.cmake 2024-09-06 19:46:29 +02:00
Kathrin De Cecco
051ff5dcd8 Add MUSIC_PATH option to CreatePBP.cmake 2024-07-03 15:00:56 +02:00
Daniel 'dbeef' Zalega
df07a6fa69 Replaced TARGET_FILE_DIR + TARGET_FILE_NAME with TARGET_FILE 2024-05-09 22:57:09 +02:00
Daniel 'dbeef' Zalega
6e802c7cfa Support for customized OUTPUT_NAME of a given target in create_pbp_file macro 2024-05-09 00:09:43 +02:00
Wouter Wijsman
265535a351 Revert "cmake/make: use -isystem for system libc headers"
This reverts commit 7c106675b3.
2024-04-16 09:20:58 +02:00
Wouter Wijsman
3da1b8e03a Revert "pspdev.cmake: don't use -isystem for C++, because CMake breaks include_next"
This reverts commit 26c756d7ca.
2024-04-16 09:20:53 +02:00
rofl0r
26c756d7ca pspdev.cmake: don't use -isystem for C++, because CMake breaks include_next
... by using -isystem instead of -I for all pkg-config-provided include dirs,
turning those effectively into system include dirs.
2024-04-01 09:58:52 +00:00
rofl0r
7c106675b3 cmake/make: use -isystem for system libc headers
using -isystem for the libc standard include directory is the only way
to make it the first candidate for #include <foo> path search, and to
suppress warnings when building 3rd party code including them.
2024-03-29 20:56:34 +00:00
rofl0r
fd52aecd82 pspdev.cmake: also default to FW 6.0 2024-03-13 06:39:00 +00:00
rofl0r
b9cbe7f1c3 build.mak: default to firmware 6.0
as discussed in #89, few structs have different layout depending on the
_PSP_FW_VERSION macro.

this makes a noticable (i.e. resulting in potential memory corruption)
difference only in few structs that are supposed to be used only by
kernel experts, but it makes it clear to non-experts that the struct
layouts they program for are the latest ones.

an expert trying to target an older firmware version, can still override
the macro on the commandline.

closes #89
2024-03-12 12:20:04 +00:00
Damián Parrino
a6a35bbbab Update CreatePBP.cmake
fix problem when creating PARAM.SFO with APP_VER
2024-02-25 19:24:48 -03:00
Damián Parrino
5458ff4b63 Update CreatePBP.cmake
Allow setting app version in PARAM.SFO
2024-02-17 12:18:46 -03:00
Crow-bar
0513fe7d02 pspdev.cmake: -G0 flag removed 2024-01-31 22:09:22 +03:00
Crow-bar
3422d3e397 build*.mak: -G0 flag removed 2024-01-31 16:00:24 +03:00
Wouter Wijsman
17b2541028 Do not optimize by default 2023-05-29 13:36:53 +02:00
Ian
f7da81f22b build.mak: Fix oversight with PSP_LARGE_MEMORY condition tree, clean changes
`MEMSIZE` would not be set as expected if `PSP_FW_VERSION` was set to `1` above firmware 3.90 and the warning was sent to the console. This is addressed.

I've also made the `MEMSIZE` field a make var (`EXPAND_MEMORY`) that gets set on/off in the tree and just gets used by `SFO` flags at the end of it, instead of setting them in multiple spaces.
2023-04-18 11:16:53 -04:00
Steam Deck User
e87d3fa804 build.mak: Improve and streamline .SFO creation
The current state of building .SFO binaries is rather primitive --
as it stood, build.mak forced its own flags to be used, always.
If you were building without PSP_LARGE_MEMORY, build.mak would use
a deprecated tool for generation as well, one that cobbles together
undocumented flags in an array of bytes and shoves it into a file.

The first change this commit makes is by enabling use of the "new"
mkfsoex, which creates a smaller but still bootable SFO without
any arguments given. Developers are now able to provide custom
SFO flags now using this, added via `SFOFLAGS` in their Makefile.

This means that developers can now (at their own discretion) provide
custom region information, parental control level, minimum firmware
boot level, etc. with:

```make
SFOFLAGS = -d REGION=16394 -d PARENTAL_LEVEL=4 -s PSP_SYSTEM_VER=4.01
```

As a side-effect, this also makes the SDK more adapted to new
custom firmware releases that may add new SFO flags.

The second change made is turning `PSP_LARGE_MEMORY` into an opt-out
/enabled by default flag if developers are targeting a firmware
version newer than 3.90. Custom firmware versions starting from
4.01 M33 guard against expanding the user memory partition to 52mB
if the unit detected is PSP-1000. Therefore having this check in
place becomes redundant, potentially complicating Makefiles. A
warning is printed out allowing developers to be aware of this fact
and removing the flag from their Makefile.
2023-04-14 10:55:00 -04:00
Gleb Mazovetskiy
18354f23b3 pspdev.cmake: Fix pkg-config support
`PKG_CONFIG_EXECUTABLE` must be a cache variable, otherwise only the first call to `find_program(PkgConfig)` succeeds.
2023-03-11 15:20:30 +00:00
Francisco Javier Trujillo Mata
8a0ab6b14e Adding pthreadglue support 2022-03-26 14:31:53 +01:00
David Guillen Fandos
fd8c305142 Use gcc-ar and gcc-ranlib wrappers
These wrappers use the --plugin flags to properly support LTO, other
than that it's a transparent change.
2022-03-22 21:49:43 +01:00
Wouter Wijsman
a51d8066da Clean up setting pkg-config executable
I found out the cache part wasn't needed.
2022-03-15 16:13:37 +01:00
Wouter Wijsman
560d558e30 Use psp-pkg-config for FindPkgConfig in CMake
This make it so that when using the following code:

```
include(FindPkgConfig)
pkg_search_module(SDL2 REQUIRED sdl2)
```

The variables ``${SDL2_INCLUDE_DIRS}`` and ``${SDL2_LIBRARIES}`` are set to the expected values within CMake.
2022-03-15 16:09:04 +01:00
Wouter Wijsman
745d5483a0 Allow setting ENC_PRX as argument
This make it a bit easier to deal, since encrypting a PRX makes it no longer work in psplink, but you might want to use it in an automated release.
2022-01-12 13:46:35 +01:00
Wouter Wijsman
34fb512ae2 Add comment to install prefix 2021-12-24 20:44:40 +01:00
Wouter Wijsman
1db6cd197e Fix inconsistant behaviour with install prefix
Somehow it was still sometimes not working. I have no idea why that was, but setting is to cache and path fixed it for me.
2021-12-24 20:42:43 +01:00
Wouter Wijsman
321cff4ee4 Set CMAKE_INSTALL_PREFIX correctly
CMAKE_TARGET_INSTALL_PREFIX isn't actually documented anywhere on the cmake website, so I guess that was a mistake. This change does not seem to cause warnings while building applications.
2021-12-23 20:35:34 +01:00
Wouter Wijsman
8911f4ea72 Add BUILD_PRX option to cmake 2021-12-15 23:37:18 +01:00
Wouter Wijsman
a94a5e4027 Don't make psp_artifacts directory
This makes it much easier to use psplink, since you'll no longer need to copy the prx into the build directory upon each build.
2021-12-15 23:23:01 +01:00
Francisco Javier Trujillo Mata
98b7d836ee Create specific modinfo library 2021-12-06 21:24:44 +01:00
Francisco Javier Trujillo Mata
e66eddd9b3 Add pspsdk to the standard libs 2021-12-04 14:22:35 +01:00
Wouter Wijsman
75085d4970 Also set PSP definition for gcc and cmake 2021-11-17 22:35:02 +01:00
Wouter Wijsman
074a740bce Add CreatePBP.cmake and add some variables relied on by software 2021-11-17 15:45:44 +01:00
Francisco Javier Trujillo Mata
6e80c9bd29 Add the cmake toolchain file to the base sdk and psp share dir to variables 2021-11-15 15:25:02 +01:00
Francisco Javier Trujillo Mata
514f7947d7 Improve base makefiles to be used with the new POSIX and standard environment 2021-11-15 15:25:02 +01:00
Carsten Teibes
7c6e46b487 Remove outdated svn ids, change url, fix permissions
Convert to unix line endings
2020-05-08 00:50:41 +02:00
Jessica Stokes
7cb699f0b8 Remove the -mno-crt0 flag from build_prx.mak
`-mno-crt0` does not exist in current versions of psp-gcc installed by the toolchain, and `-nostartfiles` appears to be equivalent.
2018-08-17 21:42:01 -07:00
Sam Hegarty
467e14b708 remove fake-sign section from build.mak for "pure" elf type executable 2011-12-13 15:22:20 +13:00
Sam Hegarty
581fe4b853 add PrxEncrypter to tools 2011-12-07 04:39:59 +13:00
Sam Hegarty
b9c1b53f0e Allow for psp-fixup-imports to be disabled 2011-08-13 11:36:29 +12:00
Sam Hegarty
62459981b4 Allow for prevention of psp-fixup-imports.
- means export only modules can be built by adding NO_FIXUP_IMPORTS=1
2011-08-13 11:30:36 +12:00
Dan Peori
8a3bef9012 first commit 2010-10-18 12:54:49 -03:00