aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-11-25 17:53:05 -0500
committerSteven Rostedt <rostedt@goodmis.org>2009-11-25 17:54:56 -0500
commit59f0943f5b879980f8351fb6f11c07dfb9262a27 (patch)
treeea0d7349135efc79602bc0e6af9a38c6e4fa40d6 /Makefile
parent1806a49845e48a3e5f5ffb33d549bdefa2c1190b (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--Makefile19
1 files changed, 12 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index c4b13b9..8d93d08 100644
--- a/Makefile
+++ b/Makefile
@@ -4,21 +4,21 @@ 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 -ldl 7LIBS = -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
12TARGETS = libparsevent.a trace-cmd plugin_hrtimer.so plugin_mac80211.so 12TARGETS = libparsevent.a libtracecmd.a trace-cmd plugin_hrtimer.so plugin_mac80211.so
13 13
14all: $(TARGETS) 14all: $(TARGETS)
15 15
16LIB_FILE = libparsevent.a 16LIB_FILE = libtracecmd.a
17 17
18trace-read.o:: parse-events.h 18trace-read.o:: parse-events.h
19trace-cmd.o:: parse-events.h $(LIB_FILE) 19trace-cmd.o:: parse-events.h $(LIB_FILE)
20 20
21trace-cmd:: trace-cmd.o trace-read.o trace-util.o 21trace-cmd:: trace-cmd.o trace-read.o
22 $(CC) $^ $(LIBS) -rdynamic -o $@ 22 $(CC) $^ $(LIBS) -rdynamic -o $@
23 23
24parse-events.o: parse-events.c parse-events.h 24parse-events.o: parse-events.c parse-events.h
@@ -27,12 +27,17 @@ parse-events.o: parse-events.c parse-events.h
27trace-seq.o: trace-seq.c parse-events.h 27trace-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
30LIB_OBJS = parse-events.o trace-seq.o 30PEVENT_LIB_OBJS = parse-events.o trace-seq.o
31 31
32libparsevent.so: $(LIB_OBJS) 32libparsevent.so: $(PEVENT_LIB_OBJS)
33 $(CC) --shared $^ -o $@ 33 $(CC) --shared $^ -o $@
34 34
35libparsevent.a: $(LIB_OBJS) 35libparsevent.a: $(PEVENT_LIB_OBJS)
36 $(RM) $@; $(AR) rcs $@ $^
37
38TCMD_LIB_OBJS = $(PEVENT_LIB_OBJS) trace-util.o
39
40libtracecmd.a: $(TCMD_LIB_OBJS)
36 $(RM) $@; $(AR) rcs $@ $^ 41 $(RM) $@; $(AR) rcs $@ $^
37 42
38plugin_hrtimer.o: plugin_hrtimer.c parse-events.h 43plugin_hrtimer.o: plugin_hrtimer.c parse-events.h