summaryrefslogtreecommitdiff
path: root/rootfs/Makefile
blob: bcb885b208a178e3eb6ec98d67875cfddc9116f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
fsmgr := $(shell which fsmgr)

ifeq ($(fsmgr),)
$(error "no fsmgr")
endif

sudo := $(shell [ "$$(id -u)" = 0 ] || echo sudo)

rootfs ?= samizdat.seed.btrfs
patchfs ?= samizdat.patch.btrfs

.PHONY: all rootfs patchfs
all: rootfs $(ifneq $(patchfs),,patchfs)

%.btrfs:
	$(sudo) $(fsmgr) build $@

rootfs: $(rootfs)

patchfs:
	$(sudo) REWRITE_SOURCES_LIST=y $(fsmgr) build $(patchfs)