X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=Makefile;fp=Makefile;h=a9ae25c09fb65f187fdc6e5adeb5d1736ad41a3b;hb=db8001f511f8e8d928aa82113431067f968f4966;hp=669e56a8210834994394dad86e7a41a0d318c03f;hpb=49d43d590027df23d45d3cd99f83517eeab67a43;p=petitboot diff --git a/Makefile b/Makefile index 669e56a..a9ae25c 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,14 @@ +PREFIX?=/usr CC=gcc +INSTALL=install TWIN_CFLAGS=$(shell pkg-config --cflags libtwin) TWIN_LDFLAGS=$(shell pkg-config --libs libtwin) LDFLAGS = -CFLAGS = -O0 -ggdb -Wall +CFLAGS = -O0 -ggdb -Wall '-DPREFIX="$(PREFIX)"' PARSERS = native +ARTWORK = background.png cdrom.png hdd.png usbpen.png cursor all: petitboot udev-helper @@ -19,6 +22,15 @@ udev-helper: devices/udev-helper.o devices/params.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)) + clean: rm -f petitboot rm -f udev-helper