File: rules

package info (click to toggle)
metrohash 1.1.3-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, trixie
  • size: 140 kB
  • sloc: cpp: 842; makefile: 16
file content (24 lines) | stat: -rwxr-xr-x 733 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
#!/usr/bin/make -f

#export DH_VERBOSE=1
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

CXXFLAGS+=-Wall -pedantic -fPIC
LDFLAGS+=-shared -Wl,-as-needed -Wl,-soname,libmetrohash.so.1

%:
	dh $@

override_dh_auto_clean:
	rm -f libmetrohash.so*

override_dh_auto_build:
	$(CXX) src/metrohash64.cpp src/metrohash128.cpp $(CXXFLAGS) $(LDFLAGS) -o libmetrohash.so.1.0
	ln -sf libmetrohash.so.1.0 libmetrohash.so.1
	ln -sf libmetrohash.so.1.0 libmetrohash.so

override_dh_auto_install:
	mkdir -p debian/tmp/usr/include/metrohash
	mkdir -p debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}
	cp src/metrohash*.h src/platform.h debian/tmp/usr/include/metrohash
	cp -d libmetrohash.so*  debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}/