BUILD = ../build

all: $(BUILD)/stage0

stage0: $(BUILD)/stage0

stage0-bootstrap: $(BUILD)/stage0-bootstrap

$(BUILD)/stage0-bootstrap: hex0.in
	for x in `sed '/^;/d;s/;.*//;s/ *//' hex0.in`; do printf \\x$$x; done > $@
	chmod +x $@

$(BUILD)/stage0: $(BUILD)/stage0-bootstrap
	$< < hex0.in > $@
	chmod +x $@
