fix conflict between clib and old random libraries (they are much the same):

This commit is contained in:
Vítor Santos Costa 2010-06-21 17:11:48 +01:00
parent 1fc997e096
commit d05d4c920d
5 changed files with 10 additions and 10 deletions

View File

@ -307,7 +307,7 @@ BEAM_OBJECTS = \
eamamasm.o eam_showcode.o eamindex.o eam_am.o
STATIC_OBJECTS = \
@STATIC_MODE@sys.o random.o regexp.o @NO_BUILTIN_REGEXP@ regcomp.o regerror.o regfree.o regexec.o
@STATIC_MODE@sys.o yap_random.o regexp.o @NO_BUILTIN_REGEXP@ regcomp.o regerror.o regfree.o regexec.o
LIB_OBJECTS = $(ENGINE_OBJECTS) $(C_INTERFACE_OBJECTS) $(OR_OBJECTS) $(BEAM_OBJECTS) $(STATIC_OBJECTS)
@ -457,8 +457,8 @@ sys.o: $(srcdir)/library/system/sys.c config.h
yap2swi.o: $(srcdir)/library/yap2swi/yap2swi.c config.h
$(CC) -c $(CFLAGS) -I$(srcdir)/include $(srcdir)/library/yap2swi/yap2swi.c -o $@
random.o: $(srcdir)/library/random/random.c config.h
$(CC) -c $(CFLAGS) -I$(srcdir)/include $(srcdir)/library/random/random.c -o $@
yap_random.o: $(srcdir)/library/random/yap_random.c config.h
$(CC) -c $(CFLAGS) -I$(srcdir)/include $(srcdir)/library/random/yap_random.c -o $@
regexp.o: $(srcdir)/library/regex/regexp.c @NO_BUILTIN_REGEXP@ $(srcdir)/library/regex/regex2.h $(srcdir)/library/regex/engine.c config.h
$(CC) -c $(CFLAGS) -I$(srcdir)/include -I$(srcdir)/library/regex $(srcdir)/library/regex/regexp.c -o regexp.o

View File

@ -31,7 +31,7 @@
setrand/1
]).
:- load_foreign_files([random], [], init_random).
:- load_foreign_files([yap_random], [], init_random).
% random(R) binds R to a new random number in [0.0,1.0)

View File

@ -35,22 +35,22 @@ SO=@SO@
CWD=$(PWD)
#
OBJS=random.o
SOBJS=random.@SO@
OBJS=yap_random.o
SOBJS=yap_random.@SO@
#in some systems we just create a single object, in others we need to
# create a libray
all: $(SOBJS)
random.o: $(srcdir)/random.c
$(CC) -c $(CFLAGS) $(srcdir)/random.c -o random.o
yap_random.o: $(srcdir)/yap_random.c
$(CC) -c $(CFLAGS) $(srcdir)/yap_random.c -o yap_random.o
@DO_SECOND_LD@%.@SO@: %.o
@DO_SECOND_LD@ @SHLIB_LD@ -o $@ $< @EXTRA_LIBS_FOR_DLLS@
@DO_SECOND_LD@random.@SO@: random.o
@DO_SECOND_LD@ @SHLIB_LD@ -o random.@SO@ random.o @EXTRA_LIBS_FOR_DLLS@
@DO_SECOND_LD@yap_random.@SO@: yap_random.o
@DO_SECOND_LD@ @SHLIB_LD@ -o yap_random.@SO@ yap_random.o @EXTRA_LIBS_FOR_DLLS@
install: all
$(INSTALL_PROGRAM) $(SOBJS) $(DESTDIR)$(YAPLIBDIR)