diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-11-23 22:53:04 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-11-24 15:17:19 -0500 |
commit | f788e9c8a0d9b2c56d1fd56e86a285f57c16d0dc (patch) | |
tree | b945a42051ebf25cbe66ab310aa63956c53825c2 /Makefile | |
parent | 1cdbae6035ce824c312d408336537fbb818a492d (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>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -3,20 +3,27 @@ EXT = -std=gnu99 | |||
3 | CFLAGS = -g -Wall # -O2 | 3 | CFLAGS = -g -Wall # -O2 |
4 | INCLUDES = -I. -I/usr/local/include | 4 | INCLUDES = -I. -I/usr/local/include |
5 | 5 | ||
6 | LIBS = -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 | ||
9 | TARGETS = trace-cmd | 11 | TARGETS = trace-cmd libparsevent.so |
10 | 12 | ||
11 | all: $(TARGETS) | 13 | all: $(TARGETS) |
12 | 14 | ||
13 | parse-events.o:: parse-events.h | ||
14 | trace-read.o:: parse-events.h | 15 | trace-read.o:: parse-events.h |
15 | trace-cmd.o:: parse-events.h | 16 | trace-cmd.o:: parse-events.h |
16 | trace-seq.o:: parse-events.h trace-seq.h | 17 | trace-seq.o:: parse-events.h trace-seq.h |
17 | 18 | ||
18 | trace-cmd: trace-cmd.o trace-read.o parse-events.o trace-seq.o | 19 | trace-cmd:: trace-cmd.o trace-read.o trace-seq.o |
19 | $(CC) $^ -o $@ | 20 | $(CC) $^ -o $@ $(LIBS) |
21 | |||
22 | parse-events.o: parse-events.c parse-events.h | ||
23 | $(CC) -c $(CFLAGS) $(EXT) $(INCLUDES) -fPIC $< -o $@ | ||
24 | |||
25 | libparsevent.so: parse-events.o | ||
26 | $(CC) --shared $^ -o $@ | ||
20 | 27 | ||
21 | .PHONY: force | 28 | .PHONY: force |
22 | force: | 29 | force: |