Browse Source

Integrate py-smbus into the build system. Patch from Mike Frysinger.

git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5608 7894878c-1315-0410-8ee3-d5d059ff63e0
tags/v3.0.3
Jean Delvare 17 years ago
parent
commit
4f13b76ddd
  1. 8
      Makefile
  2. 5
      README
  3. 31
      py-smbus/Module.mk

8
Makefile

@ -34,7 +34,7 @@ KERNELVERSION := $(shell uname -r)
all: all:
include eeprom/Module.mk
include include/Module.mk
include stub/Module.mk
include tools/Module.mk
EXTRA :=
#EXTRA += py-smbus
SRCDIRS := eeprom include stub tools $(EXTRA)
include $(SRCDIRS:%=%/Module.mk)

5
README

@ -50,6 +50,11 @@ Optionally, you can run "make strip" prior to "make install" if you want
smaller binaries. However, be aware that this will prevent any further smaller binaries. However, be aware that this will prevent any further
attempt to debug the programs. attempt to debug the programs.
If you wish to include sub-directories that are not enabled by default, then
just set them via the EXTRA make variable. For example, to build py-smbus,
do:
$ make EXTRA="py-smbus"
DOCUMENTATION DOCUMENTATION
------------- -------------

31
py-smbus/Module.mk

@ -0,0 +1,31 @@
# Python bindings for Linux SMBus access through i2c-dev
#
# Copyright (C) 2009 Mike Frysinger <vapier@gentoo.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
PY_SMBUS_DIR := py-smbus
PYTHON ?= python
DISTUTILS := \
cd $(PY_SMBUS_DIR) && \
CPPFLAGS="$(CPPFLAGS) -I../include" $(PYTHON) setup.py
all-python:
$(DISTUTILS) build
clean-python:
$(DISTUTILS) clean
rm -rf py-smbus/build
install-python:
$(DISTUTILS) install
all: all-python
clean: clean-python
install: install-python
Loading…
Cancel
Save