aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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: