support dynamic loading
fix save to leave module user in boot. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@468 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
e0a80c43c5
commit
757f5147c9
@ -456,7 +456,7 @@ mycb: $(srcdir)/mycb.c
|
||||
|
||||
startup: yap $(PL_SOURCES)
|
||||
-rm -f startup
|
||||
echo "['$(srcdir)/pl/init.yap']. save_program(startup)." | @CROSS_SIMULATOR@ ./yap -b $(srcdir)/pl/boot.yap
|
||||
echo "['$(srcdir)/pl/init.yap']. module(user). save_program(startup)." | @CROSS_SIMULATOR@ ./yap -b $(srcdir)/pl/boot.yap
|
||||
|
||||
yap: $(HEADERS) yap.o @YAPLIB@
|
||||
$(MPI_CC) $(STANDARD_CFLAGS) $(LDFLAGS) -o yap yap.o @YAPLIB@ $(LIBS) @MPI_LIBS@
|
||||
@ -466,6 +466,9 @@ libYap.a: $(LIB_OBJECTS)
|
||||
$(AR) rc libYap.a $(LIB_OBJECTS)
|
||||
$(RANLIB) libYap.a
|
||||
|
||||
@DO_SECOND_LD@libYap@SHLIB_SUFFIX@: $(LIB_OBJECTS)
|
||||
@DO_SECOND_LD@ @SHLIB_LD@ -o libYap@SHLIB_SUFFIX@ $(LIB_OBJECTS) $(LIBS)
|
||||
|
||||
install: install_bin install_data
|
||||
|
||||
install_bin: @INSTALL_COMMAND@
|
||||
@ -497,7 +500,7 @@ install_win32: startup
|
||||
(cd library/system; make install_win32)
|
||||
(cd library/random; make install_win32)
|
||||
|
||||
install_library: libYap.a
|
||||
install_library: @YAPLIB@
|
||||
$(INSTALL_DATA) libYap.a $(DESTDIR)$(LIBDIR)/libYap.a
|
||||
mkdir -p $(DESTDIR)$(INCLUDEDIR)
|
||||
for h in $(HEADERS); do $(INSTALL) $$h $(DESTDIR)$(INCLUDEDIR); done
|
||||
|
12
configure.in
12
configure.in
@ -45,6 +45,9 @@ AC_ARG_ENABLE(debug-yap,
|
||||
AC_ARG_ENABLE(cygwin,
|
||||
[ --enable-cygwin use cygwin library in WIN32 ],
|
||||
cygwin="$enableval", cygwin=no)
|
||||
AC_ARG_ENABLE(dynamic_loading,
|
||||
[ --enable-dynamic-loading compile Yap as a DLL ],
|
||||
dynamic_loading="$enableval", dynamic_loading=no)
|
||||
|
||||
AC_ARG_WITH(gmp,
|
||||
[ --with-gmp[=DIR] use GNU Multiple Precision in DIR],
|
||||
@ -371,7 +374,6 @@ INSTALL_DLLS="#"
|
||||
SHLIB_LD="@#"
|
||||
DO_SECOND_LD="#"
|
||||
NEWSHOBJ="sobjs"
|
||||
YAPLIB="libYap.a"
|
||||
M4="m4"
|
||||
|
||||
case $target_os in
|
||||
@ -501,6 +503,14 @@ case $target_os in
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$dynamic_loading" = "yes"
|
||||
then
|
||||
YAP_EXTRAS="$SHLIB_CFLAGS $YAP_EXTRAS"
|
||||
YAPLIB=libYap"$SHLIB_SUFFIX"
|
||||
else
|
||||
YAPLIB="libYap.a"
|
||||
fi
|
||||
|
||||
if test "$coroutining" = "yes"
|
||||
then
|
||||
YAP_EXTRAS="$YAP_EXTRAS -DCOROUTINING=1"
|
||||
|
Reference in New Issue
Block a user