Home | History | Annotate | Line # | Download | only in hello-csharp
      1 # Example for use of GNU gettext.
      2 # Copyright (C) 2003, 2006 Free Software Foundation, Inc.
      3 # This file is in the public domain.
      4 #
      5 # Makefile configuration - processed by automake.
      6 
      7 # General automake options.
      8 AUTOMAKE_OPTIONS = foreign
      9 ACLOCAL_AMFLAGS = -I m4
     10 
     11 # The list of subdirectories containing Makefiles.
     12 SUBDIRS = m4 po
     13 
     14 # The list of programs that are built.
     15 bin_CSHARPPROGRAMS = hello
     16 
     17 # The source files of the 'hello' program.
     18 hello_SOURCES = hello.cs
     19 
     20 # The link dependencies of the 'hello' program.
     21 hello_CSHARPLIBS = @GNU_GETTEXT_LDADD@ @GNU_GETTEXT_LIBS@ -l System
     22 
     23 # Resources that are generated from PO files.
     24 MAINTAINERCLEANFILES = */*.resources.dll
     25 
     26 # Additional files to be distributed.
     27 EXTRA_DIST = autogen.sh autoclean.sh
     28 
     29 
     30 # ----------------- General rules for compiling C# programs -----------------
     31 
     32 pkgdatadir = $(datadir)/$(PACKAGE)
     33 pkglibdir = $(libdir)/$(PACKAGE)
     34 
     35 CSHARPCOMP = $(SHELL) csharpcomp.sh
     36 CSHARPCOMPFLAGS = -O -g
     37 
     38 EXTRA_DIST += $(hello_SOURCES)
     39 CLEANFILES =
     40 DISTCLEANFILES = csharpcomp.sh csharpexec.sh
     41 
     42 
     43 # Rules for compiling C# programs.
     44 
     45 all-local: hello.net.exe hello.sh
     46 
     47 hello.net.exe: $(hello_SOURCES)
     48 	$(CSHARPCOMP) $(CSHARPCOMPFLAGS) -o $@ $(hello_CSHARPLIBS) $(srcdir)/hello.cs
     49 
     50 hello.sh:
     51 	{ echo '#!/bin/sh'; \
     52 	  echo "exec /bin/sh '$(pkgdatadir)/csharpexec.sh' @GNU_GETTEXT_LDADD@ '$(pkglibdir)/hello.net.exe' \"\$$@\""; \
     53 	} > $@
     54 
     55 install-exec-local: all-local
     56 	$(mkdir_p) $(DESTDIR)$(bindir)
     57 	$(INSTALL_SCRIPT) hello.sh $(DESTDIR)$(bindir)/hello
     58 	$(mkdir_p) $(DESTDIR)$(pkglibdir)
     59 	$(INSTALL_DATA) hello.net.exe $(DESTDIR)$(pkglibdir)/hello.net.exe
     60 
     61 install-data-local: all-local
     62 	$(mkdir_p) $(DESTDIR)$(pkgdatadir)
     63 	$(INSTALL_DATA) csharpexec.sh $(DESTDIR)$(pkgdatadir)/csharpexec.sh
     64 
     65 installdirs-local:
     66 	$(mkdir_p) $(DESTDIR)$(bindir)
     67 	$(mkdir_p) $(DESTDIR)$(pkglibdir)
     68 	$(mkdir_p) $(DESTDIR)$(pkgdatadir)
     69 
     70 uninstall-local:
     71 	rm -f $(DESTDIR)$(bindir)/hello
     72 	rm -f $(DESTDIR)$(pkglibdir)/hello.net.exe
     73 	rm -f $(DESTDIR)$(pkgdatadir)/csharpexec.sh
     74 
     75 CLEANFILES += hello.net.exe hello.sh
     76