LIB_BIPS_FD = @LIB_BIPS_FD@
GPLC        = @GPLC@
RANLIB      = @RANLIB@
CC          = @CC@
CFLAGS      = @CFLAGS@
EXEEXT      = @EXEEXT@

LIBNAME = $(LIB_BIPS_FD)
OBJLIB  = fd_infos.o fd_infos_c.o \
          fd_values.o fd_values_c.o fd_values_fd.o \
          fd_math.o fd_math_c.o fd_math_fd.o \
          fd_bool.o fd_bool_c.o fd_bool_fd.o \
          fd_prime.o fd_prime_c.o fd_prime_fd.o \
          fd_symbolic.o fd_symbolic_c.o fd_symbolic_fd.o \
          fd_optim.o \
          math_supp.o \
          oper_supp.o \
          all_fd_bips.o 


.SUFFIXES:
.SUFFIXES: .o .c .fd .pl $(SUFFIXES)


.pl.o:
	$(GPLC) -c $(GPLCFLAGS) --no-redef-error $*.pl

.fd.o:
	$(GPLC) -c -C '$(CFLAGS) $(CLFAGS_UNSIGNED_CHAR)' $*.fd

.c.o:
	$(GPLC) -c -C '$(CFLAGS) $(CLFAGS_UNSIGNED_CHAR)' $*.c 


$(LIBNAME): $(OBJLIB)
	rm -f $(LIBNAME) 
	ar rc $(LIBNAME) $(OBJLIB)
	$(RANLIB) $(LIBNAME)



clean:
	rm -f *.o $(LIBNAME)


distclean: clean



# for test

t_fd.c: t_fd.fd ../Fd2C/fd2c
	$(GPLC) --fd-to-c t_fd.fd

t$(EXEEXT): t.o t_fd.o t_c.o ../EngineFD/libengine_fd.a \
            ../EngineFD/fd_to_c.h $(LIBNAME)
	$(GPLC) -o t$(EXEEXT) t.o t_fd.o t_c.o



# depending on math_supp.h

math_supp.o: math_supp.h
fd_math_c.o: math_supp.h

