#
#    Parallel Architecture Simulator
#    Eric A. Brewer  and  Chris N. Dellarocas
#    Laboratory for Computer Science
#    Massachusetts Institute of Technology
#
#    Module:  Augment -- Makefile
#
#    Originally written:  4-26-90  (eab)
#    Last Modified:       8-27-91  (eab)
#

CC = $(INIT_CC)

# -DDEBUG must be part of CFLAGS
CFLAGS = -O -DDEBUG

augment: asm.o hash.o pmax.o augment.o graph.o lib.o
	$(CC) $(CFLAGS) asm.o hash.o pmax.o augment.o graph.o lib.o \
          -ll -o augment

asm.o: asm.l lex.h
	lex asm.l
	$(CC) $(CFLAGS) -c -o asm.o lex.yy.c

hash.o: hash.c lex.h
augment.o: augment.c lex.h libc/counted.h libm/counted.h
pmax.o: pmax.c lex.h
graph.o: graph.c lex.h
lib.o: lib.c lex.h libc/missing.h libm/missing.h

clean:
	/bin/rm -f lex.yy.c *.s *~

reset:
	/bin/rm -f *.o libc/missing libm/missing libc/c.lib

spotless: superreset
superreset: reset clean
	/bin/rm -f augment *test

augtest: test.c augment
	$(CC) $(CFLAGS) -S test.c
	augment test.s -o aug-test.s
	$(CC) $(CFLAGS) aug-test.s -o augtest
