source: libcaca/trunk/caca-sharp/Makefile.am @ 3511

Last change on this file since 3511 was 3160, checked in by Sam Hocevar, 12 years ago

caca-sharp: improve install and uninstall rules, add a strong name key
to allow third-party applications to link with caca-sharp, and tune a
few things here and there.

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