Commit | Line | Data |
---|---|---|
18c831dc MW |
1 | ### -*-makefile-*- |
2 | ### | |
3 | ### Build script for hashing | |
4 | ### | |
5 | ### (c) 2009 Straylight/Edgeware | |
6 | ### | |
7 | ||
8 | ###----- Licensing notice --------------------------------------------------- | |
9 | ### | |
10 | ### This file is part of the mLib utilities library. | |
11 | ### | |
12 | ### mLib is free software; you can redistribute it and/or modify | |
13 | ### it under the terms of the GNU Library General Public License as | |
14 | ### published by the Free Software Foundation; either version 2 of the | |
15 | ### License, or (at your option) any later version. | |
16 | ### | |
17 | ### mLib is distributed in the hope that it will be useful, | |
18 | ### but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | ### GNU Library General Public License for more details. | |
21 | ### | |
22 | ### You should have received a copy of the GNU Library General Public | |
23 | ### License along with mLib; if not, write to the Free | |
24 | ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, | |
25 | ### MA 02111-1307, USA. | |
26 | ||
27 | include $(top_srcdir)/vars.am | |
28 | ||
29 | noinst_LTLIBRARIES = libhash.la | |
30 | libhash_la_SOURCES = | |
b012588c | 31 | nodist_libhash_la_SOURCES = |
18c831dc MW |
32 | libhash_la_LIBADD = |
33 | ||
34 | ###-------------------------------------------------------------------------- | |
35 | ### Component files. | |
36 | ||
37 | ## CRC32. | |
38 | pkginclude_HEADERS += crc32.h | |
39 | libhash_la_SOURCES += crc32.c | |
c4ccbbf9 | 40 | EXTRA_DIST += crc32.3.in |
18c831dc MW |
41 | LIBMANS += crc32.3 |
42 | ||
43 | bin_PROGRAMS += crc-mktab | |
44 | crc_mktab_SOURCES = crc-mktab.c | |
45 | crc_mktab_LDADD = $(UTIL_LIBS) | |
c4ccbbf9 | 46 | EXTRA_DIST += crc-mktab.1.in |
18c831dc MW |
47 | PROGMANS += crc-mktab.1 |
48 | ||
b012588c | 49 | nodist_libhash_la_SOURCES += ../precomp/crc32-tab.c |
173ff44a MW |
50 | PRECOMPS += $(precomp)/crc32-tab.c |
51 | if !CROSS_COMPILING | |
52 | $(precomp)/crc32-tab.c: | |
53 | @$(mkdir_p) $(precomp) | |
06fc8e0b | 54 | @$(MAKE) crc-mktab$(EXEEXT) |
3ac6fc5f | 55 | $(AM_V_GEN)./crc-mktab -o $@.new \ |
f31dd6cd | 56 | -p0x04c11db7 -b32 -B8 -r -cC \ |
18c831dc MW |
57 | -scrc32_table -icrc32.h -tuint32 && \ |
58 | mv $@.new $@ | |
173ff44a | 59 | endif |
18c831dc | 60 | |
7cf5c72a MW |
61 | EXTRA_DIST += t/crc32.tests |
62 | ||
18c831dc MW |
63 | ## Universal hashing. |
64 | pkginclude_HEADERS += unihash.h | |
65 | noinst_LTLIBRARIES += libunihash.la | |
66 | libunihash_la_SOURCES = unihash.c | |
67 | libhash_la_LIBADD += libunihash.la | |
c4ccbbf9 | 68 | EXTRA_DIST += unihash.3.in |
18c831dc MW |
69 | LIBMANS += unihash.3 |
70 | ||
71 | bin_PROGRAMS += unihash-mkstatic | |
72 | unihash_mkstatic_SOURCES = unihash-mkstatic.c | |
73 | unihash_mkstatic_LDADD = libunihash.la $(UTIL_LIBS) | |
c4ccbbf9 | 74 | EXTRA_DIST += unihash-mkstatic.1.in |
18c831dc MW |
75 | PROGMANS += unihash-mkstatic.1 |
76 | ||
b012588c | 77 | nodist_libhash_la_SOURCES += ../precomp/unihash-global.c |
173ff44a MW |
78 | PRECOMPS += $(precomp)/unihash-global.c |
79 | if !CROSS_COMPILING | |
80 | $(precomp)/unihash-global.c: | |
81 | @$(mkdir_p) $(precomp) | |
06fc8e0b | 82 | @$(MAKE) unihash-mkstatic$(EXEEXT) |
3ac6fc5f MW |
83 | $(AM_V_GEN)./unihash-mkstatic -c -sunihash_global -iunihash.h \ |
84 | -o$@.new && mv $@.new $@ | |
173ff44a | 85 | endif |
18c831dc | 86 | |
c81c35df | 87 | EXTRA_DIST += t/unihash-testgen |
18c831dc | 88 | |
b64eb60f MW |
89 | ## Test program. |
90 | check_PROGRAMS += t/hash.t | |
91 | t_hash_t_SOURCES = t/hash-test.c | |
92 | t_hash_t_CPPFLAGS = $(TEST_CPPFLAGS) | |
93 | t_hash_t_LDFLAGS = -static | |
94 | ||
18c831dc | 95 | ###----- That's all, folks -------------------------------------------------- |