## python/Makefile
##
##    AudioScience HPI driver
##    Copyright (C) 1997-2017  AudioScience Inc. <support@audioscience.com>
##
##    This program is free software; you can redistribute it and/or modify
##    it under the terms of version 2 of the GNU General Public License as
##    published by the Free Software Foundation;
##
##    This program is distributed in the hope that it will be useful,
##    but WITHOUT ANY WARRANTY; without even the implied warranty of
##    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
##    GNU General Public License for more details.
##

abs-thisdir := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))

.DEFAULT_GOAL := all

-include build_overrides.mk
# hpi_version.mk must exist
include hpi_version.mk
# Include dist file lists
include distfiles.mk

precious-files = build_overrides.mk
precious-files += $(setup-files)

all: setup

setup: $(setup-files)

build install: setup
	python setup.py $(OPTS) $@ $(CMD_OPTS)

clean distclean:
	rm -rf $(filter-out $(precious-files),$(wildcard *))

.PHONY: all setup build install dist clean distclean
