• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# OCFLAGS:
3# 	COUNT_IOS	- Counts struct io's left at end
4# 	DEBUG		- Various and sundy debug asserts
5# 	NDEBUG		- Defined: no asserts, Undefined: asserts
6#
7
8CC	= gcc
9CFLAGS	= -Wall -W -O2 -g
10INCS	= -I. -I..
11XCFLAGS	= -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
12override CFLAGS += $(INCS) $(XCFLAGS)
13
14PROGS	= btt
15LIBS	= $(PLIBS) $(ELIBS)
16OBJS	= args.o bt_timeline.o devmap.o devs.o dip_rb.o iostat.o latency.o \
17	  misc.o output.o proc.o seek.o trace.o trace_complete.o trace_im.o \
18	  trace_issue.o trace_queue.o trace_remap.o trace_requeue.o \
19	  ../rbtree.o mmap.o trace_plug.o bno_dump.o unplug_hist.o q2d.o \
20	  aqd.o plat.o rstats.o p_live.o
21
22all: depend $(PROGS)
23
24.PHONY : depend
25depend: $(patsubst %.o,%.c,$(filter %.o,$(OBJS)))
26	@$(CC) -MM $(CFLAGS) -I.. $^ 1> .depend
27
28docs:
29	$(MAKE) -C doc all
30
31docsclean:
32	$(MAKE) -C doc clean
33
34clean: docsclean
35	-rm -f *.o $(PROGS) .depend
36
37%.o: %.c
38	$(CC) $(CFLAGS) -c -o $*.o $<
39
40btt: $(OBJS)
41	$(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
42
43ifneq ($(wildcard .depend),)
44include .depend
45endif
46