2013-08-23 09:14:18 +00:00
|
|
|
GITVER := $(shell git rev-parse --short HEAD)
|
2013-09-29 08:26:53 +00:00
|
|
|
VERSION = 0.22
|
2013-05-19 07:39:56 +00:00
|
|
|
SHIN += $(shell find -type f -name '*.sh.in')
|
|
|
|
SCRIPTS += $(SHIN:.sh.in=.sh)
|
2017-08-14 06:44:29 +00:00
|
|
|
DATE=$(shell date "+%Y%m%d")
|
|
|
|
|
2017-08-17 05:39:44 +00:00
|
|
|
T_PLATFORMS=rpi{,2,3}{,-musl} beaglebone{,-musl} cubieboard2{,-musl} odroid-c2{,-musl} usbarmory{,-musl} GCP{,-musl}
|
|
|
|
T_ARCHS=i686 x86_64{,-musl} armv{6,7}l{,-musl} aarch64{,-musl}
|
2017-08-14 06:44:29 +00:00
|
|
|
|
2017-08-19 04:14:00 +00:00
|
|
|
T_SBC_IMGS=rpi{,2,3}{,-musl} beaglebone{,-musl} cubieboard2{,-musl} odroid-c2{,-musl} usbarmory{,-musl}
|
|
|
|
T_CLOUD_IMGS=GCP{,-musl}
|
|
|
|
|
2017-08-14 06:44:29 +00:00
|
|
|
ARCHS=$(shell echo $(T_ARCHS))
|
2017-08-17 05:39:44 +00:00
|
|
|
PLATFORMS=$(shell echo $(T_PLATFORMS))
|
2017-08-19 04:14:00 +00:00
|
|
|
SBC_IMGS=$(shell echo $(T_SBC_IMGS))
|
|
|
|
CLOUD_IMGS=$(shell echo $(T_CLOUD_IMGS))
|
2017-08-17 05:39:44 +00:00
|
|
|
|
2017-08-14 06:44:29 +00:00
|
|
|
ALL_ROOTFS=$(foreach arch,$(ARCHS),void-$(arch)-ROOTFS-$(DATE).tar.xz)
|
2017-08-17 05:39:44 +00:00
|
|
|
ALL_PLATFORMFS=$(foreach platform,$(PLATFORMS),void-$(platform)-PLATFORMFS-$(DATE).tar.xz)
|
2017-08-19 07:16:50 +00:00
|
|
|
ALL_SBC_IMAGES=$(foreach platform,$(SBC_IMGS),void-$(platform)-$(DATE).img.xz)
|
|
|
|
ALL_CLOUD_IMAGES=$(foreach cloud,$(CLOUD_IMGS),void-$(cloud)-$(DATE).tar.gz)
|
2017-08-14 06:44:29 +00:00
|
|
|
|
|
|
|
SUDO := sudo
|
2013-05-19 07:39:56 +00:00
|
|
|
|
2017-08-21 04:10:15 +00:00
|
|
|
XBPS_REPOSITORY := -r https://lug.utdallas.edu/mirror/void/current -r https://lug.utdallas.edu/mirror/void/current/musl -r https://lug.utdallas.edu/mirror/void/current/aarch64
|
|
|
|
|
2013-05-19 07:39:56 +00:00
|
|
|
%.sh: %.sh.in
|
|
|
|
sed -e "s|@@MKLIVE_VERSION@@|$(VERSION) $(GITVER)|g" $^ > $@
|
2014-01-11 16:51:47 -01:00
|
|
|
chmod +x $@
|
2013-05-19 07:39:56 +00:00
|
|
|
|
|
|
|
all: $(SCRIPTS)
|
2012-06-12 14:27:17 +00:00
|
|
|
|
2017-08-14 06:44:29 +00:00
|
|
|
clean:
|
|
|
|
rm -v *.sh
|
|
|
|
|
2017-08-20 21:59:43 +00:00
|
|
|
distdir-$(DATE):
|
|
|
|
mkdir -p distdir-$(DATE)
|
|
|
|
|
|
|
|
dist: distdir-$(DATE)
|
|
|
|
mv void*$(DATE)* distdir-$(DATE)/
|
|
|
|
|
2017-08-14 06:44:29 +00:00
|
|
|
rootfs-all: $(ALL_ROOTFS)
|
|
|
|
|
|
|
|
rootfs-all-print:
|
|
|
|
echo $(ALL_ROOTFS)
|
|
|
|
|
2017-08-17 05:39:44 +00:00
|
|
|
void-%-ROOTFS-$(DATE).tar.xz: $(SCRIPTS)
|
2017-08-21 04:10:15 +00:00
|
|
|
$(SUDO) ./mkrootfs.sh $(XBPS_REPOSITORY) $*
|
2017-08-14 06:44:29 +00:00
|
|
|
|
2017-08-17 05:39:44 +00:00
|
|
|
void-%-PLATFORMFS-$(DATE).tar.xz: $(SCRIPTS)
|
2017-08-21 04:10:15 +00:00
|
|
|
$(SUDO) ./mkplatformfs.sh $(XBPS_REPOSITORY) $* void-$(shell ./lib.sh platform2arch $*)-ROOTFS-$(DATE).tar.xz
|
2017-08-17 05:39:44 +00:00
|
|
|
|
2017-08-19 04:14:00 +00:00
|
|
|
platformfs-all: rootfs-all $(ALL_PLATFORMFS)
|
2017-08-17 05:39:44 +00:00
|
|
|
|
|
|
|
platformfs-all-print:
|
|
|
|
@echo $(ALL_PLATFORMFS) | sed "s: :\n:g"
|
|
|
|
|
2017-08-19 07:16:50 +00:00
|
|
|
images-all: platformfs-all images-all-sbc images-all-cloud
|
|
|
|
|
|
|
|
images-all-sbc: $(ALL_SBC_IMAGES)
|
|
|
|
|
|
|
|
images-all-cloud: $(ALL_CLOUD_IMAGES)
|
2017-08-19 04:14:00 +00:00
|
|
|
|
|
|
|
images-all-print:
|
2017-08-19 07:16:50 +00:00
|
|
|
@echo $(ALL_SBC_IMAGES) $(ALL_CLOUD_IMAGES)
|
2017-08-19 04:14:00 +00:00
|
|
|
|
2017-08-19 07:16:50 +00:00
|
|
|
void-%-$(DATE).img.xz:
|
2017-08-19 04:14:00 +00:00
|
|
|
$(SUDO) ./mkimage.sh void-$*-PLATFORMFS-$(DATE).tar.xz
|
|
|
|
|
|
|
|
# The GCP images are special for $reasons
|
|
|
|
void-GCP-$(DATE).tar.gz:
|
|
|
|
$(SUDO) ./mkimage.sh void-GCP-PLATFORMFS-$(DATE).tar.xz
|
|
|
|
|
|
|
|
void-GCP-musl-$(DATE).tar.gz:
|
|
|
|
$(SUDO) ./mkimage.sh void-GCP-musl-PLATFORMFS-$(DATE).tar.xz
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-08-20 21:59:43 +00:00
|
|
|
.PHONY: clean dist rootfs-all-print platformfs-all-print
|