updates.
[silc.git] / lib / Makefile.am.pre
1 #
2 #  Makefile.am
3 #
4 #  Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
5 #
6 #  Copyright (C) 2000 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 COMMONDIRS = \
22         contrib \
23         silccore \
24         silccrypt \
25         silcsim \
26         silcmath \
27         silcske \
28         silcutil \
29         silcclient \
30         silcsftp \
31         dotconf \
32         trq
33 #        zlib
34
35 SUBDIRS = SILC_DISTRIBUTION_SUBDIRS
36 DIST_SUBDIRS = SILC_DISTRIBUTION_SUBDIRS
37
38 # SILC Library dirs
39 SILCLIB_DIRS = \
40         contrib \
41         silccore \
42         silccrypt \
43         silcsim \
44         silcmath \
45         silcske \
46         silcutil \
47         silcsftp \
48         trq \
49         dotconf
50
51 # SILC Client Library dirs
52 SILCCLIENTLIB_DIRS = \
53         silcclient
54
55 CLEANFILES = libsilc.a libsilcclient.a
56 DISTCLEANFILES = libsilc.a libsilcclient.a
57
58 if SILC_DIST_CLIENT
59 all:  remove libsilc.a libsilcclient.a
60 else
61 if SILC_DIST_TOOLKIT
62 all:  remove libsilc.a libsilcclient.a
63 else
64 if SILC_DIST_WIN32DLL
65 all:  silc.dll silcclient.dll
66 else
67 all:  remove libsilc.a
68 endif
69 endif
70 endif
71
72 remove:
73         -rm -rf libsilc.a
74         -rm -rf libsilcclient.a
75
76 if SILC_DIST_WIN32DLL
77 # WIN32 DLL generation
78 silc.dll: libsilc.a
79         dllwrap --export-all --output-def silc.def --output-exp silc.exp \
80         --output-lib silc.lib --driver-name $(CC) --target i386-mingw32 \
81         -mno-cygwin -o silc.dll libsilc.a -lwsock32
82
83 silcclient.dll: libsilcclient.a
84         dllwrap --export-all --output-def silcclient.def \
85         --output-lib silcclient.lib --output-exp silcclient.exp \
86         --driver-name $(CC) --target i386-mingw32 \
87         -mno-cygwin -o silcclient.dll libsilcclient.a -L. -lsilc -lwsock32
88 endif
89
90 libsilc.a:
91         find $(SILCLIB_DIRS) -type f -name *.o | xargs $(AR) cru libsilc.a
92         $(RANLIB) libsilc.a
93
94 libsilcclient.a:
95         find $(SILCCLIENTLIB_DIRS) -type f -name *.o | xargs $(AR) cru libsilcclient.a
96         $(RANLIB) libsilcclient.a
97