Add pipes to shell, add wc

This commit is contained in:
2026-07-16 21:39:00 +03:00
parent 4ad32dda17
commit 85cfbb2050
17 changed files with 293 additions and 63 deletions
+39
View File
@@ -427,3 +427,42 @@ custom_target(
command: ['objcopy', '-O', 'binary', '@INPUT@', '@OUTPUT@'],
build_by_default: true,
)
wc_start = custom_target(
'wc_start',
input: 'src/user/start.asm',
output: 'wc_start.o',
command: [nasm, '-f', 'elf64', '-o', '@OUTPUT@', '@INPUT@'],
)
wc_syscall = custom_target(
'wc_syscall',
input: 'src/user/syscall.asm',
output: 'wc_syscall.o',
command: [nasm, '-f', 'elf64', '-o', '@OUTPUT@', '@INPUT@'],
)
wc_elf = executable(
'wc.elf',
sources: [wc_start, wc_syscall, lib_sources, 'src/user/app/wc/wc.c'],
c_args: [
'-ffreestanding',
'-nostdlib',
'-fno-stack-protector',
'-mcmodel=large',
'-DVERSION="' + meson.project_version() + '"',
],
link_args: [
'-T', meson.project_source_root() / 'src/user/linker.ld',
'-nostdlib',
],
link_depends: 'src/user/linker.ld',
)
custom_target(
'wc',
input: wc_elf,
output: 'wc',
command: ['objcopy', '-O', 'binary', '@INPUT@', '@OUTPUT@'],
build_by_default: true,
)