Skip to content

Commit bc481f9

Browse files
author
ScR4tCh
committed
- merged pull request r10r#11
- merged pull request r10r#3 - changed swig interface - changed Makefile - added codesend/codesendi utility - added setup.py
1 parent 2c9c027 commit bc481f9

File tree

13 files changed

+4827
-728
lines changed

13 files changed

+4827
-728
lines changed

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
11
*.o
2+
*~
3+
*.so
4+
*.cxx
5+
\#*
6+
rcswitch.py
7+
*.pyc
8+
.cproject
9+
.directory
10+
.project
11+
.pydevproject
12+
.settings

Makefile

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
1-
all: send
1+
CXXFLAGS=-O2 -fPIC
2+
3+
all: _rcswitch.so send codesend icodesend
4+
5+
rcswitch_wrap.cxx: RCSwitch.h rcswitch.i
6+
swig -c++ -python rcswitch.i
7+
8+
rcswitch_wrap.o: rcswitch_wrap.cxx
9+
$(CXX) $(CXXFLAGS) -c $+ -o $@ -I/usr/include/python2.7
10+
11+
_rcswitch.so: rcswitch_wrap.o RCSwitch.o
12+
$(CXX) -shared $(LDFLAGS) $+ -o $@ -lwiringPi
213

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

17+
codesend: RCSwitch.o codesend.o
18+
$(CXX) $(CXXFLAGS) $(LDFLAGS) $+ -o $@ -lwiringPi
19+
20+
icodesend: RCSwitch.o icodesend.o
21+
$(CXX) $(CXXFLAGS) $(LDFLAGS) $+ -o $@ -lwiringPi
22+
623
clean:
7-
$(RM) *.o send
24+
$(RM) *.o *.so *.pyc *.cxx send
25+
26+
install:
27+
mkdir -p /usr/lib/python2.7/dist-packages
28+
cp rcswitch.py /usr/lib/python2.7/dist-packages
29+
cp _rcswitch.so /usr/lib/python2.7/dist-packages

0 commit comments

Comments
 (0)