None of these are necessary anymore. They do not apply cleanly to current versions of ebuilds in Gentoo's repository, causing builds to fail. Going forward, I think it will be better to maintain patched ebuilds in the Aimee OS repository, rather than patching them at build time.
118 lines
2.4 KiB
Makefile
118 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
|
|
./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
|