Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 export DH_VERBOSE = 1
4 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
5 export DEB_TARGET_MULTIARCH ?= $(shell dpkg-architecture -qDEB_TARGET_MULTIARCH)
6
7 CC=gcc
8 CFLAGS=-std=gnu99 $(shell dpkg-buildflags --get CFLAGS) \
9 -Wall -D TB_NO_THREADS -D TB_NO_HW_POP_COUNT -I.. $(CPPFLAGS)
10
11 %:
12 dh $@
13
14 override_dh_auto_build: fathom
15
16 override_dh_auto_install:
17 dh_auto_install
18 install -d debian/tmp/usr/lib/$(DEB_TARGET_MULTIARCH)
19 cp --reflink=auto -a ./lib*.so debian/tmp/usr/lib/$(DEB_TARGET_MULTIARCH)
20 cp --reflink=auto -a ./lib*.so.* debian/tmp/usr/lib/$(DEB_TARGET_MULTIARCH)
21
22 override_dh_makeshlibs:
23 dh_makeshlibs -- -v1.0 -plibfathom1
24
25 override_dh_clean:
26 rm -f *.o *.a *.so.* *.so fathom
27 dh_clean
28
29 fathom: fathom.o libfathom
30 $(CC) $(LDFLAGS) -L. $< -lfathom -o $@
31
32 fathom.o: src/apps/fathom.c
33 $(CC) $(CFLAGS) -I src -c $< -o $@
34
35 libfathom.a: tbprobe.o
36 ar rcs $@ $^
37
38 tbprobe.o: src/tbprobe.c src/tbprobe.h
39 $(CC) $(CFLAGS) -fPIC -I src -c -o $@ $<
40
41 libfathom: tbprobe.o libfathom.so.1 libfathom.so
42 $(CC) $(LDFLAGS) -shared tbprobe.o -Wl,-soname,libfathom.so.1 -o libfathom.so.1.0.0
43
44 libfathom.so.1:
45 ln -s libfathom.so.1.0.0 $@
46
47 libfathom.so:
48 ln -s libfathom.so.1.0.0 $@