[PATCH] trace-view: cleanup python make targets

From: Darren Hart
Date: Tue Jan 05 2010 - 11:53:12 EST


Signed-off-by: Darren Hart <dvhltc@xxxxxxxxxx>
---
Makefile | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile
index 3d17256..4826dd1 100644
--- a/Makefile
+++ b/Makefile
@@ -129,21 +129,24 @@ plugin_mac80211.so: plugin_mac80211.o
$(CC) -shared -nostartfiles -o $@ $<


-.PHONY: python
-python: $(TCMD_LIB_OBJS)
+PYTHON_INCLUDES = `python-config --includes`
+PYGTK_CFLAGS = `pkg-config --cflags pygtk-2.0`
+
+ctracecmd.so: $(TCMD_LIB_OBJS)
swig -Wall -python -noproxy ctracecmd.i
- #swig -Wall -python ctracecmd.i
- gcc -fpic -c `python-config --includes` ctracecmd_wrap.c
+ gcc -fpic -c $(PYTHON_INCLUDES) ctracecmd_wrap.c
$(CC) --shared $^ ctracecmd_wrap.o -o ctracecmd.so
- #$(CC) --shared $^ ctracecmd_wrap.o -o _ctracecmd.so

-.PHONY: python-gui
-python-gui: $(TRACE_VIEW_OBJS)
+ctracecmdgui.so: $(TRACE_VIEW_OBJS) $(LIB_FILE)
swig -Wall -python -noproxy ctracecmdgui.i
- # FIXME: where do we get the pygtk include from?
- gcc -fpic -c `python-config --includes` $(CFLAGS) $(INCLUDES) -I/usr/include/pygtk-2.0/ ctracecmdgui_wrap.c
+ gcc -fpic -c $(CFLAGS) $(INCLUDES) $(PYTHON_INCLUDES) $(PYGTK_CFLAGS) ctracecmdgui_wrap.c
$(CC) --shared $^ $(LIBS) $(CONFIG_LIBS) ctracecmdgui_wrap.o -o ctracecmdgui.so

+.PHONY: python
+python: ctracecmd.so
+
+.PHONY: python-gui
+python-gui: ctracecmd.so ctracecmdgui.so

.PHONY: force
force:
--
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/