aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-11-23 22:53:04 -0500
committerSteven Rostedt <rostedt@goodmis.org>2009-11-24 15:17:19 -0500
commitf788e9c8a0d9b2c56d1fd56e86a285f57c16d0dc (patch)
treeb945a42051ebf25cbe66ab310aa63956c53825c2
parent1cdbae6035ce824c312d408336537fbb818a492d (diff)
Convert parse-event.h file into a library
This is the first step in making a shared library for other applications to use the parse-event functions for parsing the TRACE_EVENT from raw data. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--Makefile15
1 files changed, 11 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 13736cc..c4c1107 100644
--- a/Makefile
+++ b/Makefile
@@ -3,20 +3,27 @@ EXT = -std=gnu99
3CFLAGS = -g -Wall # -O2 3CFLAGS = -g -Wall # -O2
4INCLUDES = -I. -I/usr/local/include 4INCLUDES = -I. -I/usr/local/include
5 5
6LIBS = -L. -lparsevent
7
6%.o: %.c 8%.o: %.c
7 $(CC) -c $(CFLAGS) $(EXT) $(INCLUDES) $< -o $@ 9 $(CC) -c $(CFLAGS) $(EXT) $(INCLUDES) $< -o $@
8 10
9TARGETS = trace-cmd 11TARGETS = trace-cmd libparsevent.so
10 12
11all: $(TARGETS) 13all: $(TARGETS)
12 14
13parse-events.o:: parse-events.h
14trace-read.o:: parse-events.h 15trace-read.o:: parse-events.h
15trace-cmd.o:: parse-events.h 16trace-cmd.o:: parse-events.h
16trace-seq.o:: parse-events.h trace-seq.h 17trace-seq.o:: parse-events.h trace-seq.h
17 18
18trace-cmd: trace-cmd.o trace-read.o parse-events.o trace-seq.o 19trace-cmd:: trace-cmd.o trace-read.o trace-seq.o
19 $(CC) $^ -o $@ 20 $(CC) $^ -o $@ $(LIBS)
21
22parse-events.o: parse-events.c parse-events.h
23 $(CC) -c $(CFLAGS) $(EXT) $(INCLUDES) -fPIC $< -o $@
24
25libparsevent.so: parse-events.o
26 $(CC) --shared $^ -o $@
20 27
21.PHONY: force 28.PHONY: force
22force: 29force: