File: Makefile.am

package info (click to toggle)
libmurmurhash 1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 204 kB
  • sloc: ansic: 935; makefile: 46; sh: 9
file content (53 lines) | stat: -rw-r--r-- 1,406 bytes parent folder | download
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
lib_LTLIBRARIES  = libmurmurhash.la

libmurmurhashdir=$(includedir)
libmurmurhash_HEADERS= murmurhash.h
libmurmurhash_la_SOURCES = PMurHash.c murmurhash.c PMurHash.h
libmurmurhash_la_LDFLAGS = -version-info @LIB_VERSION@

libmurmurhash_la_CPPFLAGS = $(INCLUDES)


pkgconfigdir=$(libdir)/pkgconfig
pkgconfig_DATA = libmurmurhash.pc


## checks
mmh.o: test/mmh.c
	$(CC) -I. $(CPPFLAGS) $(CFLAGS) -c -o $@ $^

mmh_old.o: test/mmh_old.c
	$(CC) -I. $(CPPFLAGS) $(CFLAGS) -c -o $@ $^

MurmurHash3.o: test/MurmurHash3.c test/MurmurHash3.h
	$(CC) -I. $(CPPFLAGS) $(CFLAGS) -c -o $@ test/MurmurHash3.c

# new interface, static linking
mmh: mmh.o libmurmurhash.la
	$(CC) $(CFLAGS) -o $@ mmh.o .libs/libmurmurhash.a # -L.libs -lmurmurhash

# new interface, dynamic linking
mmh_dyn: test/mmh.c
	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^ -lmurmurhash

# old interface, static linking
mmh_old: mmh_old.o libmurmurhash.la
	$(CC) $(CFLAGS) -o $@ mmh_old.o .libs/libmurmurhash.a # -L.libs -lmurmurhash

# old interface, reference implementation
mmh_ref: mmh_old.o MurmurHash3.o
	$(CC) $(CFLAGS) -o $@ $^

check: mmh mmh_old mmh_ref
	diff test/almostempty.hash <(./mmh test/almostempty)
	diff test/almostempty.hash <(./mmh_old test/almostempty)

# should be checked after installation!
check-dynamic: mmh_dyn
	diff test/almostempty.hash <(./mmh_dyn test/almostempty)

## misc

format:
	clang-format -i *.c *.h test/*.c test/*.h