LIBRARY = libbdd.a
INCLUDE = bdduser.h

SOURCES = \
  bdd.c \
  bddaddendum.c \
  bddapply.c \
  bddassoc.c \
  bddblk.c \
  bddcache.c \
  bddcmp.c \
  bddcomp.c \
  bdddump.c \
  bddhash.c \
  bddmisc.c \
  bddprimes.c \
  bddprint.c \
  bddprprofile.c \
  bddqnt.c \
  bddreduce.c \
  bddrelprod.c \
  bddreorder.c \
  bddresize.c \
  bddsat.c \
  bddselect.c \
  bddsize.c \
  bddsupport.c \
  bddswap.c \
  bddunique.c \
  bddwarn.c \
  mtbdd.c

OBJECTS = \
  bdd.o \
  bddaddendum.o \
  bddapply.o \
  bddassoc.o \
  bddblk.o \
  bddcache.o \
  bddcmp.o \
  bddcomp.o \
  bdddump.o \
  bddhash.o \
  bddmisc.o \
  bddprimes.o \
  bddprint.o \
  bddprprofile.o \
  bddqnt.o \
  bddreduce.o \
  bddrelprod.o \
  bddreorder.o \
  bddresize.o \
  bddsat.o \
  bddselect.o \
  bddsize.o \
  bddsupport.o \
  bddswap.o \
  bddunique.o \
  bddwarn.o \
  mtbdd.o

all: $(TMPLIBRARIES)/$(LIBRARY)

$(TMPLIBRARIES)/$(LIBRARY): $(LIBRARY)
	$(MV) $(LIBRARY) $(TMPLIBRARIES)
	$(CP) $(INCLUDE) $(TMPINCLUDES)

$(LIBRARY): $(OBJECTS)
	$(AR) $@ $(OBJECTS)
	$(RANLIB) $@

clobber:
	$(RM) $(LIBRARY) $(OBJECTS) $(JUNK)

.c.o:
	$(CC) -c $*.c -I.
