summaryrefslogtreecommitdiffstats
path: root/debian/rules.d/tools/lib/lockdep/Makefile
blob: 9b66ecb9a7906d1ae5648970deee69fdd899bb86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
include $(top_rulesdir)/Makefile.inc

DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

# Catch use of missing kernel APIs early
CFLAGS += -Werror=implicit-function-declaration

MAKE_LOCKDEP := +$(MAKE) -C $(top_srcdir)/$(OUTDIR) O=$(CURDIR) V=1 \
	prefix=/usr libdir_relative=lib/$(DEB_HOST_MULTIARCH) \
	LIBLOCKDEP_VERSION=$(VERSION) \
	CONFIG_FLAGS='$(CFLAGS) $(filter -D%,$(CPPFLAGS))' LDFLAGS='$(LDFLAGS)'

unexport CFLAGS

all:
	$(MAKE_LOCKDEP)

install:
	$(MAKE_LOCKDEP) install
	mkdir -p $(DESTDIR)/usr/include
	cp -R $(top_srcdir)/$(OUTDIR)/include/liblockdep $(DESTDIR)/usr/include/
	ln -sf liblockdep.so.$(VERSION) \
		$(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/liblockdep.so