@@@ much mess, mostly manpages
[mLib] / hash / Makefile.am
CommitLineData
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
27include $(top_srcdir)/vars.am
28
29noinst_LTLIBRARIES = libhash.la
30libhash_la_SOURCES =
b012588c 31nodist_libhash_la_SOURCES =
18c831dc
MW
32libhash_la_LIBADD =
33
34###--------------------------------------------------------------------------
35### Component files.
36
37## CRC32.
38pkginclude_HEADERS += crc32.h
39libhash_la_SOURCES += crc32.c
c4ccbbf9 40EXTRA_DIST += crc32.3.in
18c831dc
MW
41LIBMANS += crc32.3
42
43bin_PROGRAMS += crc-mktab
44crc_mktab_SOURCES = crc-mktab.c
45crc_mktab_LDADD = $(UTIL_LIBS)
c4ccbbf9 46EXTRA_DIST += crc-mktab.1.in
18c831dc
MW
47PROGMANS += crc-mktab.1
48
b012588c 49nodist_libhash_la_SOURCES += ../precomp/crc32-tab.c
173ff44a
MW
50PRECOMPS += $(precomp)/crc32-tab.c
51if !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 59endif
18c831dc 60
7cf5c72a
MW
61EXTRA_DIST += t/crc32.tests
62
18c831dc
MW
63## Universal hashing.
64pkginclude_HEADERS += unihash.h
65noinst_LTLIBRARIES += libunihash.la
66libunihash_la_SOURCES = unihash.c
67libhash_la_LIBADD += libunihash.la
c4ccbbf9 68EXTRA_DIST += unihash.3.in
18c831dc
MW
69LIBMANS += unihash.3
70
71bin_PROGRAMS += unihash-mkstatic
72unihash_mkstatic_SOURCES = unihash-mkstatic.c
73unihash_mkstatic_LDADD = libunihash.la $(UTIL_LIBS)
c4ccbbf9 74EXTRA_DIST += unihash-mkstatic.1.in
18c831dc
MW
75PROGMANS += unihash-mkstatic.1
76
b012588c 77nodist_libhash_la_SOURCES += ../precomp/unihash-global.c
173ff44a
MW
78PRECOMPS += $(precomp)/unihash-global.c
79if !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 85endif
18c831dc 86
c81c35df 87EXTRA_DIST += t/unihash-testgen
18c831dc 88
b64eb60f
MW
89## Test program.
90check_PROGRAMS += t/hash.t
91t_hash_t_SOURCES = t/hash-test.c
92t_hash_t_CPPFLAGS = $(TEST_CPPFLAGS)
93t_hash_t_LDFLAGS = -static
94
18c831dc 95###----- That's all, folks --------------------------------------------------