# Makefile for program BTS
CC = gcc
LD = ld
CFLAGS = -O2 -g -D_REENTRANT
C2DIR = /u/emery/code2-emery/code2/runtime/sparc
INC = -I$(FTDIR)/include -I$(C2DIR)
INDENT = indent
INDENTFLG = -i2
OBJS = c2_main.o \
       \
      graph592.o graph588.o graph584.o 

BTS: $(OBJS)
	$(CC) $(OBJS) $(C2DIR)/c2libg.o\
            -lm -lthread -lc -o BTS

clean:
	\rm -f *.o *.pretty core BTS

pretty:
	$(INDENT) c2_globtype.h c2_globtype.h.pretty $(INDENTFLG)
	$(INDENT) c2_main.h c2_main.h.pretty $(INDENTFLG)
	$(INDENT) c2_main.c c2_main.c.pretty $(INDENTFLG)
	$(INDENT) graph592.c graph592.c.pretty $(INDENTFLG)
	$(INDENT) graph588.c graph588.c.pretty $(INDENTFLG)
	$(INDENT) graph584.c graph584.c.pretty $(INDENTFLG)

c2_main.o: c2_main.c
	$(CC) $(CFLAGS) $(INC) -c c2_main.c

graph592.o: graph592.c
	$(CC) $(CFLAGS) $(INC) -c graph592.c

graph588.o: graph588.c
	$(CC) $(CFLAGS) $(INC) -c graph588.c

graph584.o: graph584.c
	$(CC) $(CFLAGS) $(INC) -c graph584.c

