X-Git-Url: https://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=rules.mk;h=af6223beb45f8bc8117b7903d90b5bf57c5ed193;hp=f8d64c61752b3d0c505740c33dea4e8d5850a50f;hb=9793f862467407e83aa5b5a2cc35c25de9bae17b;hpb=32e6a41f33e5576716b351bd473a27939fe94fa1 diff --git a/rules.mk b/rules.mk index f8d64c6..af6223b 100644 --- a/rules.mk +++ b/rules.mk @@ -1,20 +1,24 @@ VPATH = $(srcdir) -CFLAGS += -I$(top_srcdir) -I$(top_srcdir)/lib -I$(builddir) +CPPFLAGS += -I$(top_srcdir) -I$(top_srcdir)/lib -I$(builddir) # we need paths to be overridable at build-time -DEFS += '-DPREFIX="$(prefix)"' '-DPKG_SHARE_DIR="$(pkgdatadir)"' +DEFS += '-DPREFIX="$(prefix)"' '-DPKG_SHARE_DIR="$(pkgdatadir)"' \ + '-DLOCAL_STATE_DIR="$(localstatedir)"' #uis = ui/twin/pb-twin uis = ui/test/pb-test -parsers = native yaboot kboot +#parsers = native yaboot kboot +parsers = kboot artwork = background.jpg cdrom.png hdd.png usbpen.png tux.png cursor.gz talloc_objs = lib/talloc/talloc.o list_objs = lib/list/list.o server_objs = lib/pb-protocol/pb-protocol.o +parser_objs = discover/parser.o discover/parser-utils.o \ + $(foreach p, $(parsers), discover/$(p)-parser.o) parser_test_objs = parser-test.o $(parser_objs) @@ -31,7 +35,7 @@ ui/twin/pb-twin: $(pb_twin_objs) # test ui pb_test_objs = ui/test/pb-test.o ui/common/discover-client.o \ - $(talloc_objs) $(server_objs) + $(talloc_objs) $(server_objs) $(list_objs) ui/test/pb-test: $(pb_test_objs) $(LINK.o) -o $@ $^ @@ -43,7 +47,8 @@ ui/test/pb-test: $(pb_test_objs) pb_discover_objs = discover/pb-discover.o discover/udev.o discover/log.o \ discover/waiter.o discover/discover-server.o \ - $(talloc_objs) $(server_objs) $(list_objs) + discover/device-handler.o discover/paths.o \ + $(talloc_objs) $(server_objs) $(parser_objs) $(list_objs) discover/pb-discover: $(pb_discover_objs) $(LINK.o) -o $@ $^ @@ -53,12 +58,11 @@ parser-test: $(parser_test_objs) $(LINK.o) -o $@ $^ install: all - $(INSTALL) -D petitboot $(DESTDIR)$(sbindir)/petitboot - $(INSTALL) -D petitboot-udev-helper \ - $(DESTDIR)$(sbindir)/petitboot-udev-helper - $(INSTALL) -Dd $(DESTDIR)$(pkgdatadir)/artwork/ - $(INSTALL) -t $(DESTDIR)$(pkgdatadir)/artwork/ \ - $(foreach a,$(artwork),$(top_srcdir)/artwork/$(a)) + $(INSTALL) -d $(DESTDIR)$(sbindir)/ + $(INSTALL) discover/pb-discover $(uis) $(DESTDIR)$(sbindir)/ + $(INSTALL) -d $(DESTDIR)$(pkgdatadir)/artwork/ + $(INSTALL) $(addprefix $(top_srcdir)/ui/twin/artwork/,$(artwork)) \ + $(DESTDIR)$(pkgdatadir)/artwork/ dist: $(PACKAGE)-$(VERSION).tar.gz