diff --git a/light8/Makefile b/light8/Makefile --- a/light8/Makefile +++ b/light8/Makefile @@ -1,14 +1,23 @@ LIB=/usr/local/lib +INC=-I/usr/local/include/python2.2 -go: parportmodule.so +go: parportmodule.so FlyingFader.py serportmodule.so + result="your modules and links are now up to date" + +FlyingFader.py: ln -s ../Widgets/FlyingFader.py - sudo python pypar parportmodule.so: parport_wrap.c - gcc -shared -I/usr/local/include/python2.2 parport_wrap.c parport.c -o parportmodule.so + gcc -shared ${INC} parport_wrap.c parport.c -o parportmodule.so parport_wrap.c: parport.c parport.i swig -python parport.i +serportmodule.so: serport_wrap.c + gcc -shared -O ${INC} serport_wrap.c -o serportmodule.so + +serport_wrap.c: serport.i + swig -python serport.i + clean: - rm -f parport_wrap.c *.o *.so + rm -f parport_wrap.c serport_wrap.c *.o *.so diff --git a/light8/serport.i b/light8/serport.i --- a/light8/serport.i +++ b/light8/serport.i @@ -34,10 +34,6 @@ #define CHAN_TO_TUPLE_POS(chan,idx) i2c_smbus_write_byte(file, chan);\ PyTuple_SetItem(t,idx,PyInt_FromLong(i2c_smbus_read_byte(file))); - /* - these are shuffled here to match the way the pots read in. in - the returned tuple, 0=left pot..3=right pot. - */ CHAN_TO_TUPLE_POS(1,0) CHAN_TO_TUPLE_POS(2,1) CHAN_TO_TUPLE_POS(3,2)