diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-11-25 17:53:05 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-11-25 17:54:56 -0500 |
commit | 59f0943f5b879980f8351fb6f11c07dfb9262a27 (patch) | |
tree | ea0d7349135efc79602bc0e6af9a38c6e4fa40d6 /Makefile | |
parent | 1806a49845e48a3e5f5ffb33d549bdefa2c1190b (diff) |
Start of creating libtracecmd.a library
Have libtracecmd.a contain libparevent.a and include trace-util.c.
Create a trace-local.h file to be used by the trace-cmd exec itself.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -4,21 +4,21 @@ EXT = -std=gnu99 | |||
4 | CFLAGS = -g -Wall # -O2 | 4 | CFLAGS = -g -Wall # -O2 |
5 | INCLUDES = -I. -I/usr/local/include | 5 | INCLUDES = -I. -I/usr/local/include |
6 | 6 | ||
7 | LIBS = -L. -lparsevent -ldl | 7 | LIBS = -L. -ltracecmd -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 | ||
12 | TARGETS = libparsevent.a trace-cmd plugin_hrtimer.so plugin_mac80211.so | 12 | TARGETS = libparsevent.a libtracecmd.a trace-cmd plugin_hrtimer.so plugin_mac80211.so |
13 | 13 | ||
14 | all: $(TARGETS) | 14 | all: $(TARGETS) |
15 | 15 | ||
16 | LIB_FILE = libparsevent.a | 16 | LIB_FILE = libtracecmd.a |
17 | 17 | ||
18 | trace-read.o:: parse-events.h | 18 | trace-read.o:: parse-events.h |
19 | trace-cmd.o:: parse-events.h $(LIB_FILE) | 19 | trace-cmd.o:: parse-events.h $(LIB_FILE) |
20 | 20 | ||
21 | trace-cmd:: trace-cmd.o trace-read.o trace-util.o | 21 | trace-cmd:: trace-cmd.o trace-read.o |
22 | $(CC) $^ $(LIBS) -rdynamic -o $@ | 22 | $(CC) $^ $(LIBS) -rdynamic -o $@ |
23 | 23 | ||
24 | parse-events.o: parse-events.c parse-events.h | 24 | parse-events.o: parse-events.c parse-events.h |
@@ -27,12 +27,17 @@ parse-events.o: parse-events.c parse-events.h | |||
27 | trace-seq.o: trace-seq.c parse-events.h | 27 | trace-seq.o: trace-seq.c parse-events.h |
28 | $(CC) -c $(CFLAGS) $(EXT) $(INCLUDES) -fPIC $< -o $@ | 28 | $(CC) -c $(CFLAGS) $(EXT) $(INCLUDES) -fPIC $< -o $@ |
29 | 29 | ||
30 | LIB_OBJS = parse-events.o trace-seq.o | 30 | PEVENT_LIB_OBJS = parse-events.o trace-seq.o |
31 | 31 | ||
32 | libparsevent.so: $(LIB_OBJS) | 32 | libparsevent.so: $(PEVENT_LIB_OBJS) |
33 | $(CC) --shared $^ -o $@ | 33 | $(CC) --shared $^ -o $@ |
34 | 34 | ||
35 | libparsevent.a: $(LIB_OBJS) | 35 | libparsevent.a: $(PEVENT_LIB_OBJS) |
36 | $(RM) $@; $(AR) rcs $@ $^ | ||
37 | |||
38 | TCMD_LIB_OBJS = $(PEVENT_LIB_OBJS) trace-util.o | ||
39 | |||
40 | libtracecmd.a: $(TCMD_LIB_OBJS) | ||
36 | $(RM) $@; $(AR) rcs $@ $^ | 41 | $(RM) $@; $(AR) rcs $@ $^ |
37 | 42 | ||
38 | plugin_hrtimer.o: plugin_hrtimer.c parse-events.h | 43 | plugin_hrtimer.o: plugin_hrtimer.c parse-events.h |