#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# See which LLVM we're building against.
LLVM_CONFIG = $(lastword $(wildcard /usr/bin/llvm-config*))
LLVM_VERSION = $(shell echo $(LLVM_CONFIG) | sed -e 's/^.*llvm-config-//')
LLVM_PREFIX = $(shell test ! -d /usr/lib/llvm-$(LLVM_VERSION)/bin || echo "--with-tool-prefix=/usr/lib/llvm-$(LLVM_VERSION)/bin")

%:
	dh $@ 

override_dh_auto_configure:
	dh_auto_configure -- --enable-release --enable-warnings $(LLVM_PREFIX)

override_dh_compress:
	dh_compress -X.pure -X.purerc -X.dsp -X.el -X.lang -X.py -X.xml -X.cats -X.dats -X.sats
