Skip to content

Commit

Permalink
Include sdk subprojects as wraps
Browse files Browse the repository at this point in the history
  • Loading branch information
Nomura-RH committed Sep 2, 2023
1 parent 3148318 commit c3ca2b5
Show file tree
Hide file tree
Showing 1,316 changed files with 137 additions and 305,525 deletions.
2 changes: 1 addition & 1 deletion config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ elif is_wsl_accessing_windows; then
fi

# Launch meson
"${MESON:-meson}" setup --native-file=meson/"$native_file" --native-file="$build/root.ini" --cross-file=meson/"$cross_file" --cross-file="$build/root.ini" "$@" -- "$build"
"${MESON:-meson}" setup --wrap-mode=nopromote --native-file=meson/"$native_file" --native-file="$build/root.ini" --cross-file=meson/"$cross_file" --cross-file="$build/root.ini" "$@" -- "$build"
85 changes: 59 additions & 26 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public_includes = include_directories('include', 'asm')
c_args = [
'-O4,p',
'-proc', 'arm946e',
'-thumb',
'-enum', 'int',
'-lang', 'c99',
'-Cpp_exceptions', 'off',
Expand All @@ -35,6 +34,11 @@ c_args = [
'-stdinc'
]

add_global_arguments(c_args,
language: 'c',
native: false
)

pokeplatinum_args = [
'-DPM_KEEP_ASSERTS',
'-DGAME_VERSION=PLATINUM',
Expand Down Expand Up @@ -68,23 +72,45 @@ subdir('tools')


############################################################
### SPEC FILES ###
### DEPENDENCIES ###
############################################################
subdir('platinum.us')
nitrosdk_dep = dependency('NitroSDK',
default_options: {
'mwrap_ver': '2.0/sp1p2',
'sp1p3_conditionals': true
}
)

nitrosystem_dep = dependency('NitroSystem',
default_options: {
'mwrap_ver': '2.0/sp2'
}
)

nitrowifi_dep = dependency('NitroWiFi',
default_options: {
'mwrap_ver': '2.0/sp1p2',
'sp1p3_conditionals': true
}
)

nitrodwc_dep = dependency('NitroDWC',
default_options: {
'mwrap_ver': '2.0/sp2p2',
'link_ppwlobby': true
}
)

libvct_dep = dependency('libvct')
libcrypto_dep = dependency('libcrypto')
libsyscall_dep = dependency('libsyscall')
ppwlobby_dep = dependency('ppwlobby')


############################################################
### DEPENDENCIES ###
### SPEC FILES ###
############################################################
gamespy_dep = dependency('gamespy', fallback : ['gamespy', 'gamespy_dep'])
libvct_dep = dependency('libVCT', fallback : ['libVCT', 'libvct_dep'])
nitrosdk_dep = dependency('NitroSDK', fallback : ['NitroSDK', 'nitrosdk_dep'])
nitrosystem_dep = dependency('NitroSystem', fallback : ['NitroSystem', 'nitrosystem_dep'])
nitrowifi_dep = dependency('NitroWiFi', fallback : ['NitroWiFi', 'nitrowifi_dep'])
nitrodwc_dep = dependency('NitroDWC', fallback : ['NitroDWC', 'nitrodwc_dep'])
libcrypto_dep = dependency('libcrypto', fallback : ['libcrypto', 'libcrypto_dep'])
libsyscall_dep = dependency('libsyscall', fallback : ['libsyscall', 'libsyscall_dep'])
ppwlobby_dep = dependency('ppwlobby', fallback : ['ppwlobby', 'ppwlobby_dep'])
subdir('platinum.us')


############################################################
Expand All @@ -94,21 +120,19 @@ subdir('lib')


############################################################
### GAME SOURCES ###
### ARM9 BINARY ###
############################################################
subdir('src')
subdir('asm')


# Build main executable
main = executable('main',
sources: [
pokeplatinum_c,
pokeplatinum_asm
],
c_args: [
c_args,
pokeplatinum_args
pokeplatinum_args,
'-thumb'
],
nasm_args: asm_args,
c_pch: 'include/pch/global_pch.h',
Expand All @@ -118,14 +142,13 @@ main = executable('main',
libspl_public_includes
],
dependencies: [
gamespy_dep,
libvct_dep,
nitrosdk_dep,
nitrosystem_dep,
nitrowifi_dep,
nitrodwc_dep,
libsyscall_dep,
libvct_dep,
libcrypto_dep,
libsyscall_dep,
ppwlobby_dep
],
link_with: [
Expand All @@ -150,8 +173,11 @@ subdir('res')
############################################################
### ARM7 BINARIES ###
############################################################
ichneumon_sub = subproject('NitroSDK').get_variable('ichneumon_sub')
ichneumon_sub_defs = subproject('NitroSDK').get_variable('ichneumon_sub_defs')
ichneumon_sub = subproject('NitroSDK'
).get_variable('ichneumon_sub')

ichneumon_sub_defs = subproject('NitroSDK'
).get_variable('ichneumon_sub_defs')


############################################################
Expand Down Expand Up @@ -186,7 +212,7 @@ pokeplatinum_nds = custom_target('pokeplatinum.us.nds',
'@OUTPUT0@',
'@OUTPUT1@'
],
build_by_default : true
build_by_default: true
)


Expand All @@ -195,8 +221,15 @@ pokeplatinum_nds = custom_target('pokeplatinum.us.nds',
############################################################
sha1sum = find_program('sha1sum', native: true)

test('SBIN Checksums', sha1sum, args: ['-c', '--quiet', sbins_sha1])
test('ROM Checksum', sha1sum, args: ['-c', '--quiet', rom_sha1])
test('SBIN Checksums',
sha1sum,
args: ['-c', '--quiet', sbins_sha1]
)

test('ROM Checksum',
sha1sum,
args: ['-c', '--quiet', rom_sha1]
)


############################################################
Expand Down
9 changes: 9 additions & 0 deletions subprojects/NitroDWC.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[wrap-git]
url = https://github.com/Nomura-RH/NitroDWC.git
revision = head
depth = 1
directory = NitroDWC-2.2.30008
patch_directory = NitroDWC_patch

[provide]
dependency_names = NitroDWC
60 changes: 0 additions & 60 deletions subprojects/NitroDWC/include/ac/dwc_ac.h

This file was deleted.

55 changes: 0 additions & 55 deletions subprojects/NitroDWC/include/auth/dwc_auth.h

This file was deleted.

102 changes: 0 additions & 102 deletions subprojects/NitroDWC/include/auth/dwc_http.h

This file was deleted.

Loading

0 comments on commit c3ca2b5

Please sign in to comment.