Files
aimee-os/Makefile
Dustin C. Hatch 70771c8067 Use host tools from build container
Instead of building host tools along with the target packages, we now
rely on the build container to contain everything we need to build Aimee
OS.  The _aimee-os.org/build/build-{target}_ image (tentative name)
includes a cross-compilation toolchain and all of the tools that were
originally listed in `host-tools.packages`.
2024-12-05 17:56:34 -06:00

119 lines
2.4 KiB
Makefile

O ?= .
IMAGESDIR ?= $(O)/images
CONFIGDIR ?= .
export CONFIGDIR
update.tar: $(IMAGESDIR)/update.tar.zstd
$(O)/.prepared: \
prepare.sh \
setup-local-repo.sh \
$(shell find patches/ebuilds -type f)
./prepare.sh
./setup-local-repo.sh
mkdir -p $(O)
touch $(O)/.prepared
prepare: $(O)/.prepared
$(O)/.built: \
build.sh \
build.packages \
install.packages \
$(CONFIGDIR)/build.packages \
$(CONFIGDIR)/install.packages \
$(shell find $(CONFIGDIR)/portage/target -type f) \
$(O)/.prepared
./build.sh
touch $(O)/.built
build: $(O)/.built
$(O)/semanage.mods: \
semanage.mods \
$(wildcard $(CONFIGDIR)/semanage.mods)
cat $^ > $@
$(O)/.ready: \
build-rootfs.sh \
install.packages \
$(CONFIGDIR)/install.packages \
$(CONFIGDIR)/installonly.packages \
$(CONFIGDIR)/busybox.symlinks \
$(O)/linux/arch/arm64/boot/Image.gz \
$(O)/semanage.mods \
$(shell find overlay -type f) \
$(shell find $(CONFIGDIR)/overlay -type f 2>/dev/null) \
$(O)/.built
./build-rootfs.sh "$(O)"
touch $(O)/.ready
$(O)/squashfs.exclude: \
squashfs.exclude \
$(shell test -f $(CONFIGDIR)/squashfs.exclude && echo $(CONFIGDIR)/squashfs.exclude)
mkdir -p $(O)
sort $^ > $@
$(O)/squashfs.pseudo: \
$(wildcard $(CONFIGDIR)/squashfs.pseudo)
sort /dev/null $^ > $@
$(IMAGESDIR)/rootfs.squashfs: \
build-squashfs.sh \
$(O)/squashfs.exclude \
$(O)/squashfs.pseudo \
$(O)/.ready
./build-squashfs.sh "$(O)" "$(IMAGESDIR)"
squashfs: $(IMAGESDIR)/rootfs.squashfs
$(O)/linux/arch/arm64/boot/Image.gz: \
build-kernel.sh \
$(CONFIGDIR)/linux.config \
$(O)/.prepared
./build-kernel.sh "$(O)"
kernel: $(O)/linux/arch/arm64/boot/Image.gz
$(O)/efi-part/EFI/BOOT/BOOTAA64.efi: \
build-grub.sh \
grub.cfg \
$(O)/.prepared
./build-grub.sh "$(O)"
grub: $(O)/efi-part/EFI/BOOT/BOOTAA64.efi
$(IMAGESDIR)/sdcard.img: \
genimage.cfg \
genimage.sh \
post-build.sh \
$(O)/efi-part/EFI/BOOT/BOOTAA64.efi \
$(IMAGESDIR)/rootfs.squashfs
./post-build.sh "$(O)"
./genimage.sh "$(O)" "$(IMAGESDIR)"
sdcard.img: $(IMAGESDIR)/sdcard.img
$(IMAGESDIR)/firmware.img: $(IMAGESDIR)/sdcard.img
$(IMAGESDIR)/update.tar.zstd: \
$(IMAGESDIR)/rootfs.squashfs \
$(IMAGESDIR)/firmware.img \
install-update.sh \
$(O)/.prepared
./build-update.sh "$(IMAGESDIR)"
clean:
rm -rf $(O)/linux $(O)/output $(IMAGESDIR) $(O)/tmp
rm -f $(O)/.prepared
.PHONY: \
build \
grub \
kernel \
prepare \
sdcard.img \
squashfs \
update.tar