summaryrefslogtreecommitdiff
path: root/Makefile
blob: 0d25c382e508afa9cf745e85c1be55d0be5b88dd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
VERSION=1.0-beta5-20231022

help:
	@printf "This Makefile simplifies creation of Adélie Linux media.\n\n"
	@printf "The following targets are recognised:\n\n"
	
	@printf "\tinst\tGenerate 'install' CD images.\n"
	@printf "\tkde\tGenerate a live KDE CD image.\n"
	@printf "\tlxqt\tGenerate a live LXQt CD image.\n"
	@printf "\tmate\tGenerate a live MATE CD image.\n"
	@printf "\txfce\tGenerate a live XFCE CD image.\n"
	@printf "\tiso\tGenerate all possible CD images.\n"
	@printf "\tfull\tGenerate a full rootfs tar.xz.\n"
	@printf "\tmini\tGenerate a mini rootfs tar.xz.\n"
	@printf "\ttar\tGenerate both rootfs tar.xz files.\n"
	@printf "\tworld\tGenerate all above media types.\n"
	
	@printf "\nYou must set ARCH to a supported architecture.\n"
	@printf "Note that if you don't set ARCH to the native arch of your host,\nyou probably need qemu-user installed.\n"

# This target only exists so the ARCH check runs before any other Make code.
check-env:
	@printf "Please choose something to build!\n\nTry 'inst', 'iso', 'world', or 'help' for a complete list.\n"

ifndef ARCH
	$(error Set ARCH first)
endif

adelie-inst-firmware-$(ARCH)-$(VERSION).iso: configs/horizon/$(ARCH)-horizon-fw.installfile configs/horizon/firmware.installfile configs/horizon/horizon.installfile configs/arch/$(ARCH).installfile configs/base/base.installfile
	hscript-image -t iso -o adelie-inst-firmware-$(ARCH)-$(VERSION).iso configs/horizon/$(ARCH)-horizon-fw.installfile

adelie-inst-$(ARCH)-$(VERSION).iso: configs/horizon/$(ARCH)-horizon.installfile configs/horizon/horizon.installfile configs/arch/$(ARCH).installfile configs/base/base.installfile
	hscript-image -t iso -o adelie-inst-$(ARCH)-$(VERSION).iso configs/horizon/$(ARCH)-horizon.installfile

inst: adelie-inst-firmware-$(ARCH)-$(VERSION).iso adelie-inst-$(ARCH)-$(VERSION).iso

adelie-live-kde-$(ARCH)-$(VERSION).iso: configs/live/$(ARCH)-kde.installfile configs/base/kde.installfile configs/arch/$(ARCH).installfile configs/base/base.installfile
	hscript-image -t iso -o adelie-live-kde-$(ARCH)-$(VERSION).iso configs/live/$(ARCH)-kde.installfile

adelie-live-lxqt-$(ARCH)-$(VERSION).iso: configs/live/$(ARCH)-lxqt.installfile configs/base/lxqt.installfile configs/arch/$(ARCH).installfile configs/base/base.installfile
	hscript-image -t iso -o adelie-live-lxqt-$(ARCH)-$(VERSION).iso configs/live/$(ARCH)-lxqt.installfile

adelie-live-mate-$(ARCH)-$(VERSION).iso: configs/live/$(ARCH)-mate.installfile configs/base/mate.installfile configs/arch/$(ARCH).installfile configs/base/base.installfile
	hscript-image -t iso -o adelie-live-mate-$(ARCH)-$(VERSION).iso configs/live/$(ARCH)-mate.installfile

adelie-live-xfce-$(ARCH)-$(VERSION).iso: configs/live/$(ARCH)-xfce.installfile configs/base/xfce.installfile configs/arch/$(ARCH).installfile configs/base/base.installfile
	hscript-image -t iso -o adelie-live-xfce-$(ARCH)-$(VERSION).iso configs/live/$(ARCH)-xfce.installfile

kde: adelie-live-kde-$(ARCH)-$(VERSION).iso
lxqt: adelie-live-lxqt-$(ARCH)-$(VERSION).iso
mate: adelie-live-mate-$(ARCH)-$(VERSION).iso
xfce: adelie-live-xfce-$(ARCH)-$(VERSION).iso

iso: inst kde lxqt mate xfce

adelie-rootfs-$(ARCH)-$(VERSION).txz: configs/tarballs/$(ARCH)-full.installfile configs/base/base.installfile
	hscript-image -t txz -o adelie-rootfs-$(ARCH)-$(VERSION).txz configs/tarballs/$(ARCH)-full.installfile

adelie-minirootfs-$(ARCH)-$(VERSION).txz: configs/tarballs/$(ARCH)-mini.installfile configs/tarballs/mini.installfile
	hscript-image -t txz -o adelie-minirootfs-$(ARCH)-$(VERSION).txz configs/tarballs/$(ARCH)-mini.installfile

full: adelie-rootfs-$(ARCH)-$(VERSION).txz
mini: adelie-minirootfs-$(ARCH)-$(VERSION).txz

tar: full mini

world: iso tar

all: world

.PHONY: check-env iso inst kde lxqt mate xfce tar full mini world