3 ### Build script for hashing
5 ### (c) 2009 Straylight/Edgeware
8 ###----- Licensing notice ---------------------------------------------------
10 ### This file is part of the mLib utilities library.
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.
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.
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.
27 include $(top_srcdir)/vars.am
29 noinst_LTLIBRARIES = libhash.la
33 ###--------------------------------------------------------------------------
37 pkginclude_HEADERS += crc32.h
38 libhash_la_SOURCES += crc32.c
41 bin_PROGRAMS += crc-mktab
42 crc_mktab_SOURCES = crc-mktab.c
43 crc_mktab_LDADD = $(UTIL_LIBS)
44 PROGMANS += crc-mktab.1
46 libhash_la_SOURCES += $(precomp)/crc32-tab.c
47 PRECOMPS += $(precomp)/crc32-tab.c
49 $(precomp)/crc32-tab.c:
50 @$(mkdir_p) $(precomp)
52 @$(MAKE) crc-mktab$(EXEEXT)
53 ./crc-mktab -o $@.new \
54 -p0x04c11db7 -b32 -B8 -r -c \
55 -scrc32_table -icrc32.h -tuint32 && \
60 pkginclude_HEADERS += unihash.h
61 noinst_LTLIBRARIES += libunihash.la
62 libunihash_la_SOURCES = unihash.c
63 libhash_la_LIBADD += libunihash.la
66 bin_PROGRAMS += unihash-mkstatic
67 unihash_mkstatic_SOURCES = unihash-mkstatic.c
68 unihash_mkstatic_LDADD = libunihash.la $(UTIL_LIBS)
69 PROGMANS += unihash-mkstatic.1
71 libhash_la_SOURCES += $(precomp)/unihash-global.c
72 PRECOMPS += $(precomp)/unihash-global.c
74 $(precomp)/unihash-global.c:
75 @$(mkdir_p) $(precomp)
77 @$(MAKE) unihash-mkstatic$(EXEEXT)
78 ./unihash-mkstatic -c -sunihash_global -iunihash.h -o$@.new && \
82 check_PROGRAMS += unihash.t
83 unihash_t_SOURCES = unihash.c
84 unihash_t_CPPFLAGS = $(TEST_CPPFLAGS)
85 unihash_t_LDFLAGS = -static
87 tests:: unihash.t unihash.in
88 ./unihash.t -f unihash.in
90 EXTRA_DIST += unihash-check.pl
91 CLEANFILES += unihash.in
92 unihash.in: unihash-check.pl
93 perl $(srcdir)/unihash-check.pl >$@.new && mv $@.new $@
96 ###----- That's all, folks --------------------------------------------------