Подготовить автономную сборку и запуск перед разделением проектов
This commit is contained in:
@@ -14,10 +14,11 @@
|
||||
# - libc/include/ : public headers
|
||||
# - libc/{io,stdio,mem,gfx}/ : libc sources (assembled into sprinter.lib)
|
||||
# - lib/Makefile + lib/sprinter.lib : prebuilt library + recipe to rebuild
|
||||
# - examples/ : 27 ready-to-build programs
|
||||
# - app.mk + disk/run tools : standalone application integration
|
||||
# - libbgi/ + lib/bgi256*.lib : graphics library
|
||||
# - third_party/sdcc/ : vendored SDCC 4.5
|
||||
# - release_docs/ → docs/ : user-facing documentation
|
||||
# - examples.mk-style root Makefile, README, RELEASE_NOTES, LICENSE
|
||||
# - root Makefile, README, RELEASE_NOTES, LICENSE
|
||||
#
|
||||
# NOT included (developer-only):
|
||||
# - docs/ (research notes, original PetersPlus reference material)
|
||||
@@ -50,22 +51,30 @@ mkdir -p "$STAGE"
|
||||
# --- WHITELIST: only these directories/files end up in the tarball ---
|
||||
|
||||
# Top-level metadata
|
||||
cp README.md RELEASE_NOTES.md LICENSE Makefile "$STAGE/"
|
||||
cp README.md RELEASE_NOTES.md LICENSE Makefile app.mk "$STAGE/"
|
||||
|
||||
# Toolchain
|
||||
cp -R bin runtime libc examples "$STAGE/"
|
||||
# toolchain/ — only mkexe (prebuilt + sources) and check_banks.py
|
||||
cp -R bin runtime libc libbgi "$STAGE/"
|
||||
# Core tools and source debugger backend needed by sprinter-cc/app.mk.
|
||||
mkdir -p "$STAGE/toolchain/mkexe"
|
||||
cp toolchain/mkexe/mkexe "$STAGE/toolchain/mkexe/"
|
||||
cp toolchain/mkexe/mkexe.c "$STAGE/toolchain/mkexe/"
|
||||
cp toolchain/mkexe/Makefile "$STAGE/toolchain/mkexe/"
|
||||
[[ -f toolchain/mkexe/check.sh ]] && cp toolchain/mkexe/check.sh "$STAGE/toolchain/mkexe/"
|
||||
cp toolchain/check_banks.py "$STAGE/toolchain/"
|
||||
cp toolchain/check_bank_calls.py toolchain/check_w0_isr.py \
|
||||
toolchain/sdbg_build.py toolchain/sdbg_driver.py toolchain/sdbg_dap.py \
|
||||
toolchain/sdbg_launcher.py toolchain/mame_interactive.py \
|
||||
toolchain/mame_profile.py toolchain/make_disk.py \
|
||||
toolchain/make_hdd.sh toolchain/run_sprinter_mame.py "$STAGE/toolchain/"
|
||||
cp -R toolchain/sdbg "$STAGE/toolchain/"
|
||||
cp -R toolchain/mcp "$STAGE/toolchain/"
|
||||
|
||||
# Lib — keep Makefile and the prebuilt archive only; sources are in libc/
|
||||
mkdir -p "$STAGE/lib"
|
||||
cp lib/Makefile "$STAGE/lib/"
|
||||
cp lib/sprinter.lib "$STAGE/lib/"
|
||||
cp lib/sprinter_safe.lib lib/bgi256.lib lib/bgi256_safe.lib "$STAGE/lib/"
|
||||
|
||||
# Vendored SDCC — follow symlinks so the real content lands in the tarball
|
||||
mkdir -p "$STAGE/third_party"
|
||||
@@ -77,7 +86,7 @@ mkdir -p "$STAGE/third_party"
|
||||
# NOT shipped.
|
||||
[[ -d release_docs ]] && cp -R release_docs "$STAGE/docs"
|
||||
|
||||
# --- Strip build artefacts that crept in via examples/ ---
|
||||
# --- Strip build artefacts that crept in via sources ---
|
||||
echo ">> stripping build artefacts and macOS metadata"
|
||||
find "$STAGE" \( \
|
||||
-name '.sprinter-cc-*' -o \
|
||||
@@ -105,4 +114,5 @@ echo "Try it:"
|
||||
echo " tar xzf $(basename "$TARBALL")"
|
||||
echo " cd $NAME"
|
||||
echo " make all"
|
||||
echo " bin/sprinter-cc -o hello.exe examples/hello/hello.c"
|
||||
echo " bin/sprinter-cc -o hello.exe hello.c"
|
||||
echo " Examples are released as a separate repository"
|
||||
|
||||
Reference in New Issue
Block a user