CC     = gcc 
#CC     = cc

#CFLAGS = -c  -O4 -Dunix -DBSD          #SunOS,Linux
#CFLAGS = -c  -O4 -Dunix -DPOSIX        #Linux,#HP
CFLAGS = -c  -O4 -Dunix                 #Solaris,SonyNews
#CFLAGS = -c  -O4 -DWIN32               #Windows-PC

OBJ = dis.o init.o init_sym.o loader.o inst_inf.o main.o toam.o unify.o \
	file.o domain.o float.o arith.o token.o global.o \
	builtins.o mic.o numbervars.o cpreds.o univ.o assert.o clause.o \
        array.o delay.o clpfd.o clpfd_libs.o \
        toamprofile.o kapi.o getline.o table.o 

bprolog : $(OBJ) 
	$(CC) -o bprolog $(OBJ) -lm
clean :
	rm -f *.o bprolog
dis.o   : dis.c term.h inst.h basic.h 
	$(CC) $(CFLAGS) dis.c 
init.o  : init.c term.h inst.h basic.h
	$(CC) $(CFLAGS) init.c
init_sym.o  : init_sym.c term.h inst.h basic.h
	$(CC) $(CFLAGS) init_sym.c
loader.o : loader.c term.h basic.h inst.h 
	$(CC) $(CFLAGS) loader.c 
inst_inf.o  : inst_inf.c term.h inst.h basic.h
	$(CC) $(CFLAGS) inst_inf.c
main.o  : main.c term.h inst.h basic.h
	$(CC) $(CFLAGS) main.c
toam.o  : toam.c term.h inst.h basicd.h basic.h toam.h event.h frame.h
	$(CC) $(CFLAGS) toam.c
unify.o : unify.c term.h basic.h event.h macro.h frame.h
	$(CC) $(CFLAGS) unify.c 
file.o    : file.c term.h basic.h macro.h
	$(CC) $(CFLAGS) file.c 
domain.o    : domain.c term.h basic.h macro.h event.h frame.h
	$(CC) $(CFLAGS) domain.c 
float.o    : float.c term.h basic.h macro.h
	$(CC) $(CFLAGS) float.c 
arith.o    : arith.c term.h basic.h macro.h
	$(CC) $(CFLAGS) arith.c 
token.o    : token.c term.h basic.h macro.h
	$(CC) $(CFLAGS) token.c 
global.o    : global.c term.h basic.h macro.h 
	$(CC) $(CFLAGS) global.c 
builtins.o    : builtins.c term.h basic.h macro.h
	$(CC) $(CFLAGS) builtins.c 
mic.o    : mic.c term.h basic.h macro.h
	$(CC) $(CFLAGS) mic.c 
numbervars.o    : numbervars.c term.h basic.h macro.h
	$(CC) $(CFLAGS) numbervars.c 
cpreds.o    : cpreds.c term.h basic.h macro.h
	$(CC) $(CFLAGS) cpreds.c
univ.o    : univ.c term.h basic.h macro.h
	$(CC) $(CFLAGS) univ.c
assert.o    : assert.c term.h basic.h macro.h
	$(CC) $(CFLAGS) assert.c
clause.o    : clause.c term.h basic.h macro.h dynamic.h
	$(CC) $(CFLAGS) clause.c
array.o    : array.c term.h basic.h macro.h 
	$(CC) $(CFLAGS) array.c
delay.o    : delay.c term.h basic.h macro.h 
	$(CC) $(CFLAGS) delay.c
clpfd.o : clpfd.c term.h basic.h macro.h event.h frame.h
	$(CC) $(CFLAGS) clpfd.c 
clpfd_libs.o : clpfd_libs.c term.h basic.h macro.h event.h frame.h
	$(CC) $(CFLAGS) clpfd_libs.c 
kapi.o : kapi.c term.h basic.h macro.h kapi.h
	$(CC) $(CFLAGS) kapi.c 
table.o : table.c term.h basic.h macro.h frame.h
	$(CC) $(CFLAGS) table.c 

