Skip to content

Commit

Permalink
- merged pull request r10r#11
Browse files Browse the repository at this point in the history
- merged pull request r10r#3
- changed swig interface
- changed Makefile
- added codesend/codesendi utility
- added setup.py
  • Loading branch information
ScR4tCh committed Sep 9, 2015
1 parent 2c9c027 commit bc481f9
Show file tree
Hide file tree
Showing 13 changed files with 4,827 additions and 728 deletions.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
*.o
*~
*.so
*.cxx
\#*
rcswitch.py
*.pyc
.cproject
.directory
.project
.pydevproject
.settings
26 changes: 24 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
all: send
CXXFLAGS=-O2 -fPIC

all: _rcswitch.so send codesend icodesend

rcswitch_wrap.cxx: RCSwitch.h rcswitch.i
swig -c++ -python rcswitch.i

rcswitch_wrap.o: rcswitch_wrap.cxx
$(CXX) $(CXXFLAGS) -c $+ -o $@ -I/usr/include/python2.7

_rcswitch.so: rcswitch_wrap.o RCSwitch.o
$(CXX) -shared $(LDFLAGS) $+ -o $@ -lwiringPi

send: RCSwitch.o send.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) $+ -o $@ -lwiringPi

codesend: RCSwitch.o codesend.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) $+ -o $@ -lwiringPi

icodesend: RCSwitch.o icodesend.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) $+ -o $@ -lwiringPi

clean:
$(RM) *.o send
$(RM) *.o *.so *.pyc *.cxx send

install:
mkdir -p /usr/lib/python2.7/dist-packages
cp rcswitch.py /usr/lib/python2.7/dist-packages
cp _rcswitch.so /usr/lib/python2.7/dist-packages
Loading

0 comments on commit bc481f9

Please sign in to comment.