1 2# We need to install the .config file ourselves because of a gacutil 3# bug (https://bugzilla.novell.com/show_bug.cgi?id=363341) 4monodir = $(libdir)/mono/caca-sharp-0.0 5if USE_CSHARP 6noinst_DATA = caca-sharp.dll caca-sharp.dll.config test.exe 7endif 8 9caca_sources = \ 10 $(srcdir)/AssemblyInfo.cs \ 11 $(srcdir)/Caca.cs \ 12 $(srcdir)/Attr.cs \ 13 $(srcdir)/Canvas.cs \ 14 $(srcdir)/Display.cs \ 15 $(srcdir)/Dither.cs \ 16 $(srcdir)/Event.cs \ 17 $(srcdir)/Font.cs 18 19test_sources = \ 20 $(srcdir)/test.cs 21 22EXTRA_DIST = $(caca_sources) $(test_sources) \ 23 caca-sharp.snk caca-sharp.pc.in caca-sharp.dll.config.in \ 24 caca-sharp.csproj test-csharp.csproj 25 26caca-sharp.dll: $(caca_sources) 27 $(CSC) -debug -unsafe $(caca_sources) -out:$@ -target:library \ 28 -keyfile:$(srcdir)/caca-sharp.snk -r:System.Drawing.dll 29 30test.exe: $(test_sources) caca-sharp.dll 31 $(CSC) -debug $(test_sources) -out:$@ -lib:./ \ 32 -r:System.Drawing.dll -r:./caca-sharp.dll 33 34if USE_CSHARP 35install-data-local: 36 MONO_SHARED_DIR=$$HOME $(GACUTIL) -i caca-sharp.dll \ 37 -package caca-sharp-0.0 -f -root $(DESTDIR)$(libdir) 38 $(mkinstalldirs) $(DESTDIR)$(monodir) 39 sed -e 's@target="[^"]*/@target="@' < caca-sharp.dll.config > $(DESTDIR)$(monodir)/caca-sharp.dll.config 40 41uninstall-local: 42 MONO_SHARED_DIR=$$HOME $(GACUTIL) -u caca-sharp.dll, Version=0.0 \ 43 -package caca-sharp-0.0 || true 44 rm -f $(DESTDIR)$(monodir)/caca-sharp.dll.config 45 rmdir $(DESTDIR)$(monodir) 2>/dev/null || true 46endif 47 48clean-local: 49 rm -f *.exe *.dll *.mdb 50 51