524 lines
19 KiB
Makefile
524 lines
19 KiB
Makefile
# Nuke built-in rules and variables.
|
|
MAKEFLAGS += -rR
|
|
.SUFFIXES:
|
|
|
|
# Target architecture.
|
|
ARCH := x86_64
|
|
|
|
# Auto-detect cross compiler from toolchain/local/.
|
|
TOOLCHAIN_PREFIX := $(shell cd .. && pwd)/toolchain/local/bin/x86_64-montauk-
|
|
ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),)
|
|
CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first)
|
|
CC = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first)
|
|
else
|
|
CXX := $(TOOLCHAIN_PREFIX)g++
|
|
CC := $(TOOLCHAIN_PREFIX)gcc
|
|
endif
|
|
|
|
# Compiler flags. The x86_64-montauk toolchain supplies the target ABI
|
|
# (static ET_EXEC, 4 KiB pages, no red zone) and header paths; system
|
|
# programs additionally avoid FP/SIMD and their own runtime (-nostdlib).
|
|
override CXXFLAGS := \
|
|
-std=gnu++20 \
|
|
-g -O2 -pipe \
|
|
-Wall \
|
|
-Wextra \
|
|
-ffreestanding \
|
|
-fno-stack-protector \
|
|
-fno-stack-check \
|
|
-fno-rtti \
|
|
-fno-exceptions \
|
|
-ffunction-sections \
|
|
-fdata-sections \
|
|
-mno-80387 \
|
|
-mno-mmx \
|
|
-mno-sse \
|
|
-mno-sse2 \
|
|
-I include
|
|
|
|
# Linker flags: freestanding static ELF.
|
|
override LDFLAGS := \
|
|
-nostdlib \
|
|
-Wl,--gc-sections \
|
|
-T link.ld
|
|
|
|
# Output directory.
|
|
BINDIR := bin
|
|
|
|
# Discover all programs (each subdirectory under src/ is a program).
|
|
PROGRAMS := $(notdir $(wildcard src/*))
|
|
|
|
# Programs with custom Makefiles (built separately).
|
|
CUSTOM_BUILDS := 2048 fetch wiki wikipedia weather imageviewer fontpreview spreadsheet wordprocessor pdfviewer disks devexplorer installer audio music video bluetooth network display keyboard sshserver terminal syslog procmgr powermgr calculator charmap desktop login shell paint tcc lua screenshot texteditor mandelbrot printers timezone printd printctl dialogs libloader crashpad sshd rtlsdr sdr
|
|
SYSTEM_PROGRAMS := $(filter-out $(CUSTOM_BUILDS),$(PROGRAMS))
|
|
|
|
# Build targets: system programs go to bin/os/, apps go to bin/apps/<name>/.
|
|
TARGETS := $(addprefix $(BINDIR)/os/,$(addsuffix .elf,$(SYSTEM_PROGRAMS)))
|
|
|
|
# Man pages source directory.
|
|
MANDIR := man
|
|
MANSRC := $(wildcard $(MANDIR)/*.*)
|
|
MANDST := $(patsubst $(MANDIR)/%,$(BINDIR)/man/%,$(MANSRC))
|
|
|
|
# Web content source directory.
|
|
WWWDIR := www
|
|
WWWSRC := $(wildcard $(WWWDIR)/*.*)
|
|
WWWDST := $(patsubst $(WWWDIR)/%,$(BINDIR)/www/%,$(WWWSRC))
|
|
|
|
# CA certificate bundle.
|
|
CA_CERTS := $(BINDIR)/os/certs/ca-certificates.crt
|
|
|
|
# Device firmware blobs (e.g. Intel Bluetooth ibt-*.sfi/.ddc) bundled into
|
|
# bin/os/firmware/ so the kernel can load them from the ramdisk at runtime.
|
|
FWDIR := data/firmware
|
|
FWSRC := $(shell find $(FWDIR) -type f 2>/dev/null)
|
|
FWDST := $(patsubst $(FWDIR)/%,$(BINDIR)/os/firmware/%,$(FWSRC))
|
|
|
|
# System config TOML files bundled into bin/config/.
|
|
CONFIGDIR := data/config
|
|
CONFIGSRC := $(wildcard $(CONFIGDIR)/*.toml)
|
|
CONFIGDST := $(patsubst $(CONFIGDIR)/%,$(BINDIR)/config/%,$(CONFIGSRC))
|
|
|
|
# Read-only OS data tables bundled into bin/os/data/. These are reference
|
|
# tables that ship with the OS (keyboard layouts, time zones), not config:
|
|
# nothing writes them back, so they belong under os/ rather than config/.
|
|
OSDATADIR := data/osdata
|
|
OSDATASRC := $(wildcard $(OSDATADIR)/*.toml)
|
|
OSDATADST := $(patsubst $(OSDATADIR)/%,$(BINDIR)/os/data/%,$(OSDATASRC))
|
|
|
|
# Third-party license texts and notices bundled into bin/os/licenses/.
|
|
LICDIR := data/licenses
|
|
LICSRC := $(wildcard $(LICDIR)/*.txt)
|
|
LICDST := $(patsubst $(LICDIR)/%,$(BINDIR)/os/licenses/%,$(LICSRC))
|
|
|
|
# Wallpapers bundled into bin/os/wallpapers/.
|
|
WPDIR := data/wallpapers
|
|
WPSRC := $(wildcard $(WPDIR)/*.jpg)
|
|
WPDST := $(patsubst $(WPDIR)/%,$(BINDIR)/os/wallpapers/%,$(WPSRC))
|
|
|
|
.PHONY: all clean 2048 fetch wiki wikipedia weather imageviewer fontpreview spreadsheet wordprocessor pdfviewer disks devexplorer installer audio music video bluetooth network display keyboard sshserver sshd terminal syslog procmgr powermgr calculator charmap login desktop shell paint tcc lua screenshot texteditor mandelbrot printers timezone printd printctl dialogs icons fonts configs osdata bearssl libc tls libjpeg libjpegwrite install-apps libloader crashpad rtlsdr sdr check-syscalls gen-syscalls
|
|
|
|
all: bearssl libc libjpeg libjpegwrite tls libloader rtlsdr sdr devkit $(TARGETS) fetch wiki wikipedia weather imageviewer fontpreview spreadsheet wordprocessor pdfviewer disks devexplorer installer audio music video bluetooth network display sshserver terminal syslog procmgr powermgr calculator charmap 2048 paint tcc lua screenshot texteditor mandelbrot printers timezone printd printctl dialogs login desktop shell sshd icons fonts install-apps crashpad $(MANDST) $(WWWDST) $(CA_CERTS) $(CONFIGDST) $(OSDATADST) $(FWDST) $(LICDST) $(WPDST)
|
|
|
|
# Build BearSSL static library (cross-compiled for freestanding x86_64).
|
|
BEARSSL_INCLUDES := -isystem $(shell cd .. && pwd)/kernel/freestnd-c-hdrs/x86_64/include -isystem $(abspath include/libc)
|
|
|
|
lib/bearssl/build/libbearssl.a:
|
|
$(MAKE) -C lib/bearssl CONF=MontaukOS \
|
|
BEARSSL_CC="$(CC)" \
|
|
BEARSSL_AR="$(TOOLCHAIN_PREFIX)ar" \
|
|
BEARSSL_INCLUDES="$(BEARSSL_INCLUDES)"
|
|
|
|
bearssl: lib/bearssl/build/libbearssl.a
|
|
|
|
# Build shared libc static library.
|
|
#
|
|
# The archives and CRT objects get a real file rule, not just the `libc`
|
|
# phony, so that programs can list them as prerequisites and actually relink
|
|
# when libc changes. A phony prerequisite would instead make every program
|
|
# permanently out of date; no prerequisite at all (the old state) both races
|
|
# under -j and silently leaves programs linked against a stale libc.
|
|
# Grouped target (&:, GNU make 4.3+): one sub-make produces all of them.
|
|
LIBC_DIR := lib/libc
|
|
LIBC_LIB := $(LIBC_DIR)/liblibc.a
|
|
LIBC_SRCS := $(wildcard $(LIBC_DIR)/*.c $(LIBC_DIR)/*.h $(LIBC_DIR)/*.S \
|
|
$(LIBC_DIR)/crt/*.c) $(LIBC_DIR)/Makefile
|
|
LIBC_OUTPUTS := $(LIBC_LIB) $(LIBC_DIR)/liblibc-full.a \
|
|
$(LIBC_DIR)/crt1.o $(LIBC_DIR)/crti.o $(LIBC_DIR)/crtn.o
|
|
|
|
$(LIBC_OUTPUTS) &: $(LIBC_SRCS)
|
|
$(MAKE) -C $(LIBC_DIR)
|
|
|
|
libc: $(LIBC_OUTPUTS)
|
|
|
|
# Build shared TLS helper library.
|
|
tls: bearssl libc
|
|
$(MAKE) -C lib/tls
|
|
|
|
# Build the shared-library loader used by runtime GUI components.
|
|
libloader: libc
|
|
$(MAKE) -C src/libloader
|
|
|
|
rtlsdr: libc
|
|
$(MAKE) -C src/rtlsdr
|
|
|
|
sdr: libc libloader rtlsdr
|
|
$(MAKE) -C src/sdr
|
|
|
|
# Build fetch via its own Makefile (depends on bearssl, libc, and tls).
|
|
fetch: bearssl libc tls
|
|
$(MAKE) -C src/fetch
|
|
|
|
# Build wiki via its own Makefile (depends on bearssl, libc, and tls).
|
|
wiki: bearssl libc tls
|
|
$(MAKE) -C src/wiki
|
|
|
|
# Build wikipedia standalone GUI client (depends on bearssl, libc, and tls).
|
|
wikipedia: bearssl libc tls
|
|
$(MAKE) -C src/wikipedia
|
|
|
|
# Build weather standalone GUI client (depends on bearssl, libc, and tls).
|
|
weather: bearssl libc tls
|
|
$(MAKE) -C src/weather
|
|
|
|
# Build libjpeg static library (JPEG decoding via stb_image).
|
|
libjpeg: libc
|
|
$(MAKE) -C lib/libjpeg
|
|
|
|
# Build libjpegwrite static library (JPEG encoding via stb_image_write).
|
|
libjpegwrite: libc
|
|
$(MAKE) -C lib/libjpegwrite
|
|
|
|
# Build imageviewer standalone GUI client (depends on libc and libjpeg).
|
|
imageviewer: libc libjpeg
|
|
$(MAKE) -C src/imageviewer
|
|
|
|
# Build fontpreview standalone GUI client (links libc).
|
|
fontpreview: libc
|
|
$(MAKE) -C src/fontpreview
|
|
|
|
# Build spreadsheet standalone GUI client (depends on libc and libdialogs).
|
|
spreadsheet: libc libloader dialogs
|
|
$(MAKE) -C src/spreadsheet
|
|
|
|
# Build word processor standalone GUI client (depends on libc and libdialogs).
|
|
wordprocessor: libc libloader dialogs
|
|
$(MAKE) -C src/wordprocessor
|
|
|
|
# Build PDF viewer standalone GUI client (depends on libc and libdialogs).
|
|
pdfviewer: libc libjpeg libloader dialogs
|
|
$(MAKE) -C src/pdfviewer
|
|
|
|
# Build disks standalone GUI tool (depends on libc).
|
|
disks: libc
|
|
$(MAKE) -C src/disks
|
|
|
|
# Build devexplorer standalone GUI tool (depends on libc).
|
|
devexplorer: libc
|
|
$(MAKE) -C src/devexplorer
|
|
|
|
# Build installer standalone GUI tool (depends on libc).
|
|
installer: libc
|
|
$(MAKE) -C src/installer
|
|
|
|
# Build audio control standalone GUI tool (depends on libc).
|
|
audio: libc
|
|
$(MAKE) -C src/audio
|
|
|
|
# Build music player standalone GUI tool (depends on libc).
|
|
music: libc
|
|
$(MAKE) -C src/music
|
|
|
|
# Build videos standalone GUI tool (depends on libc).
|
|
video: libc
|
|
$(MAKE) -C src/video
|
|
|
|
# Build bluetooth manager standalone GUI tool (depends on libc).
|
|
bluetooth: libc
|
|
$(MAKE) -C src/bluetooth
|
|
|
|
# Build network manager standalone GUI tool (depends on libc).
|
|
network: libc
|
|
$(MAKE) -C src/network
|
|
|
|
# Build display/graphics settings applet (depends on libc).
|
|
display: libc
|
|
$(MAKE) -C src/display
|
|
|
|
# Build keyboard layout settings applet (depends on libc).
|
|
keyboard: libc
|
|
$(MAKE) -C src/keyboard
|
|
|
|
# Build SSH Server settings applet.
|
|
sshserver: bearssl libc
|
|
$(MAKE) -C src/sshserver
|
|
|
|
# Build the SSH daemon.
|
|
sshd: bearssl libc
|
|
$(MAKE) -C src/sshd
|
|
|
|
# Build terminal standalone GUI tool (depends on libc).
|
|
terminal: libc
|
|
$(MAKE) -C src/terminal
|
|
|
|
# Build kernel log standalone GUI tool (depends on libc).
|
|
syslog: libc
|
|
$(MAKE) -C src/syslog
|
|
|
|
# Build process manager standalone GUI tool (depends on libc).
|
|
procmgr: libc
|
|
$(MAKE) -C src/procmgr
|
|
|
|
# Build power manager standalone GUI tool (depends on libc).
|
|
powermgr: libc
|
|
$(MAKE) -C src/powermgr
|
|
|
|
# Build calculator standalone GUI tool (depends on libc).
|
|
calculator: libc
|
|
$(MAKE) -C src/calculator
|
|
|
|
# Build character map standalone GUI tool (depends on libc).
|
|
charmap: libc
|
|
$(MAKE) -C src/charmap
|
|
|
|
# Build printers standalone GUI tool (depends on libc, bearssl, and tls).
|
|
printers: bearssl libc tls
|
|
$(MAKE) -C src/printers
|
|
|
|
# Build Time standalone GUI tool (depends on libc).
|
|
timezone: libc
|
|
$(MAKE) -C src/timezone
|
|
|
|
# Build login screen via its own Makefile (depends on bearssl and libc).
|
|
login: bearssl libc
|
|
$(MAKE) -C src/login
|
|
|
|
# Build shell via its own Makefile (multi-file build).
|
|
shell:
|
|
$(MAKE) -C src/shell
|
|
|
|
# Build desktop via its own Makefile (depends on libc, libjpeg, bearssl for user.h, dialogs, and registry config files).
|
|
desktop: libc libjpeg bearssl libloader dialogs configs
|
|
$(MAKE) -C src/desktop
|
|
|
|
# Copy SVG icons for the desktop into bin/icons/.
|
|
icons:
|
|
../scripts/copy_icons.sh
|
|
|
|
# Copy TTF fonts for the desktop into bin/fonts/.
|
|
fonts:
|
|
../scripts/copy_fonts.sh
|
|
|
|
# Copy default system config files into bin/config/.
|
|
configs: $(CONFIGDST)
|
|
|
|
# Copy read-only OS data tables into bin/os/data/.
|
|
osdata: $(OSDATADST)
|
|
|
|
# Build paint standalone GUI tool (depends on libc).
|
|
paint: libc
|
|
$(MAKE) -C src/paint
|
|
|
|
# Build text editor standalone GUI app (depends on libc and libdialogs).
|
|
texteditor: libc libloader dialogs
|
|
$(MAKE) -C src/texteditor
|
|
|
|
# Build Mandelbrot standalone GUI app (depends on libc).
|
|
mandelbrot: libc
|
|
$(MAKE) -C src/mandelbrot
|
|
|
|
# Build 2048 standalone MTK game (depends on libc, libloader, and libdialogs).
|
|
2048: libc libloader dialogs
|
|
$(MAKE) -C src/2048
|
|
|
|
# Build RPG demo game via its own Makefile (depends on libc).
|
|
# Build screenshot tool (depends on libc, libjpegwrite, libloader, and libdialogs).
|
|
screenshot: libc libjpegwrite libloader dialogs
|
|
$(MAKE) -C src/screenshot
|
|
|
|
# Verify the TCC C API header (libc/montauk.h) exposes every kernel syscall with
|
|
# matching numbers. Fails the build on drift; 'make gen-syscalls' refreshes them.
|
|
check-syscalls:
|
|
python3 ../scripts/montauk-syscalls.py check
|
|
|
|
# Regenerate the MTK_SYS_* number block in libc/montauk.h from Api/Syscall.hpp.
|
|
# Wrapper functions stay hand-written; this only updates the numbers.
|
|
gen-syscalls:
|
|
python3 ../scripts/montauk-syscalls.py gen
|
|
|
|
# Build TCC (Tiny C Compiler) via its own Makefile (depends on libc).
|
|
# check-syscalls guards against shipping a stale C API header into the ramdisk.
|
|
tcc: libc check-syscalls
|
|
$(MAKE) -C src/tcc
|
|
mkdir -p $(BINDIR)/sdk/tcc/include
|
|
cp -r src/tcc/tcc_include/* $(BINDIR)/sdk/tcc/include/
|
|
cp include/libc/*.h $(BINDIR)/sdk/tcc/include/
|
|
mkdir -p $(BINDIR)/sdk/tcc/include/sys
|
|
cp include/libc/sys/*.h $(BINDIR)/sdk/tcc/include/sys/
|
|
|
|
# Build Lua interpreter and static library (depends on libc).
|
|
lua: libc
|
|
$(MAKE) -C src/lua
|
|
|
|
# Build print spooler daemon (depends on libc, tls, and bearssl).
|
|
printd: bearssl libc tls libjpegwrite
|
|
$(MAKE) -C src/printd
|
|
|
|
# Build print control utility (depends on libc, tls, and bearssl).
|
|
printctl: bearssl libc tls
|
|
$(MAKE) -C src/printctl
|
|
|
|
# Build libdialogs shared library.
|
|
dialogs:
|
|
$(MAKE) -C src/dialogs
|
|
|
|
# Build crashpad (crash reporter popup, depends on libc).
|
|
crashpad: libc
|
|
$(MAKE) -C src/crashpad
|
|
|
|
# Install app bundles (manifests, icons, data files) into bin/apps/<name>/.
|
|
install-apps: 2048 paint spreadsheet wordprocessor weather wikipedia imageviewer fontpreview pdfviewer disks devexplorer installer audio music video bluetooth network display keyboard sshserver terminal syslog procmgr powermgr calculator charmap screenshot texteditor mandelbrot printers timezone crashpad
|
|
../scripts/install_apps.sh
|
|
|
|
# Copy man pages into bin/man/ so mkramdisk.sh picks them up.
|
|
$(BINDIR)/man/%: $(MANDIR)/%
|
|
mkdir -p $(BINDIR)/man
|
|
cp $< $@
|
|
|
|
# Copy web content into bin/www/ so mkramdisk.sh picks them up.
|
|
$(BINDIR)/www/%: $(WWWDIR)/%
|
|
mkdir -p $(BINDIR)/www
|
|
cp $< $@
|
|
|
|
# Copy CA certificate bundle into bin/os/certs/.
|
|
$(CA_CERTS): data/ca-certificates.crt
|
|
mkdir -p $(BINDIR)/os/certs
|
|
cp $< $@
|
|
|
|
# Copy device firmware blobs into bin/os/firmware/ (preserving subdirs).
|
|
$(BINDIR)/os/firmware/%: $(FWDIR)/%
|
|
mkdir -p $(dir $@)
|
|
cp $< $@
|
|
|
|
# Copy system config files into bin/config/.
|
|
$(BINDIR)/config/%: $(CONFIGDIR)/%
|
|
mkdir -p $(BINDIR)/config
|
|
cp $< $@
|
|
|
|
# Copy read-only OS data tables into bin/os/data/.
|
|
$(BINDIR)/os/data/%: $(OSDATADIR)/%
|
|
mkdir -p $(BINDIR)/os/data
|
|
cp $< $@
|
|
|
|
$(BINDIR)/os/licenses/%: $(LICDIR)/%
|
|
mkdir -p $(BINDIR)/os/licenses
|
|
cp $< $@
|
|
|
|
# Copy wallpapers into bin/os/wallpapers/.
|
|
$(BINDIR)/os/wallpapers/%: $(WPDIR)/%
|
|
mkdir -p $(BINDIR)/os/wallpapers
|
|
cp $< $@
|
|
|
|
# Build each system program from its source files.
|
|
$(BINDIR)/os/%.elf: src/%/main.cpp link.ld GNUmakefile $(LIBC_LIB)
|
|
mkdir -p $(BINDIR)/os obj/$*
|
|
$(CXX) $(CXXFLAGS) -c src/$*/main.cpp -o obj/$*/main.o
|
|
$(CXX) $(CXXFLAGS) $(LDFLAGS) obj/$*/main.o $(LIBC_LIB) -o $@
|
|
|
|
# ============================================================================
|
|
# Native development kit (Montauk SDK): binutils built for MontaukOS
|
|
# plus a target sysroot (headers, libc.a, crt objects) under 0:/sdk.
|
|
# Skipped when the native tools have not been built; see
|
|
# toolchain/README.md.
|
|
# ============================================================================
|
|
NATIVE_BIN := ../toolchain/native/sdk/bin
|
|
DEVKIT_TOOLS := as ld ar nm objcopy objdump readelf ranlib strip size strings addr2line c++filt elfedit
|
|
|
|
.PHONY: devkit
|
|
devkit: libc
|
|
ifneq ($(wildcard $(NATIVE_BIN)/as),)
|
|
# Clean only the devkit-owned subtrees; sdk/tcc and sdk/lua are
|
|
# installed into bin/sdk/ by their own targets.
|
|
rm -rf $(BINDIR)/sdk/bin $(BINDIR)/sdk/lib $(BINDIR)/sdk/include \
|
|
$(BINDIR)/sdk/libexec $(BINDIR)/sdk/x86_64-montauk
|
|
mkdir -p $(BINDIR)/sdk/bin $(BINDIR)/sdk/lib $(BINDIR)/sdk/include
|
|
for t in $(DEVKIT_TOOLS); do \
|
|
cp $(NATIVE_BIN)/$$t $(BINDIR)/sdk/bin/$$t.elf || exit 1; \
|
|
done
|
|
cp -r ../toolchain/native/sdk/x86_64-montauk $(BINDIR)/sdk/x86_64-montauk
|
|
cp -r include/libc/. $(BINDIR)/sdk/include/
|
|
cp -r include/montauk $(BINDIR)/sdk/include/montauk
|
|
cp -r include/Api $(BINDIR)/sdk/include/Api
|
|
cp -r include/rtlsdr $(BINDIR)/sdk/include/rtlsdr
|
|
cp -r ../kernel/freestnd-cxx-hdrs/x86_64/include/. $(BINDIR)/sdk/include/
|
|
# liblibc-full.a, not liblibc.a: on-OS builds cannot pass
|
|
# -Wl,-u,_pf_putfloat, so the sysroot ships the variant with the printf
|
|
# float path already bound in. See lib/libc/Makefile.
|
|
cp lib/libc/liblibc-full.a $(BINDIR)/sdk/lib/libc.a
|
|
cp lib/libc/crt1.o lib/libc/crti.o lib/libc/crtn.o $(BINDIR)/sdk/lib/
|
|
ar rcs $(BINDIR)/sdk/lib/libm.a
|
|
cp ../toolchain/local/x86_64-montauk/lib/libstdc++.a $(BINDIR)/sdk/lib/libstdc++.a
|
|
cp -r ../toolchain/local/x86_64-montauk/include/c++ $(BINDIR)/sdk/include/c++
|
|
../toolchain/local/bin/x86_64-montauk-gcc -O2 ../toolchain/files/tls-test.c -o $(BINDIR)/sdk/bin/tls-test.elf
|
|
../toolchain/local/bin/x86_64-montauk-g++ -O2 ../toolchain/files/cxx-test.cpp -o $(BINDIR)/sdk/bin/cxx-test.elf
|
|
../toolchain/local/bin/x86_64-montauk-gcc -O2 ../toolchain/files/sdk-diag.c -o $(BINDIR)/sdk/bin/sdk-diag.elf
|
|
ifneq ($(wildcard ../toolchain/native-gcc/sdk/bin/gcc),)
|
|
cp ../toolchain/native-gcc/sdk/bin/gcc $(BINDIR)/sdk/bin/gcc.elf
|
|
cp ../toolchain/native-gcc/sdk/bin/g++ $(BINDIR)/sdk/bin/g++.elf
|
|
cp ../toolchain/native-gcc/sdk/bin/cpp $(BINDIR)/sdk/bin/cpp.elf
|
|
mkdir -p $(BINDIR)/sdk/libexec/gcc/x86_64-montauk/14.2.0
|
|
cp ../toolchain/native-gcc/sdk/libexec/gcc/x86_64-montauk/14.2.0/cc1 \
|
|
../toolchain/native-gcc/sdk/libexec/gcc/x86_64-montauk/14.2.0/cc1plus \
|
|
../toolchain/native-gcc/sdk/libexec/gcc/x86_64-montauk/14.2.0/collect2 \
|
|
$(BINDIR)/sdk/libexec/gcc/x86_64-montauk/14.2.0/
|
|
cp -r ../toolchain/native-gcc/sdk/lib/gcc $(BINDIR)/sdk/lib/gcc
|
|
cp ../toolchain/local/lib/gcc/x86_64-montauk/14.2.0/libgcc.a \
|
|
../toolchain/local/lib/gcc/x86_64-montauk/14.2.0/crtbegin.o \
|
|
../toolchain/local/lib/gcc/x86_64-montauk/14.2.0/crtend.o \
|
|
$(BINDIR)/sdk/lib/gcc/x86_64-montauk/14.2.0/
|
|
cp ../toolchain/native/sdk/bin/ld $(BINDIR)/sdk/libexec/gcc/x86_64-montauk/14.2.0/ld
|
|
mkdir -p $(BINDIR)/tmp
|
|
printf 'scratch space for compiler intermediates\n' > $(BINDIR)/tmp/readme.txt
|
|
else
|
|
@echo "======================================================================"
|
|
@echo "devkit: WARNING: toolchain/native-gcc/ not built."
|
|
@echo " The image will ship WITHOUT the native GCC (g++, cc1plus, ...)."
|
|
@echo " Run 'make sdk' from the repo root to build the full Montauk SDK."
|
|
@echo "======================================================================"
|
|
endif
|
|
else
|
|
@echo "======================================================================"
|
|
@echo "devkit: WARNING: toolchain/native/ not built."
|
|
@echo " The image will ship WITHOUT the Montauk SDK (0:/sdk dev tools)."
|
|
@echo " Run 'make sdk' from the repo root to build it (one-time, long)."
|
|
@echo "======================================================================"
|
|
endif
|
|
|
|
clean:
|
|
rm -rf $(BINDIR) obj
|
|
$(MAKE) -C lib/bearssl clean
|
|
$(MAKE) -C lib/libc clean
|
|
$(MAKE) -C lib/libjpeg clean
|
|
$(MAKE) -C lib/libjpegwrite clean
|
|
$(MAKE) -C lib/tls clean
|
|
$(MAKE) -C src/fetch clean
|
|
$(MAKE) -C src/login clean
|
|
$(MAKE) -C src/shell clean
|
|
$(MAKE) -C src/desktop clean
|
|
$(MAKE) -C src/wikipedia clean
|
|
$(MAKE) -C src/weather clean
|
|
$(MAKE) -C src/imageviewer clean
|
|
$(MAKE) -C src/fontpreview clean
|
|
$(MAKE) -C src/spreadsheet clean
|
|
$(MAKE) -C src/wordprocessor clean
|
|
$(MAKE) -C src/pdfviewer clean
|
|
$(MAKE) -C src/disks clean
|
|
$(MAKE) -C src/devexplorer clean
|
|
$(MAKE) -C src/installer clean
|
|
$(MAKE) -C src/audio clean
|
|
$(MAKE) -C src/music clean
|
|
$(MAKE) -C src/video clean
|
|
$(MAKE) -C src/bluetooth clean
|
|
$(MAKE) -C src/network clean
|
|
$(MAKE) -C src/keyboard clean
|
|
$(MAKE) -C src/terminal clean
|
|
$(MAKE) -C src/syslog clean
|
|
$(MAKE) -C src/procmgr clean
|
|
$(MAKE) -C src/powermgr clean
|
|
$(MAKE) -C src/calculator clean
|
|
$(MAKE) -C src/charmap clean
|
|
$(MAKE) -C src/printers clean
|
|
$(MAKE) -C src/timezone clean
|
|
$(MAKE) -C src/paint clean
|
|
$(MAKE) -C src/screenshot clean
|
|
$(MAKE) -C src/mandelbrot clean
|
|
$(MAKE) -C src/2048 clean
|
|
$(MAKE) -C src/tcc clean
|
|
$(MAKE) -C src/printd clean
|
|
$(MAKE) -C src/printctl clean
|
|
$(MAKE) -C src/dialogs clean
|
|
$(MAKE) -C src/crashpad clean
|
|
$(MAKE) -C src/libloader clean
|
|
$(MAKE) -C src/rtlsdr clean
|
|
$(MAKE) -C src/sdr clean
|