# /************************************************************************/
# /*                                                                      */
# /* Copyright (C) 1995 by Frank Mueller.                                 */
# /* This code was developed at Florida State University.                 */
# /* Distributed by the author(s) under the following terms:              */
# /*                                                                      */
# /* This code may not be distributed further without permission          */
# /*      from Frank Mueller of the Humboldt-University zu Berlin,        */
# /*      mueller@informatik.hu-berlin.de or (+49) (30) 20181-276.        */
# /* This code is distributed "AS IS" WITHOUT ANY WARRANTY; without even  */
# /*      even the implied warranty of MERCHANTABILITY OR FITNESS FOR A   */
# /*      PARTICULAR PURPOSE.  No claims are made as to whether it serves */
# /*      any particular purpose or even works at all.                    */
# /*                                                                      */
# /************************************************************************/

# /*
#  * This file is part of the static cache simulator
#  *
#  *   $Id: Makefile,v 1.1 2004/10/27 06:32:16 smohan Exp $
#  */

#gcc
CC = gcc

#for timing
CFLAGS = -DSIMPLE -DMERGE_STATES -DMERGE_INST_OVERLAP

#for up
#CFLAGS = -DSIMPLE -DMERGE_STATES -DMERGE_INST_OVERLAP
#CFLAGS = -DSIMPLE -DMERGE_STATES -DMERGE_INST_OVERLAP -DSIGMETRICS

#for bit
#CFLAGS = -DSIMPLE -DMERGE_STATES -DMERGE_INST_OVERLAP -DBIT_ENCODE

#CFLAGS += -DDEBUG -DDEBUG_STATES

#CFLAGS += -DPROFILING

CFLAGS += -Iinclude

CFLAGS += -g
#CFLAGS += -O3

OBJECTS = bit_enc.o category.o dead.o dfa.o equiv.o fig.o instrument.o \
		loops.o misc.o myalloc.o pathfile.o scs.o vec.o

HEADERS = misc.h myalloc.h scs.h vec.h Makefile

staticsim: $(OBJECTS)
	$(CC) -o staticsim $(OBJECTS)

epilogue: epilogue.c
	$(CC) $(CFLAGS) -o epilogue epilogue.c

staticsim.out: $(OBJECTS)
	$(CC) -o staticsim.out $(OBJECTS)

staticsim.up.out: $(OBJECTS)
	$(CC) -o staticsim.up.out $(OBJECTS)

staticsim.bit.out: $(OBJECTS)
	$(CC) -o staticsim.bit.out $(OBJECTS)

staticsim.bit2.out: $(OBJECTS)
	$(CC) -o staticsim.bit2.out $(OBJECTS)

%.o: $(HEADERS) %.c
	$(CC) $(CFLAGS) -c $*.c

clean:
	rm -f $(OBJECTS) staticsim epilogue

