diff options
author | kraxel <kraxel> | 2006-01-26 16:27:01 +0000 |
---|---|---|
committer | kraxel <kraxel> | 2006-01-26 16:27:01 +0000 |
commit | 8cefbcf1e028004efa70f2f1956fbc9d25c8b372 (patch) | |
tree | 03331d899793e543d06e6e3239bf67981ccae1a1 /GNUmakefile | |
parent | 2bc71f882724947307fadcf5f3c7cee81191acb2 (diff) | |
download | xenwatch-8cefbcf1e028004efa70f2f1956fbc9d25c8b372.tar.gz |
- more mdns bits.
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/GNUmakefile b/GNUmakefile index 5289274..57fa683 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -7,7 +7,12 @@ CFLAGS += -DVERSION='"$(VERSION)"' # build TARGETS := xenlog -GTK_TARGETS := xenwatch +BUILD_GTK := xenwatch mdns-browser +BUILD_MDNS := mdns-publish-xendom + +NEEDS_XENSTORE := xenlog xenwatch mdns-publish-xendom +NEEDS_GTK := xenwatch mdns-browser +NEEDS_MDNS := xenwatch mdns-browser mdns-publish-xendom # default target all: build @@ -26,22 +31,29 @@ endef # gtk stuff ifeq ($(HAVE_GTK),yes) - pkgs := gtk+-x11-2.0 - ifeq ($(HAVE_AVAHI),yes) - CFLAGS += -DHAVE_AVAHI=1 - pkgs += avahi-glib avahi-client - endif - $(GTK_TARGETS) : CFLAGS += $(shell pkg-config --cflags $(pkgs)) -Wno-strict-prototypes - $(GTK_TARGETS) : LDLIBS += $(shell pkg-config --libs $(pkgs)) - TARGETS += $(GTK_TARGETS) + $(NEEDS_GTK) : CFLAGS += -Wno-strict-prototypes + $(NEEDS_GTK) : pkglst += gtk+-x11-2.0 + TARGETS += $(BUILD_GTK) +endif + +# avahi stuff +ifeq ($(HAVE_AVAHI),yes) + $(NEEDS_MDNS) : CFLAGS += -DHAVE_AVAHI=1 + $(NEEDS_MDNS) : pkglst += avahi-client + $(NEEDS_GTK) : pkglst += avahi-glib + TARGETS += $(BUILD_MDNS) endif +# pkg-config flags +CFLAGS += $(shell test "$(pkglst)" != "" && pkg-config --cflags $(pkglst)) +LDLIBS += $(shell test "$(pkglst)" != "" && pkg-config --libs $(pkglst)) + # xenstore ifneq ($(XENSRC),) - CFLAGS += -I $(XENSRC)/dist/install/usr/include - LDLIBS += -I $(XENSRC)/dist/install/usr/$(LIB) + $(NEEDS_XENSTORE) : CFLAGS += -I $(XENSRC)/dist/install/usr/include + $(NEEDS_XENSTORE) : LDLIBS += -I $(XENSRC)/dist/install/usr/$(LIB) endif -LDLIBS += -lxenstore +$(NEEDS_XENSTORE) : LDLIBS += -lxenstore ######################################################################## @@ -62,9 +74,10 @@ realclean distclean: clean ############################################# -xenwatch: xenwatch.o xs_view.o xs_store.o xd_view.o xd_store.o tcp.o mdns.o - xenlog: xenlog.o +xenwatch: xenwatch.o xs_view.o xs_store.o xd_view.o xd_store.o tcp.o mdns.o +mdns-browser: mdns-browser.o mdns.o +mdns-publish-xendom: mdns-publish-xendom.o include mk/Compile.mk include mk/Maintainer.mk |