Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
desubprojectify
Browse files Browse the repository at this point in the history
  • Loading branch information
LunarLambda committed Nov 12, 2022
1 parent fa1631c commit b9c43bf
Show file tree
Hide file tree
Showing 113 changed files with 24 additions and 29 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Requires

- meson >=0.56.0
- meson >=0.60.0
- arm-none-eabi toolchain (gcc, binutils, newlib)
- native C compiler

Expand Down
14 changes: 8 additions & 6 deletions dist.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
#!/bin/sh

DIST=$PWD/dist

(
PROJECT=libseven
VERSION=0.7.1
cd subprojects/$PROJECT
git archive -o ../../dist/$PROJECT-$VERSION.zip --prefix=$PROJECT-$VERSION/ HEAD .
cd ../../dist
cd $PROJECT
git archive -o $DIST/$PROJECT-$VERSION.zip --prefix=$PROJECT-$VERSION/ HEAD .
cd $DIST
sha256sum -b $PROJECT-$VERSION.zip > $PROJECT-$VERSION.zip.sha256sum
)

(
PROJECT=minrt
VERSION=0.2.0
cd subprojects/$PROJECT
git archive -o ../../dist/$PROJECT-$VERSION.zip --prefix=$PROJECT-$VERSION/ HEAD .
cd ../../dist
cd $PROJECT
git archive -o $DIST/dist/$PROJECT-$VERSION.zip --prefix=$PROJECT-$VERSION/ HEAD .
cd $DIST
sha256sum -b $PROJECT-$VERSION.zip > $PROJECT-$VERSION.zip.sha256sum
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 3 additions & 9 deletions subprojects/libseven/meson.build → libseven/meson.build
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
project('libseven', 'c',
version: '0.7.1',
license: 'MPL-2.0',
default_options: ['warning_level=2', 'c_std=c99'])

sources = [
'src/hw/dma.s',
'src/hw/input.s',
Expand All @@ -26,12 +21,11 @@ includes = ['include']
libseven = static_library(
'seven',
sources,
include_directories: includes + 'src',
c_args: ['-mthumb', '-ffunction-sections', '-fdata-sections'])

include_directories: includes + 'src')

libseven_dep = declare_dependency(
include_directories: includes,
link_with: libseven)
link_with: libseven,
version: '0.7.1')

meson.override_dependency('libseven', libseven_dep)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 5 additions & 4 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
project('sdk-seven', 'c',
version: '0.2.0',
version: '0.3.0',
license: 'Zlib',
meson_version: '>=0.56.0')
meson_version: '>=0.60.0',
default_options: ['warning_level=2', 'c_std=c99'])

add_project_arguments(
'-mthumb',
Expand All @@ -25,8 +26,8 @@ if cc.has_argument('-specs=nano.specs')
language: 'c')
endif

subproject('libseven')
subproject('minrt')
subdir('libseven')
subdir('minrt')

subdir('tools')

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 7 additions & 9 deletions subprojects/minrt/meson.build → minrt/meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
project('minrt', 'c',
version: '0.2.0',
license: 'MPL-2.0',
default_options: ['warning_level=2', 'c_std=c99'])
version = '0.2.0'

sources = [
'src/gba/rom_header.s',
Expand All @@ -11,25 +8,26 @@ sources = [

includes = ['include']

lib = meson.project_source_root() / 'lib'
lib = meson.current_source_dir() / 'lib'

link_args = ['-specs=' + lib / 'nocrt0.specs', '-L' + lib / 'ldscripts']

minrt = static_library(
'minrt',
sources,
include_directories: includes + 'src' + 'src/gba',
c_args: ['-mthumb', '-ffunction-sections', '-fdata-sections'])
include_directories: includes + 'src' + 'src/gba')

minrt_dep = declare_dependency(
include_directories: includes,
link_with: minrt,
link_args: link_args + '-Trom.ld')
link_args: link_args + '-Trom.ld',
version: version)

minrt_mb_dep = declare_dependency(
include_directories: includes,
link_with: minrt,
link_args: link_args + '-Tmultiboot.ld')
link_args: link_args + '-Tmultiboot.ld',
version: version)

meson.override_dependency('minrt', minrt_dep)
meson.override_dependency('minrt-multiboot', minrt_mb_dep)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit b9c43bf

Please sign in to comment.