
#########################################################################
#									#
#  Makefile for portable Edipo						#
#									#
#		status:							#
#				yap:		yes			#
#				sicstus:	yes			#
#				quintus:	yes			#
#									#
#########################################################################


C_SOURCES	= window.c gc.c event.c text.c draw.c init.c attr.c bitmap.c
INCLUDES	= attr.h callx.h event.h
OBJECTS		= ${C_SOURCES:.c=.o} 
PL_SOURCES	= callx.pl edipo.pl ${C_SOURCES:.c=.pl}
DP_OBJECTS	= ${C_SOURCES:.c=${COMP}}
QL_OBJECTS	=  edipo${COMP} ${DP_OBJECTS}
MODULE		= edipo

.SUFFIXES: .pl ${COMP}

.pl.qof:
	qpc -c -N -i ../pi_paths.pl $<

.pl.ql:
	echo  "fcompile(${MODULE}:'$<') ." | ${PROLOG} 

all: edipo.${NAME} ${QL_OBJECTS}

edipo.${NAME}: ${OBJECTS} ${PL_SOURCES} ${QL_OBJECTS}
	echo "?-ensure_loaded(library(edipo)),edipo:make_edipo. ?- halt." | ${PROLOG}

edipo$.ql:
	echo  "fcompile(${MODULE}:'$<') ." | ${PROLOG} 

clean:
	rm -f *.o edipo.quintus edipo.sicstus edipo.yap *.ql *.qof

${OBJECTS}: callx.h

edipo${COMP}: ${DP_OBJECTS}

window.o attr.o : attr.h
event.o: event.h
init.o: event.h

#EOF