cleanup
This commit is contained in:
+12
-7
@@ -2,7 +2,7 @@ project(
|
||||
'zinnia',
|
||||
license: 'ISC',
|
||||
version: '0.1.0',
|
||||
meson_version: '>=1.3.0',
|
||||
meson_version: '>=1.5.0',
|
||||
default_options: [
|
||||
'c_std=gnu23',
|
||||
'werror=true',
|
||||
@@ -18,7 +18,7 @@ if get_option('headers_only')
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
add_languages('c', native: false)
|
||||
add_languages('c', native: false, required: true)
|
||||
|
||||
# Check if we're using a sane compiler.
|
||||
c_compiler = meson.get_compiler('c')
|
||||
@@ -77,7 +77,7 @@ foreach k, v : kconfig
|
||||
endif
|
||||
endforeach
|
||||
|
||||
kernel_c_args = []
|
||||
kernel_c_args = ['-DIN_KERNEL']
|
||||
|
||||
kernel_lds = meson.current_source_dir() / 'boot' / 'kernel.ld'
|
||||
kernel_link_args = [
|
||||
@@ -91,10 +91,11 @@ kernel_includes = []
|
||||
kernel_sources = []
|
||||
modules = {}
|
||||
|
||||
# Goes first so we can add arch-specific flags to drivers.
|
||||
# These dirs go first so we can add arch-specific flags to drivers.
|
||||
subdir('arch' / target_machine.cpu_family())
|
||||
subdir('boot')
|
||||
subdir('core')
|
||||
subdir('syscalls')
|
||||
|
||||
# Device and file system drivers.
|
||||
subdir('dev')
|
||||
@@ -141,7 +142,11 @@ foreach name, v : modules
|
||||
kernel_link_args += mod_link_args
|
||||
endif
|
||||
|
||||
mod_summary += {name: is_modular}
|
||||
if is_modular
|
||||
mod_summary += {name: 'mod'}
|
||||
else
|
||||
mod_summary += {name: 'builtin'}
|
||||
endif
|
||||
endforeach
|
||||
|
||||
# Kernel
|
||||
@@ -151,7 +156,7 @@ executable(
|
||||
common_includes,
|
||||
kernel_includes,
|
||||
],
|
||||
c_args: ['-DIN_KERNEL', kernel_c_args],
|
||||
c_args: [kernel_c_args],
|
||||
link_args: kernel_link_args,
|
||||
link_depends: kernel_lds,
|
||||
sources: kernel_sources,
|
||||
@@ -161,5 +166,5 @@ executable(
|
||||
)
|
||||
|
||||
# Print a summary
|
||||
summary(mod_summary, bool_yn: true, section: 'Driver configuration')
|
||||
summary(mod_summary, section: 'Driver configuration')
|
||||
summary(kconfig, bool_yn: true, section: 'Kernel configuration')
|
||||
|
||||
Reference in New Issue
Block a user