projects
/
blktrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
blkparse: split off the timestamp correction code in to a separate function
[blktrace.git]
/
Makefile
diff --git
a/Makefile
b/Makefile
index e36f5a225101d7ac8ffb27e184dcd7c2742732a9..5917814d03440ef2abbb9a144312444cbbda932b 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-1,41
+1,52
@@
CC = gcc
CFLAGS = -Wall -O2 -g -W
ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
CC = gcc
CFLAGS = -Wall -O2 -g -W
ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-PROGS = blkparse blktrace verify_blkparse blkrawverify
+PROGS = blkparse blktrace verify_blkparse blkrawverify
blkiomon
LIBS = -lpthread
SCRIPTS = btrace
LIBS = -lpthread
SCRIPTS = btrace
+SUBDIRS = btreplay btt iowatcher
-ALL = $(PROGS) $(SCRIPTS) btt/btt
+ALL = $(PROGS) $(SCRIPTS)
+INSTALL_ALL = $(ALL) btt/btt btreplay/btrecord btreplay/btreplay \
+ btt/bno_plot.py iowatcher/iowatcher
-all: $(ALL)
+all: $(ALL)
$(SUBDIRS)
-btt/btt:
- $(MAKE) -C btt
+# We always descend into subdirs because they contain their own dependency
+# information which we don't track in this top level Makefile.
+$(SUBDIRS):
+ $(MAKE) -C $@
+.PHONY: $(SUBDIRS)
%.o: %.c
$(CC) -o $*.o -c $(ALL_CFLAGS) $<
blkparse: blkparse.o blkparse_fmt.o rbtree.o act_mask.o
%.o: %.c
$(CC) -o $*.o -c $(ALL_CFLAGS) $<
blkparse: blkparse.o blkparse_fmt.o rbtree.o act_mask.o
- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
+ $(CC) $(ALL_CFLAGS)
$(LDFLAGS)
-o $@ $(filter %.o,$^)
-blktrace: blktrace.o act_mask.o
$(LIBS)
- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
+blktrace: blktrace.o act_mask.o
+ $(CC) $(ALL_CFLAGS)
$(LDFLAGS)
-o $@ $(filter %.o,$^) $(LIBS)
verify_blkparse: verify_blkparse.o
verify_blkparse: verify_blkparse.o
- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
+ $(CC) $(ALL_CFLAGS)
$(LDFLAGS)
-o $@ $(filter %.o,$^)
blkrawverify: blkrawverify.o
blkrawverify: blkrawverify.o
- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^)
+
+blkiomon: blkiomon.o rbtree.o
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^) $(LIBS) -lrt
$(PROGS): | depend
docs:
$(MAKE) -C doc all
$(MAKE) -C btt docs
$(PROGS): | depend
docs:
$(MAKE) -C doc all
$(MAKE) -C btt docs
+ $(MAKE) -C btreplay docs
docsclean:
$(MAKE) -C doc clean
$(MAKE) -C btt clean
docsclean:
$(MAKE) -C doc clean
$(MAKE) -C btt clean
+ $(MAKE) -C btreplay clean
depend:
@$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
depend:
@$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
@@
-63,12
+74,14
@@
rpm: dist
clean: docsclean
-rm -f *.o $(PROGS) .depend btrace-1.0.tar.bz2
$(MAKE) -C btt clean
clean: docsclean
-rm -f *.o $(PROGS) .depend btrace-1.0.tar.bz2
$(MAKE) -C btt clean
+ $(MAKE) -C btreplay clean
+ $(MAKE) -C iowatcher clean
install: all
$(INSTALL) -m 755 -d $(DESTDIR)$(bindir)
$(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1
$(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man8
install: all
$(INSTALL) -m 755 -d $(DESTDIR)$(bindir)
$(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1
$(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man8
- $(INSTALL) -m 755 $(ALL) $(DESTDIR)$(bindir)
+ $(INSTALL) -m 755 $(
INSTALL_
ALL) $(DESTDIR)$(bindir)
$(INSTALL) -m 644 doc/*.1 $(DESTDIR)$(mandir)/man1
$(INSTALL) -m 644 doc/*.8 $(DESTDIR)$(mandir)/man8
$(INSTALL) -m 644 doc/*.1 $(DESTDIR)$(mandir)/man1
$(INSTALL) -m 644 doc/*.8 $(DESTDIR)$(mandir)/man8