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 | |
40 | LIBMANS += crc32.3 | |
41 | ||
42 | bin_PROGRAMS += crc-mktab | |
43 | crc_mktab_SOURCES = crc-mktab.c | |
44 | crc_mktab_LDADD = $(UTIL_LIBS) | |
45 | PROGMANS += crc-mktab.1 | |
46 | ||
b012588c | 47 | nodist_libhash_la_SOURCES += ../precomp/crc32-tab.c |
173ff44a MW |
48 | PRECOMPS += $(precomp)/crc32-tab.c |
49 | if !CROSS_COMPILING | |
50 | $(precomp)/crc32-tab.c: | |
51 | @$(mkdir_p) $(precomp) | |
06fc8e0b | 52 | @$(MAKE) crc-mktab$(EXEEXT) |
3ac6fc5f | 53 | $(AM_V_GEN)./crc-mktab -o $@.new \ |
18c831dc MW |
54 | -p0x04c11db7 -b32 -B8 -r -c \ |
55 | -scrc32_table -icrc32.h -tuint32 && \ | |
56 | mv $@.new $@ | |
173ff44a | 57 | endif |
18c831dc | 58 | |
7cf5c72a MW |
59 | check_PROGRAMS += t/crc32.t |
60 | t_crc32_t_SOURCES = t/crc32-test.c | |
61 | t_crc32_t_CPPFLAGS = $(TEST_CPPFLAGS) | |
62 | t_crc32_t_LDFLAGS = -static | |
63 | ||
64 | EXTRA_DIST += t/crc32.tests | |
65 | ||
18c831dc MW |
66 | ## Universal hashing. |
67 | pkginclude_HEADERS += unihash.h | |
68 | noinst_LTLIBRARIES += libunihash.la | |
69 | libunihash_la_SOURCES = unihash.c | |
70 | libhash_la_LIBADD += libunihash.la | |
71 | LIBMANS += unihash.3 | |
72 | ||
73 | bin_PROGRAMS += unihash-mkstatic | |
74 | unihash_mkstatic_SOURCES = unihash-mkstatic.c | |
75 | unihash_mkstatic_LDADD = libunihash.la $(UTIL_LIBS) | |
76 | PROGMANS += unihash-mkstatic.1 | |
77 | ||
b012588c | 78 | nodist_libhash_la_SOURCES += ../precomp/unihash-global.c |
173ff44a MW |
79 | PRECOMPS += $(precomp)/unihash-global.c |
80 | if !CROSS_COMPILING | |
81 | $(precomp)/unihash-global.c: | |
82 | @$(mkdir_p) $(precomp) | |
06fc8e0b | 83 | @$(MAKE) unihash-mkstatic$(EXEEXT) |
3ac6fc5f MW |
84 | $(AM_V_GEN)./unihash-mkstatic -c -sunihash_global -iunihash.h \ |
85 | -o$@.new && mv $@.new $@ | |
173ff44a | 86 | endif |
18c831dc | 87 | |
7cf5c72a MW |
88 | check_PROGRAMS += t/unihash.t |
89 | t_unihash_t_SOURCES = t/unihash-test.c | |
90 | t_unihash_t_CPPFLAGS = $(TEST_CPPFLAGS) | |
91 | t_unihash_t_LDFLAGS = -static | |
18c831dc | 92 | |
7cf5c72a | 93 | EXTRA_DIST += t/unihash-testgen.py |
18c831dc MW |
94 | |
95 | ###----- That's all, folks -------------------------------------------------- |