reduce shop

This commit is contained in:
2025-12-08 19:50:09 -06:00
parent 38d6b4d4e8
commit 5c5427fdd9
9 changed files with 229 additions and 297 deletions

View File

@@ -52,34 +52,33 @@ src += [ # core
src += ['scheduler.c']
scripts = [
'nota.c',
'js.c',
'internal/nota.c',
'debug/js.c',
'qop.c',
'wildstar.c',
'fit.c',
'crypto.c',
'text.c',
'internal/text.c',
'utf8.c',
'kim.c',
'internal/kim.c',
'time.c',
'nota.c',
'debug.c',
'os.c',
'internal/nota.c',
'debug/debug.c',
'internal/os.c',
'fd.c',
'http.c',
'enet.c',
'net/http.c',
'net/enet.c',
'wildstar.c',
'miniz.c',
'json.c'
'archive/miniz.c',
'internal/json.c'
]
foreach file: scripts
full_path = join_paths('scripts', file)
sources += files(full_path)
sources += files(file)
endforeach
srceng = 'source'
includes = [srceng]
includes = [srceng, 'internal', 'debug', 'net', 'archive']
foreach file : src
full_path = join_paths(srceng, file)
@@ -99,7 +98,6 @@ else
link += '-Wl,-export_dynamic'
endif
cell_so = shared_library(
'cell_runtime',
sources,
@@ -108,14 +106,6 @@ cell_so = shared_library(
install : true,
)
# Create core.zip from scripts folder
qop_target = custom_target('core.qop',
output: 'core.qop',
command: ['sh', '-c', ' qopconv -d ' + meson.project_source_root() / 'scripts . core.qop'],
build_by_default: true,
build_always_stale: true
)
# Determine RPATH based on OS
# MacOS uses @loader_path, Linux uses $ORIGIN
# We include both the current directory (for build) and ../lib (for install)
@@ -127,28 +117,14 @@ elif host_machine.system() == 'linux'
endif
# Create main executable linked against the cell library
cell_exe = executable('cell_exe',
cell_exe = executable('cell',
'source/main.c',
dependencies: deps,
include_directories: includers,
link_with: cell_so,
link_args: link,
build_rpath: ':'.join(rpath_dirs),
install: false
)
# Create final cell executable by appending core.zip to cell_exe
cell = custom_target('cell',
input: [cell_exe, qop_target],
output: 'cell' + exe_ext,
command: [
'sh', '-c',
'cp "$1" "$3" && cat "$2" >> "$3" && chmod +x "$3"',
'cell-cat', '@INPUT0@', '@INPUT1@', '@OUTPUT@'
],
build_by_default: true,
install: true,
install_dir: get_option('bindir')
install: true
)
# Install headers for building dynamic libraries using Cell