Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/colorsc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'colorsc/Makefile')
-rw-r--r--colorsc/Makefile21
1 files changed, 16 insertions, 5 deletions
diff --git a/colorsc/Makefile b/colorsc/Makefile
index 3b0055b..87bfff0 100644
--- a/colorsc/Makefile
+++ b/colorsc/Makefile
@@ -1,11 +1,22 @@
+CXXFLAGS = $(shell pkg-config --cflags gdk-x11-2.0) \
+ $(shell pkg-config --cflags gstreamer-0.10) \
+ $(shell pkg-config --cflags pygtk-2.0) \
+ $(shell python-config --cflags) \
+ -fPIC
+LDFLAGS = $(shell pkg-config --libs gdk-x11-2.0) \
+ $(shell pkg-config --libs gstreamer-0.10) \
+ $(shell pkg-config --libs pygtk-2.0) \
+ $(shell python-config --libs)
+
all: _colorsc.so
clean:
- rm -rf _colorsc.so *_wrap.cxx colorsc.py colorsc.pyc build
+ rm -rf _colorsc.so colorsc.cpp colorsc.py colorsc.pyc *.o
-%_wrap.cxx: %.i
- swig -c++ -python $<
+%.cpp: %.i
+ swig -c++ -python -o $*.cpp $<
-_colorsc.so: colorsc_wrap.cxx colorsc.h canvas.h canvas.cpp
- python setup.py build_ext --inplace
+canvas.o: colorsc.h canvas.h
+_colorsc.so: colorsc.o canvas.o
+ $(CXX) -shared $(LDFLAGS) -o $@ $^