updates.
[silc.git] / Makefile.am
1 #
2 #  Makefile.am
3 #
4 #  Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
5 #
6 #  Copyright (C) 2000 - 2001 Pekka Riikonen
7 #
8 #  This program is free software; you can redistribute it and/or modify
9 #  it under the terms of the GNU General Public License as published by
10 #  the Free Software Foundation; either version 2 of the License, or
11 #  (at your option) any later version.
12 #
13 #  This program is distributed in the hope that it will be useful,
14 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 #  GNU General Public License for more details.
17 #
18
19 AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign
20
21 SUBDIRS = lib silcd silc doc includes
22
23 dist-bzip: distdir
24         -chmod -R a+r $(distdir)
25         -$(TAR) chof $(distdir).tar $(distdir)
26         -bzip2 $(distdir).tar
27         -rm -rf $(distdir)
28
29 EXTRA_DIST = CHANGES CREDITS
30
31 #
32 # Installing of SILC into the system
33 #
34
35 modulesdir = $(prefix)/@MODULESDIR@
36 helpdir = $(prefix)/@HELPDIR@
37 docdir = $(prefix)/@DOCDIR@
38 etcdir = @ETCDIR@
39
40 install-dirs:
41         -mkdir -p $(etcdir)
42         -mkdir -p $(modulesdir)
43         -mkdir -p $(helpdir)
44         -mkdir -p $(docdir)
45
46 generate-server-key:
47         -$(sbindir)/silcd -C $(etcdir)
48
49 sim-install:
50         -cp -fR $(srcdir)/lib/silcsim/modules/*.so $(modulesdir)/
51
52 doc-install:
53         $(INSTALL_DATA) $(srcdir)/doc/* $(docdir)/
54         $(INSTALL_DATA) $(srcdir)/COPYING $(docdir)/
55         $(INSTALL_DATA) $(srcdir)/README $(docdir)/
56         $(INSTALL_DATA) $(srcdir)/INSTALL $(docdir)/
57         $(INSTALL_DATA) $(srcdir)/TODO $(docdir)/
58
59 etc-install:
60         -@if test '!' -f $(etcdir)/silcd.conf ; then \
61           $(INSTALL_DATA) $(srcdir)/doc/example_silcd.conf \
62           $(etcdir)/silcd.conf; \
63         fi
64         -@if test '!' -f $(etcdir)silc.conf ; then \
65           $(INSTALL_DATA) $(srcdir)/doc/example_silc.conf \
66           $(etcdir)/silc.conf; \
67         fi
68
69 install-data-hook: install-dirs generate-server-key sim-install doc-install etc-install