diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -439,6 +439,8 @@ clean: | |||
439 | ##### PYTHON STUFF ##### | 439 | ##### PYTHON STUFF ##### |
440 | 440 | ||
441 | PYTHON_INCLUDES = `python-config --includes` | 441 | PYTHON_INCLUDES = `python-config --includes` |
442 | PYTHON_LDFLAGS = `python-config --ldflags` \ | ||
443 | $(shell python -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LINKFORSHARED')") | ||
442 | PYGTK_CFLAGS = `pkg-config --cflags pygtk-2.0` | 444 | PYGTK_CFLAGS = `pkg-config --cflags pygtk-2.0` |
443 | 445 | ||
444 | ctracecmd.so: $(TCMD_LIB_OBJS) ctracecmd.i | 446 | ctracecmd.so: $(TCMD_LIB_OBJS) ctracecmd.i |
@@ -457,6 +459,23 @@ python: ctracecmd.so | |||
457 | PHONY += python-gui | 459 | PHONY += python-gui |
458 | python-gui: ctracecmd.so ctracecmdgui.so | 460 | python-gui: ctracecmd.so ctracecmdgui.so |
459 | 461 | ||
462 | PHONY += python-plugin | ||
463 | python-plugin: plugin_python.so python | ||
464 | |||
465 | do_compile_python_plugin_obj = \ | ||
466 | ($(print_plugin_obj_compile) \ | ||
467 | $(CC) -c $(CFLAGS) $(PYTHON_INCLUDES) -fPIC -o $@ $<) | ||
468 | |||
469 | do_python_plugin_build = \ | ||
470 | ($(print_plugin_build) \ | ||
471 | $(CC) -shared $(PYTHON_LDFLAGS) -o $@ $<) | ||
472 | |||
473 | plugin_python.o: %.o : $(src)/%.c | ||
474 | $(Q)$(do_compile_python_plugin_obj) | ||
475 | |||
476 | plugin_python.so: %.so: %.o | ||
477 | $(Q)$(do_python_plugin_build) | ||
478 | |||
460 | endif # skip-makefile | 479 | endif # skip-makefile |
461 | 480 | ||
462 | PHONY += force | 481 | PHONY += force |