aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 21 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 239c05a..a4a89ed 100644
--- a/Makefile
+++ b/Makefile
@@ -439,12 +439,14 @@ clean:
439##### PYTHON STUFF ##### 439##### PYTHON STUFF #####
440 440
441PYTHON_INCLUDES = `python-config --includes` 441PYTHON_INCLUDES = `python-config --includes`
442PYTHON_LDFLAGS = `python-config --ldflags` \
443 $(shell python -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LINKFORSHARED')")
442PYGTK_CFLAGS = `pkg-config --cflags pygtk-2.0` 444PYGTK_CFLAGS = `pkg-config --cflags pygtk-2.0`
443 445
444ctracecmd.so: $(TCMD_LIB_OBJS) 446ctracecmd.so: $(TCMD_LIB_OBJS) ctracecmd.i
445 swig -Wall -python -noproxy ctracecmd.i 447 swig -Wall -python -noproxy ctracecmd.i
446 gcc -fpic -c $(PYTHON_INCLUDES) ctracecmd_wrap.c 448 gcc -fpic -c $(PYTHON_INCLUDES) ctracecmd_wrap.c
447 $(CC) --shared $^ ctracecmd_wrap.o -o ctracecmd.so 449 $(CC) --shared $(TCMD_LIB_OBJS) ctracecmd_wrap.o -o ctracecmd.so
448 450
449ctracecmdgui.so: $(TRACE_VIEW_OBJS) $(LIB_FILE) 451ctracecmdgui.so: $(TRACE_VIEW_OBJS) $(LIB_FILE)
450 swig -Wall -python -noproxy ctracecmdgui.i 452 swig -Wall -python -noproxy ctracecmdgui.i
@@ -457,6 +459,23 @@ python: ctracecmd.so
457PHONY += python-gui 459PHONY += python-gui
458python-gui: ctracecmd.so ctracecmdgui.so 460python-gui: ctracecmd.so ctracecmdgui.so
459 461
462PHONY += python-plugin
463python-plugin: plugin_python.so python
464
465do_compile_python_plugin_obj = \
466 ($(print_plugin_obj_compile) \
467 $(CC) -c $(CFLAGS) $(PYTHON_INCLUDES) -fPIC -o $@ $<)
468
469do_python_plugin_build = \
470 ($(print_plugin_build) \
471 $(CC) -shared $(PYTHON_LDFLAGS) -o $@ $<)
472
473plugin_python.o: %.o : $(src)/%.c
474 $(Q)$(do_compile_python_plugin_obj)
475
476plugin_python.so: %.so: %.o
477 $(Q)$(do_python_plugin_build)
478
460endif # skip-makefile 479endif # skip-makefile
461 480
462PHONY += force 481PHONY += force