4 TWIN_CFLAGS=$(shell pkg-config --cflags libtwin)
5 TWIN_LDFLAGS=$(shell pkg-config --libs libtwin)
8 CFLAGS = -O0 -ggdb -Wall '-DPREFIX="$(PREFIX)"'
11 ARTWORK = background.png cdrom.png hdd.png usbpen.png cursor
13 all: petitboot udev-helper
15 petitboot: petitboot.o devices.o
16 $(CC) $(LDFLAGS) -o $@ $^
18 petitboot: LDFLAGS+=$(TWIN_LDFLAGS)
19 petitboot: CFLAGS+=$(TWIN_CFLAGS)
21 udev-helper: devices/udev-helper.o devices/params.o \
22 $(foreach p,$(PARSERS),devices/$(p)-parser.o)
23 $(CC) $(LDFLAGS) -o $@ $^
25 devices/%: CFLAGS+=-I.
28 $(INSTALL) -D petitboot $(PREFIX)/sbin/petitboot
29 $(INSTALL) -D udev-helper $(PREFIX)/sbin/udev-helper
30 $(INSTALL) -Dd $(PREFIX)/share/petitboot/artwork/
31 $(INSTALL) -t $(PREFIX)/share/petitboot/artwork/ \
32 $(foreach a,$(ARTWORK),artwork/$(a))