diff mbox series

Message ID 1262710951-6614-1-git-send-email-dvhltc@us.ibm.com
State New, archived
Headers show
Series
  • Untitled series #104644
Related show

Commit Message

Darren Hart Jan. 5, 2010, 5:02 p.m. UTC
git://git.kernel.org/pub/scm/linux/kernel/git/dvhart/trace-cmd.git for-rostedt/trace-view


>From cacc655df9360e74a02561312da0bb78fdbae38c Mon Sep 17 00:00:00 2001
From: Darren Hart <dvhltc@us.ibm.com>
Date: Tue, 5 Jan 2010 08:53:12 -0800
Subject: [PATCH] trace-view: cleanup python make targets

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

Patch
diff mbox series

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: