diff options
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 52 |
1 files changed, 29 insertions, 23 deletions
diff --git a/GNUmakefile b/GNUmakefile index d8a083f..6374c90 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -6,9 +6,13 @@ include mk/Variables.mk CFLAGS += -DVERSION='"$(VERSION)"' -DLIB='"$(LIB)"' # build -TARGETS := xenlog xenscreen -BUILD_GTK := xenwatch xenstore mdns-browser -BUILD_AVAHI := mdns-publish-xendom mdns-publish-vnc +TARGETS := xenlog xenscreen xenwatch xenstore \ + mdns-browser mdns-publish-xendom mdns-publish-vnc \ + vnc-client +BUILD_XENSTORE := xenlog xenwatch xenstore \ + mdns-publish-xendom mdns-publish-vnc +BUILD_GTK := xenwatch xenstore mdns-browser vnc-client +BUILD_AVAHI := mdns-browser mdns-publish-xendom mdns-publish-vnc BUILD_GTK_VNC := vnc-client NEEDS_XENSTORE := xenlog xenscreen xenwatch xenstore mdns-publish-xendom mdns-publish-vnc @@ -35,29 +39,38 @@ HAVE_GTK_VNC := $(call ac_pkg_config,gtk-vnc-1.0) HAVE_XENSTORE := $(call ac_lib,xs_daemon_open,xenstore) endef - -# gtk stuff +# gtk ifeq ($(HAVE_GTK),yes) $(NEEDS_GTK) : CFLAGS += -Wno-strict-prototypes $(NEEDS_GTK) : pkglst += gtk+-x11-2.0 - TARGETS += $(BUILD_GTK) - ifeq ($(HAVE_GTK_VNC),yes) - TARGETS += $(BUILD_GTK_VNC) - $(NEEDS_GTK_VNC) : pkglst += gtk-vnc-1.0 - endif +else + TARGETS := $(filter-out $(BUILD_GTK), $(TARGETS)) +endif + +# gtk-vnc +ifeq ($(HAVE_GTK_VNC),yes) + $(NEEDS_GTK_VNC) : pkglst += gtk-vnc-1.0 +else + TARGETS := $(filter-out $(BUILD_GTK_VNC), $(TARGETS)) endif -# avahi stuff +# avahi ifeq ($(HAVE_AVAHI),yes) - $(NEEDS_AVAHI) : pkglst += avahi-client - $(NEEDS_GTK) : pkglst += avahi-glib - TARGETS += $(BUILD_AVAHI) + $(NEEDS_AVAHI) : pkglst += avahi-client avahi-glib +else + TARGETS := $(filter-out $(BUILD_AVAHI), $(TARGETS)) endif -# libvirt stuff +# xenstore +ifeq ($(HAVE_XENSTORE),yes) + $(NEEDS_XENSTORE) : LDLIBS += -lxenstore +else + TARGETS := $(filter-out $(BUILD_XENSTORE), $(TARGETS)) +endif + +# libvirt ifeq ($(HAVE_LIBVIRT),yes) $(NEEDS_LIBVIRT) : pkglst += libvirt libxml-2.0 - TARGETS += $(BUILD_LIBVIRT) endif # compile flags @@ -65,13 +78,6 @@ CFLAGS += $(call ac_inc_cflags,XENSTORE LIBVIRT AVAHI GTK_VNC) CFLAGS += $(shell test "$(pkglst)" != "" && pkg-config --cflags $(pkglst)) LDLIBS += $(shell test "$(pkglst)" != "" && pkg-config --libs $(pkglst)) -# xenstore -ifneq ($(XENSRC),) - $(NEEDS_XENSTORE) : CFLAGS += -I $(XENSRC)/dist/install/usr/include - $(NEEDS_XENSTORE) : LDLIBS += -I $(XENSRC)/dist/install/usr/$(LIB) -endif -$(NEEDS_XENSTORE) : LDLIBS += -lxenstore - ######################################################################## # rules |