|
Revision 6048, 0.7 KB
(checked in by khali, 13 months ago)
|
|
i2c-dev: Move SMBus helper functions to include/i2c/smbus.h
|
| Line | |
|---|
| 1 | # Python bindings for Linux SMBus access through i2c-dev |
|---|
| 2 | # |
|---|
| 3 | # Copyright (C) 2009 Mike Frysinger <vapier@gentoo.org> |
|---|
| 4 | # |
|---|
| 5 | # This program is free software; you can redistribute it and/or modify |
|---|
| 6 | # it under the terms of the GNU General Public License as published by |
|---|
| 7 | # the Free Software Foundation; either version 2 of the License, or |
|---|
| 8 | # (at your option) any later version. |
|---|
| 9 | |
|---|
| 10 | PY_SMBUS_DIR := py-smbus |
|---|
| 11 | |
|---|
| 12 | PYTHON ?= python |
|---|
| 13 | DISTUTILS := \ |
|---|
| 14 | cd $(PY_SMBUS_DIR) && \ |
|---|
| 15 | CPPFLAGS="$(CPPFLAGS) -I../include" $(PYTHON) setup.py |
|---|
| 16 | |
|---|
| 17 | all-python: $(INCLUDE_DIR)/i2c/smbus.h |
|---|
| 18 | $(DISTUTILS) build |
|---|
| 19 | |
|---|
| 20 | clean-python: |
|---|
| 21 | $(DISTUTILS) clean |
|---|
| 22 | rm -rf py-smbus/build |
|---|
| 23 | |
|---|
| 24 | install-python: |
|---|
| 25 | $(DISTUTILS) install |
|---|
| 26 | |
|---|
| 27 | all: all-python |
|---|
| 28 | |
|---|
| 29 | clean: clean-python |
|---|
| 30 | |
|---|
| 31 | install: install-python |
|---|