]> git.meshlink.io Git - catta/blobdiff - avahi-sharp/Makefile.am
integrate mono bindings into the build
[catta] / avahi-sharp / Makefile.am
index a82f4e69271b33e04d13777ad80666c4c993c74a..ffee4cde25e040ff1aaf5197c11c1635238c339d 100644 (file)
@@ -1,6 +1,9 @@
 
 
-all: avahi-sharp.dll
+ASSEMBLY = avahi-sharp.dll
+
+CLEANFILES = $(ASSEMBLY) $(ASSEMBLY).mdb
+EXTRA_DIST = $(AVAHISOURCES) avahi.snk
 
 AVAHISOURCES =                                 \
        $(srcdir)/AddressResolver.cs    \
@@ -12,9 +15,14 @@ AVAHISOURCES =                               \
        $(srcdir)/ServiceBrowser.cs     \
        $(srcdir)/ServiceResolver.cs    \
        $(srcdir)/ServiceTypeBrowser.cs \
-       Utility.cs
+       $(srcdir)/Utility.cs
+
+$(ASSEMBLY): $(AVAHISOURCES)
+       mcs -keyfile:$(srcdir)/avahi.snk -target:library -o $@ -debug $(AVAHISOURCES) -r:Mono.Posix
 
-avahi-sharp.dll: $(AVAHISOURCES)
-       mcs -target:library -o $@ -debug $(AVAHISOURCES) -r:Mono.Posix
+if HAVE_MONO
+all: $(ASSEMBLY)
 
-CLEANFILES = avahi-sharp.dll avahi-sharp.dll.mdb
+install-data-hook:
+       $(GACUTIL) /i $(ASSEMBLY) /package avahi-sharp /gacdir $(libdir) /root $(DESTDIR)$(libdir)
+endif