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:
vsc
2002-11-12 19:53:52 +00:00
parent 9cfd0deeab
commit 81716ef31f
12 changed files with 42 additions and 158 deletions

View File

@@ -39,11 +39,7 @@ SOBJS=random@SHLIB_SUFFIX@
#in some systems we just create a single object, in others we need to
# create a libray
all: @NEWSHOBJ@
sobjs: $(SOBJS)
dll: random@SHLIB_SUFFIX@
all: $(SOBJS)
random.o: $(srcdir)/random.c
$(CC) -c $(CFLAGS) $(SHLIB_CFLAGS) $(srcdir)/random.c -o random.o
@@ -54,38 +50,9 @@ random.o: $(srcdir)/random.c
@DO_SECOND_LD@random@SHLIB_SUFFIX@: random.o
@DO_SECOND_LD@ @SHLIB_LD@ -o random@SHLIB_SUFFIX@ random.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=random.dll
DLL_LIBS=@DLL_LIBS@ -L../.. -lWYap
BASE_FILE=random.base
EXP_FILE=random.exp
DEF_FILE=$(srcdir)/random.def
ENTRY_FUNCTION=_win_random@12
#
random.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 random.dll $(LIBDIR)/random.dll
clean:
rm -f *.o *~ $(OBJS) $(SOBJS) *.BAK

View File

@@ -39,11 +39,7 @@ SOBJS=regexp@SHLIB_SUFFIX@ @NO_BUILTIN_REGEXP@ regcomp@SHLIB_SUFFIX@ regexec@SHL
#in some systems we just create a single object, in others we need to
# create a libray
all: @NEWSHOBJ@
sobjs: $(SOBJS)
dll: regexp@SHLIB_SUFFIX@
all: $(SOBJS)
regexp.o: $(srcdir)/regexp.c @NO_BUILTIN_REGEXP@ $(srcdir)/regex2.h $(srcdir)/engine.c
$(CC) -c $(CFLAGS) $(SHLIB_CFLAGS) $(srcdir)/regexp.c -o regexp.o
@@ -63,11 +59,11 @@ regexec.o: $(srcdir)/regexec.c
@DO_SECOND_LD@%@SHLIB_SUFFIX@: %.o
@DO_SECOND_LD@ @SHLIB_LD@ -o $@ $<
@DO_SECOND_LD@regexp@SHLIB_SUFFIX@: regexp.o
@DO_SECOND_LD@ @SHLIB_LD@ -o regexp@SHLIB_SUFFIX@ regexp.o
@DO_SECOND_LD@regexp@SHLIB_SUFFIX@: regexp.o @MERGE_DLL_OBJS@ regcomp.o regerror.o regfree.o regexec.o
@DO_SECOND_LD@ @SHLIB_LD@ -o regexp@SHLIB_SUFFIX@ regexp.o @MERGE_DLL_OBJS@ regcomp.o regerror.o regfree.o regexec.o
@DO_SECOND_LD@regcomp@SHLIB_SUFFIX@: regcomp.o
@DO_SECOND_LD@ @SHLIB_LD@ -o regcomp@SHLIB_SUFFIX@ regcomp.o
@DO_SECOND_LD@regcomp@SHLIB_SUFFIX@: regcomp.o @MERGE_DLL_OBJS@ regfree.o
@DO_SECOND_LD@ @SHLIB_LD@ -o regcomp@SHLIB_SUFFIX@ regcomp.o @MERGE_DLL_OBJS@ regfree.o
@DO_SECOND_LD@regerror@SHLIB_SUFFIX@: regerror.o
@DO_SECOND_LD@ @SHLIB_LD@ -o regerror@SHLIB_SUFFIX@ regerror.o
@@ -78,38 +74,9 @@ regexec.o: $(srcdir)/regexec.c
@DO_SECOND_LD@regexec@SHLIB_SUFFIX@: regexec.o
@DO_SECOND_LD@ @SHLIB_LD@ -o regexec@SHLIB_SUFFIX@ regexec.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=regexp.dll
DLL_LIBS=@DLL_LIBS@ -L../.. -lWYap
BASE_FILE=regexp.base
EXP_FILE=regexp.exp
DEF_FILE=$(srcdir)/regexp.def
ENTRY_FUNCTION=_win_regexp@12
#
regexp.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 regexp.dll $(LIBDIR)/regexp.dll
clean:
rm -f *.o *~ $(OBJS) $(SOBJS) *.BAK

View File

@@ -77,7 +77,7 @@ unsigned char collate_substitute_table[UCHAR_MAX + 1][STR_LEN];
struct collate_st_char_pri collate_char_pri_table[UCHAR_MAX + 1];
struct collate_st_chain_pri collate_chain_pri_table[TABLE_SIZE];
#if _MSC_VER || defined(__MINGW32__)
#if _MSC_VER || defined(__MINGW32__) || defined(__CYGWIN__)
#define isblank(X) isspace(X)
#define isascii(X) ((unsigned int)(X) < 0177)
#endif

View File

@@ -38,7 +38,7 @@
*/
/* utility definitions */
#if defined(_WIN32) || defined(__MINGW32__)
#if defined(_WIN32) || defined(__MINGW32__) || defined(__CYGWIN__)
#define DUPMAX ((unsigned int)-2) /* xxx is this right? */
#else
#define DUPMAX _POSIX2_RE_DUP_MAX /* xxx is this right? */

View File

@@ -39,9 +39,7 @@ SOBJS=sys@SHLIB_SUFFIX@
#in some systems we just create a single object, in others we need to
# create a libray
all: @NEWSHOBJ@
sobjs: $(SOBJS)
all: $(SOBJS)
sys.o: $(srcdir)/sys.c
$(CC) -c $(CFLAGS) $(SHLIB_CFLAGS) $(srcdir)/sys.c -o sys.o
@@ -52,38 +50,9 @@ sys.o: $(srcdir)/sys.c
@DO_SECOND_LD@sys@SHLIB_SUFFIX@: sys.o
@DO_SECOND_LD@ @SHLIB_LD@ -o sys@SHLIB_SUFFIX@ sys.o
#
# create a new DLL library on mingw32 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=sys.dll
DLL_LIBS=@DLL_LIBS@ -L../.. -lWYap
BASE_FILE=sys.base
EXP_FILE=sys.exp
DEF_FILE=$(srcdir)/sys.def
ENTRY_FUNCTION=_win_sys@12
#
sys.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 sys.dll $(LIBDIR)/sys.dll
clean:
rm -f *.o *~ $(OBJS) $(SOBJS) *.BAK

View File

@@ -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