global = /home/poisson3/ee658/global.h
global += /home/poisson3/ee658/global.g
global += /home/poisson3/ee658/global.e

defs = /home/poisson3/ee658/global.h
defs += /home/poisson3/ee658/global.e
defs += fsim.h
defs += fsim.e


parser = /home/poisson3/ee658/parser/y.tab.o
parser += /home/poisson3/ee658/parser/lex.yy.o
parser += /home/poisson3/ee658/parser/fc_lists.o


sim  = fault_sim.o
sim += init.o
sim += compute_val.o
sim += print.o
sim += read.o
sim += step.o
sim += gen_test.o
sim += stats.o
sim += options.o
min_set += ../min_set/min_set.o


fsim : fsim.o $(sim) $(parser) 
	cc -g fsim.o $(sim) $(parser)  -o fsim

fsim.o : $(global) fsim.e fsim.h fsim.c
	cc -c -g fsim.c

fault_sim.o : $(global) fsim.g fsim.h fault_sim.c
	cc -c -g fault_sim.c

init.o : $(defs) init.c
	cc -c -g init.c

compute_val.o : $(defs) compute_val.c
	cc -c -g compute_val.c

print.o : $(defs) print.c
	cc -c -g print.c

read.o : $(defs) read.c
	cc -c -g read.c

step.o : $(defs) step.c
	cc -c -g step.c

gen_test.o : $(defs) gen_test.c
	cc -c -g -lm gen_test.c


stats.o : $(defs) stats.c
	cc -c -g stats.c

options.o : $(defs) options.c
	cc -c -g options.c

