WIN32 support updates and some fixes.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@685 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
@@ -39,11 +39,7 @@ SOBJS=yap2swi@SHLIB_SUFFIX@
|
||||
#in some systems we just create a single object, in others we need to
|
||||
# create a libray
|
||||
|
||||
all: @NEWSHOBJ@
|
||||
|
||||
sobjs: $(SOBJS)
|
||||
|
||||
dll: yap2swi@SHLIB_SUFFIX@
|
||||
all: $(SOBJS)
|
||||
|
||||
yap2swi.o: $(srcdir)/yap2swi.c
|
||||
$(CC) -c $(CFLAGS) $(SHLIB_CFLAGS) $(srcdir)/yap2swi.c -o yap2swi.o
|
||||
@@ -54,38 +50,9 @@ yap2swi.o: $(srcdir)/yap2swi.c
|
||||
@DO_SECOND_LD@yap2swi@SHLIB_SUFFIX@: yap2swi.o
|
||||
@DO_SECOND_LD@ @SHLIB_LD@ -o yap2swi@SHLIB_SUFFIX@ yap2swi.o
|
||||
|
||||
#
|
||||
# create a new DLL library on cygwin environments
|
||||
#
|
||||
# DLLNAME: name of the new dll
|
||||
# OBJS: list of object files I want to put in
|
||||
# LIBS: list of libraries to link with
|
||||
# DEFFILE is the name of the definitions file.
|
||||
# BASEFILE temporary
|
||||
# EXPFILE temporary
|
||||
# ENTRY is the entry point int WINAPI startup (HINSTANCE, DWORD, LPVOID)
|
||||
#
|
||||
DLLTOOL=dlltool
|
||||
DLLNAME=yap2swi.dll
|
||||
DLL_LIBS=@DLL_LIBS@ -L../.. -lWYap
|
||||
BASE_FILE=yap2swi.base
|
||||
EXP_FILE=yap2swi.exp
|
||||
DEF_FILE=$(srcdir)/yap2swi.def
|
||||
ENTRY_FUNCTION=_win_yap2swi@12
|
||||
#
|
||||
yap2swi.dll: $(OBJS)
|
||||
$(LD) -s --base-file $(BASE_FILE) --dll -o $(DLLNAME) $(OBJS) $(DLL_LIBS) -e $(ENTRY_FUNCTION)
|
||||
$(DLLTOOL) --as=$(AS) --dllname $(DLLNAME) --def $(DEF_FILE) --base-file $(BASE_FILE) --output-exp $(EXP_FILE)
|
||||
$(LD) -s --base-file $(BASE_FILE) $(EXP_FILE) -dll -o $(DLLNAME) $(OBJS) $(DLL_LIBS) -e $(ENTRY_FUNCTION)
|
||||
$(DLLTOOL) --as=$(AS) --dllname $(DLLNAME) --def $(DEF_FILE) --base-file $(BASE_FILE) --output-exp $(EXP_FILE)
|
||||
$(LD) $(EXP_FILE) --dll -o $(DLLNAME) $(OBJS) $(DLL_LIBS) -e $(ENTRY_FUNCTION)
|
||||
|
||||
install: all
|
||||
$(INSTALL_PROGRAM) $(SOBJS) $(DESTDIR)$(LIBDIR)
|
||||
|
||||
install_win32: dll
|
||||
$(INSTALL_PROGRAM) -m 755 yap2swi.dll $(LIBDIR)/yap2swi.dll
|
||||
|
||||
clean:
|
||||
rm -f *.o *~ $(OBJS) $(SOBJS) *.BAK
|
||||
|
||||
|
||||
Reference in New Issue
Block a user