# Generated automatically from Makefile.in by configure.


SHELL=/bin/sh

# These Makefile-variables are not suitable for automatic substitution by
# configure, since they are not fixed.
SP_BIN=/home/jojo/pl6/distr/platform2/sicstus3/sun45/bin
SP_INC=/home/jojo/pl6/distr/platform2/sicstus3/sun45/include
SP_LIB=/home/jojo/pl6/distr/platform2/sicstus3/sun45/lib/sicstus

OPTIONS=
CFLAGS=-O2 
CC=gcc

LIB_PATH=`pwd`/..
LIBDIR=$(LIB_PATH)

# Scripts found at the top-level of the source-tree
MKDIR=../../ensdir
MKAUTOGEN=../../mkautogen

PROLOG= sicstus
PLFLAGS= compactcode

SHSFX=so
STSFX=s.o

PROLOG= sicstus
PLFLAGS= compactcode

all:	fcompile.pl ixq.pl enum.pl compiler.pl lib.pl fdsets.pl 
	echo "asserta(library_directory('$(LIB_PATH)')), prolog_flag(compiling,_,$(PLFLAGS)), [fcompile]." | \
	$(PROLOG) -f
	touch all

fd_glue.o fds_glue.o:	fd_glue.c
	$(CC) $(CFLAGS) -DSP_INSIDER -I$(SP_INC) -I../../Emulator -c fd_glue.c -o $@

fd_glue.c:	../clpfd.pl
	echo "prolog:prepare_foreign_resource(clpfd, '../clpfd', 'fd_glue.c')." | $(PROLOG) -f

fd.o fds.o:	fd.c fd_insn.h
	$(CC) $(CFLAGS) -DSP_INSIDER -I$(SP_INC) -I../../Emulator -c fd.c -o $@

install:
	$(MKDIR) $(LIBDIR)/clpfd
	-cp *.ql $(LIBDIR)/clpfd
	$(MKDIR) $(LIBDIR)/clpfd/examples
	-cp examples/README examples/*.pl $(LIBDIR)/clpfd/examples

clean:
	rm -f all fd_glue.c *.ql *.o so_locations

sp.gdb:
	$(SP_LIB)/bin/spmkds sp.gdb ../clpfd.$(STSFX)


