+petitboot: LDFLAGS+=$(TWIN_LDFLAGS)
+petitboot: CFLAGS+=$(TWIN_CFLAGS)
+
+udev-helper: devices/udev-helper.o devices/params.o devices/yaboot-cfg.o \
+ $(foreach p,$(PARSERS),devices/$(p)-parser.o)
+ $(CC) $(LDFLAGS) -o $@ $^
+
+devices/%: CFLAGS+=-I.
+
+install: all
+ $(INSTALL) -D petitboot $(PREFIX)/sbin/petitboot
+ $(INSTALL) -D udev-helper $(PREFIX)/sbin/udev-helper
+ $(INSTALL) -Dd $(PREFIX)/share/petitboot/artwork/
+ $(INSTALL) -t $(PREFIX)/share/petitboot/artwork/ \
+ $(foreach a,$(ARTWORK),artwork/$(a))
+
+dist: $(PACKAGE)-$(VERSION).tar.gz
+
+$(PACKAGE)-$(VERSION).tar.gz: $(PACKAGE)-$(VERSION)
+ tar czvf $@ $^
+
+$(PACKAGE)-$(VERSION): clean
+ mkdir $@ $@/devices
+ cp -a artwork $@
+ cp *.[ch] $@
+ cp -a devices/*.[ch] $@/devices/
+ cp Makefile $@
+