#
# default base directory for YAP installation
# (EROOT for architecture-dependent files)
#
prefix = /Users/vsc/Yap/bins/osx
exec_prefix = ${prefix}
ROOTDIR = $(prefix)
EROOTDIR = ${prefix}
abs_top_builddir = /Users/vsc/Yap/bins/osx
#
# where the binary should be
#
BINDIR = $(EROOTDIR)/bin
#
# where YAP should look for libraries
#
LIBDIR=${exec_prefix}/lib
YAPLIBDIR=${exec_prefix}/lib/Yap
#
#
CC=gcc4.6 -fstrict-aliasing -freorder-blocks -fsched-interblock -Wall -Wstrict-aliasing=2
CFLAGS= -shared -fPIC -DBP_FREE -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 $(YAP_EXTRAS) $(DEFS) -I$(srcdir) -I../.. -I$(srcdir)/../../include -I /usr/local/cudd/include
LDFLAGS= -L/usr/local/mysql/lib  -L/usr/local/lib  -L /usr/local/cudd/lib -lcudd -lmtr -lepd -lst -lutil 
#
#
# You shouldn't need to change what follows.
#
INSTALL=/usr/bin/install -c
INSTALL_DATA=${INSTALL} -m 644
INSTALL_PROGRAM=${INSTALL}
SHELL=/bin/sh
RANLIB=ranlib
srcdir=../../../yap-6.3/packages/cudd
SO=dylib
#4.1VPATH=../../../../yap-6.3/library/random:../../../../yap-6.3/library/random/OPTYap
CWD=$(PWD)
#

OBJS=cudd.o
SOBJS=cudd.dylib

#in some systems we just create a single object, in others we need to
# create a libray

LINKLIBS = 

all: $(SOBJS) 

cudd.o: $(srcdir)/cudd.c
	$(CC) -c $(CFLAGS) $(srcdir)/cudd.c -o cudd.o

%.dylib: %.o
	gcc4.6  -dynamiclib -Wl,-undefined,dynamic_lookup $(LDFLAGS) -o $@ $<    -Wl,-install_name,$(YAPLIBDIR)/$@

cudd.dylib: cudd.o
	gcc4.6  -dynamiclib -Wl,-undefined,dynamic_lookup $(LDFLAGS) -o cudd.dylib cudd.o    -Wl,-install_name,$(YAPLIBDIR)/$@

install: all
	$(INSTALL_PROGRAM) $(SOBJS) $(DESTDIR)$(YAPLIBDIR)

clean:
	rm -f *.o *~ $(OBJS) $(SOBJS) *.BAK

