Home | History | Annotate | Download | only in btt
      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 
      8 CC	= gcc
      9 CFLAGS	= -Wall -W -O2 -g
     10 INCS	= -I. -I..
     11 XCFLAGS	= -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
     12 override CFLAGS += $(INCS) $(XCFLAGS)
     13 
     14 PROGS	= btt
     15 LIBS	= $(PLIBS) $(ELIBS)
     16 OBJS	= 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
     21 
     22 all: depend $(PROGS)
     23 
     24 .PHONY : depend
     25 depend: $(patsubst %.o,%.c,$(filter %.o,$(OBJS)))
     26 	@$(CC) -MM $(CFLAGS) -I.. $^ 1> .depend
     27 
     28 docs:
     29 	$(MAKE) -C doc all
     30 
     31 docsclean:
     32 	$(MAKE) -C doc clean
     33 
     34 clean: docsclean
     35 	-rm -f *.o $(PROGS) .depend
     36 
     37 %.o: %.c
     38 	$(CC) $(CFLAGS) -c -o $*.o $<
     39 
     40 btt: $(OBJS)
     41 	$(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
     42 
     43 ifneq ($(wildcard .depend),)
     44 include .depend
     45 endif
     46