c5cee963d51fc8982a825721a42943999d411012
[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         dotconf \
31         trq
32 #        zlib
33
34 SUBDIRS = SILC_DISTRIBUTION_SUBDIRS
35 DIST_SUBDIRS = SILC_DISTRIBUTION_SUBDIRS
36
37 # SILC Library dirs
38 SILCLIB_DIRS = \
39         contrib \
40         silccore \
41         silccrypt \
42         silcsim \
43         silcmath \
44         silcske \
45         silcutil \
46         trq \
47         dotconf
48
49 # SILC Client Library dirs
50 SILCCLIENTLIB_DIRS = \
51         silcclient
52
53 CLEANFILES = libsilc.a libsilcclient.a
54 DISTCLEANFILES = libsilc.a libsilcclient.a
55
56 if SILC_DIST_CLIENT
57 all:  remove libsilc.a libsilcclient.a
58 else
59 if SILC_DIST_TOOLKIT
60 all:  remove libsilc.a libsilcclient.a
61 else
62 if SILC_DIST_WIN32DLL
63 all:  silc.dll silcclient.dll
64 else
65 all:  remove libsilc.a
66 endif
67 endif
68 endif
69
70 remove:
71         -rm -rf libsilc.a
72         -rm -rf libsilcclient.a
73
74 if SILC_DIST_WIN32DLL
75 # WIN32 DLL generation
76 silc.dll: libsilc.a
77         dllwrap --export-all --output-def silc.def --output-exp silc.exp \
78         --output-lib silc.lib --driver-name $(CC) --target i386-mingw32 \
79         -mno-cygwin -o silc.dll libsilc.a -lwsock32
80
81 silcclient.dll: libsilcclient.a
82         dllwrap --export-all --output-def silcclient.def \
83         --output-lib silcclient.lib --output-exp silcclient.exp \
84         --driver-name $(CC) --target i386-mingw32 \
85         -mno-cygwin -o silcclient.dll libsilcclient.a -L. -lsilc -lwsock32
86 endif
87
88 libsilc.a:
89         find $(SILCLIB_DIRS) -type f -name *.o | xargs $(AR) cru libsilc.a
90         $(RANLIB) libsilc.a
91
92 libsilcclient.a:
93         find $(SILCCLIENTLIB_DIRS) -type f -name *.o | xargs $(AR) cru libsilcclient.a
94         $(RANLIB) libsilcclient.a
95