# Makefile for program barnes
CC = cc
LD = ld
CFLAGS = -mt -fast -Xt -g
C2DIR = $(CODEDIR)/runtime/sparc
INC = -I$(C2DIR)
INDENT = indent
INDENTFLG = -i2
OBJS = c2_main.o \
      barnes_aux.o \
      graph13.o graph177.o 

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

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

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) graph13.c graph13.c.pretty $(INDENTFLG)
	$(INDENT) graph177.c graph177.c.pretty $(INDENTFLG)

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

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

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

