CC=gcc
AR=ar
RANLIB=ranlib
INC=-I/home/msra/experiment/picosat-632
LIB=-L/home/msra/experiment/picosat-632 -lpicosat
DEPLIB=/home/msra/experiment/picosat-632/libpicosat.a
DEPHEADERS=/home/msra/experiment/picosat-632/picosat.h
CFLAGS=-Wall -W -O3 -DNDEBUG -fno-strict-aliasing
all: quantor
quantor: main.o libquantor.a $(DEPLIB)
	$(CC) $(CFLAGS) -o $@ main.o -L. -lquantor $(LIB)
quantor.o: quantor.c options.c quantor.h config.h $(DEPHEADERS)
	$(CC) $(CFLAGS) $(INC) -c quantor.c
libquantor.a: quantor.o
	$(AR) rc $@ quantor.o
	$(RANLIB) $@
options.c: genopts options.sh
	rm -f $@; ./genopts < options.sh > $@
main.o: main.c quantor.h config.h
	$(CC) $(CFLAGS) -c $(INC) main.c
clean:
	rm -f *.o
	rm -f quantor libquantor.a
	rm -f *~ gmon.out cscope.out
	rm -f *.bbg *.bb *.da *.c.gcov
	rm -f config.h Makefile options.c
	rm -f log/*.log
