#!/usr/bin/make -f

# Enable SystemC on archs supported by systemc library:
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
ifneq (,$(filter amd64 arm64 i386 kfreebsd-any,$(DEB_HOST_ARCH)))
  export SYSTEMC_INCLUDE=/usr/include
  export SYSTEMC_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
endif

%:
	dh $@

override_dh_autoreconf:

override_dh_auto_configure:
	dh_auto_configure -- --prefix=/usr LDFLAGS="$(LDFLAGS) -Wl,--as-needed"

override_dh_installexamples:
	mv debian/verilator/usr/share/verilator/examples debian/verilator/usr/share/doc/verilator/

override_dh_compress:
	dh_compress -Xexamples
