aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-11-24 20:42:30 -0500
committerSteven Rostedt <rostedt@goodmis.org>2009-11-24 20:45:59 -0500
commite46cb5cdd97734282a68af67675c0fe40a779a00 (patch)
tree02acbae3aa452c75293b169f5c30c7f2024e8410 /Makefile
parentfceb8ae6b632485674ebac8710a4e1554fcb048d (diff)
Add method to load plugins at trace-cmd report time
This adds a method to load a plugin. It looks in the users directory ~/.trace-cmd/plugins and tries to load any file there. To create a plugin simply make a C file that has this minimum format: #include "parse-events.h" int PEVENT_PLUGIN_LOADER(void) { ... } Then compile it with the following method: gcc -c plugin.c -fPIC -o plugin.o gcc -shared -nostartfiles -o plugin Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 473682d..c895ba7 100644
--- a/Makefile
+++ b/Makefile
@@ -4,12 +4,12 @@ EXT = -std=gnu99
4CFLAGS = -g -Wall # -O2 4CFLAGS = -g -Wall # -O2
5INCLUDES = -I. -I/usr/local/include 5INCLUDES = -I. -I/usr/local/include
6 6
7LIBS = -L. -lparsevent 7LIBS = -L. -lparsevent -ldl
8 8
9%.o: %.c 9%.o: %.c
10 $(CC) -c $(CFLAGS) $(EXT) $(INCLUDES) $< -o $@ 10 $(CC) -c $(CFLAGS) $(EXT) $(INCLUDES) $< -o $@
11 11
12TARGETS = libparsevent.a trace-cmd 12TARGETS = libparsevent.a trace-cmd test_plugin
13 13
14all: $(TARGETS) 14all: $(TARGETS)
15 15
@@ -35,6 +35,12 @@ libparsevent.so: $(LIB_OBJS)
35libparsevent.a: $(LIB_OBJS) 35libparsevent.a: $(LIB_OBJS)
36 $(RM) $@; $(AR) rcs $@ $^ 36 $(RM) $@; $(AR) rcs $@ $^
37 37
38test_plugin.o: test_plugin.c parse-events.h
39 $(CC) -c $(CFLAGS) -fPIC -o $@ $<
40
41test_plugin: test_plugin.o
42 $(CC) -shared -nostartfiles -o $@ $<
43
38.PHONY: force 44.PHONY: force
39force: 45force:
40 46