config.mk 1.39 KB
Newer Older
1 2
### this might really belong to build-*...

3
# distributions
4
DISTRO_EXTS := .iso .tar
5

6
use/pack::
7
	@$(call add_feature)
8

9 10 11 12
ifeq (,$(filter-out e2k%,$(ARCH)))
use/pack:: use/e2k; @:
endif

13 14 15
# fallback type is isodata, might get set elsewhere to produce bootable iso
use/pack/iso: use/pack
	@$(call try,IMAGE_PACKTYPE,isodata)
16

17 18 19 20 21
ifeq (distro,$(IMAGE_CLASS))
use/pack/tar: use/pack
	@$(call set,IMAGE_PACKTYPE,tar)
endif

22
# virtual environments
23
VE_ARCHIVES := squash tar cpio ubifs
24 25 26 27 28
VE_COMPRESSORS := gz xz# there's no sense in bzip2 by now
VE_ZIPS := $(call addsuffices, \
		$(addprefix .,$(VE_COMPRESSORS)), \
			$(VE_ARCHIVES))# tar.gz cpio.xz ...
VE_EXTS := $(sort $(addprefix .,$(VE_ARCHIVES) $(VE_ZIPS)))# .tar .tar.gz ...
29

30 31 32 33 34 35 36 37 38 39 40
# generate rules for archive/compressor combinations
define PACK_containers
use/pack/$(1): use/pack
	@$$(call set,IMAGE_PACKTYPE,$(1))
endef

define PACK_compressors
use/pack/$(1).$(2): use/pack/$(1)
	@$$(call set,IMAGE_COMPRESS,$(2))
endef

41
ifeq (ve,$(IMAGE_CLASS))
42 43 44 45
$(foreach c,$(VE_ARCHIVES), \
	$(eval $(call PACK_containers,$(c))) \
	$(foreach z,$(VE_COMPRESSORS), \
		$(eval $(call PACK_compressors,$(c),$(z)))))
46
endif
47

48
# extensions for buld-vm
49
VM_EXTS := .tar .tar.gz .tar.xz .img .img.xz .qcow2 .qcow2c .vdi .vmdk .vhd
50
VM_TAVOLGA_EXTS := .recovery.tar
51 52

ifeq (vm,$(IMAGE_CLASS))
53

54
$(VM_EXTS:.%=use/pack/%): use/pack; @:
55

56 57 58 59
ifeq (mipsel,$(ARCH))
use/pack/recovery.tar: use/pack/tar; @:
endif

60
endif