File: crc

package info (click to toggle)
gnulib 20260109-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 165,988 kB
  • sloc: ansic: 391,363; sh: 30,873; python: 8,397; cpp: 2,985; yacc: 1,846; perl: 920; makefile: 631; lisp: 328; sed: 11; java: 5
file content (53 lines) | stat: -rw-r--r-- 1,497 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Description:
Compute cyclic redundancy codes.

Files:
lib/crc.h
lib/crc.c
lib/crc-generate-table.c
m4/crc.m4
m4/build-cc.m4

Depends-on:
stdint-h
endian

configure.ac:
AC_REQUIRE([gl_CRC_SLICE_BY_8])
gl_BUILD_CC
AC_PROG_MKDIR_P

Makefile.am:
lib_SOURCES += crc.c

# Generate crc-sliceby8.h.
# Use a native compiler when cross-compiling.
# Don't use any Gnulib modules (since libgnu.a will only be available after
# this directory is built!).  Therefore, don't use any of the Automake variables
# $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(AM_CFLAGS)
# $(AM_LDFLAGS).  And do the compilation in a temporary directory, where
# gnulib-generated stdio.h and stdlib.h files are not visible.
$(srcdir)/crc-sliceby8.h: $(srcdir)/crc-generate-table.c
	$(AM_V_GEN)if test -n '$(BUILD_CC)'; then \
	  $(MKDIR_P) '%reldir%/crc-tmp' \
	  && abs_srcdir=`cd $(srcdir)/. && pwd` \
	  && (cd '%reldir%/crc-tmp' \
	      && $(BUILD_CC) $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o crc-generate-table $$abs_srcdir/crc-generate-table.c) \
	  && '%reldir%/crc-tmp/crc-generate-table' $(srcdir)/crc-sliceby8.h-t \
	  && rm -rf '%reldir%/crc-tmp' \
	  && mv $(srcdir)/crc-sliceby8.h-t $(srcdir)/crc-sliceby8.h; \
	fi
BUILT_SOURCES        += crc-sliceby8.h
MOSTLYCLEANFILES     += crc-sliceby8.h-t crc-tmp/crc-generate-table
MOSTLYCLEANDIRS      += crc-tmp
MAINTAINERCLEANFILES += crc-sliceby8.h
EXTRA_DIST           += crc-sliceby8.h

Include:
"crc.h"

License:
LGPL

Maintainer:
Simon Josefsson