summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2000-08-25 06:56:06 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2000-08-25 06:56:06 +0000
commitdb000d33215ee0396bd2c73bb3ed4e4d9701d68e (patch)
treefd4bb96f6b539729f6750baa1cadf77db2af5bb7
parent21917d591edd4e9891c5a18f2978e0037a5b9ce2 (diff)
for Cygwin
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3286 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--otherlibs/labltk/browser/Makefile12
-rw-r--r--otherlibs/labltk/lib/Makefile16
-rw-r--r--otherlibs/labltk/support/cltkFile.c4
3 files changed, 19 insertions, 13 deletions
diff --git a/otherlibs/labltk/browser/Makefile b/otherlibs/labltk/browser/Makefile
index 921461a26..b518d8c27 100644
--- a/otherlibs/labltk/browser/Makefile
+++ b/otherlibs/labltk/browser/Makefile
@@ -24,10 +24,11 @@ JG = jg_tk.cmo jg_config.cmo jg_bind.cmo jg_completion.cmo \
.mli.cmi:
$(LABLCOMP) $(INCLUDES) $<
-all: ocamlbrowser
+all: ocamlbrowser$(EXE)
-ocamlbrowser: $(TOPDIR)/toplevel/toplevellib.cma jglib.cma $(OBJ)
- $(LABLC) -o ocamlbrowser $(INCLUDES) \
+ocamlbrowser$(EXE): $(TOPDIR)/toplevel/toplevellib.cma jglib.cma $(OBJ) \
+ ../support/liblabltk41.a
+ $(LABLC) -o ocamlbrowser$(EXE) $(INCLUDES) \
$(TOPDIR)/toplevel/toplevellib.cma \
unix.cma str.cma labltk.cma jglib.cma $(OBJ)
@@ -35,10 +36,11 @@ jglib.cma: $(JG)
$(LABLCOMP) -a -o jglib.cma $(JG)
install:
- if test -f ocamlbrowser; then : ; cp ocamlbrowser $(BINDIR); fi
+ if test -f ocamlbrowser$(EXE); then : ; \
+ cp ocamlbrowser$(EXE) $(BINDIR); fi
clean:
- rm -f *.cm? ocamlbrowser dummy.mli *~ *.orig
+ rm -f *.cm? ocamlbrowser$(EXE) dummy.mli *~ *.orig
depend:
$(LABLDEP) *.ml *.mli > .depend
diff --git a/otherlibs/labltk/lib/Makefile b/otherlibs/labltk/lib/Makefile
index b9fbd4031..4c22fed75 100644
--- a/otherlibs/labltk/lib/Makefile
+++ b/otherlibs/labltk/lib/Makefile
@@ -10,7 +10,7 @@ SUPPORTX = $(SUPPORT:.cmo=.cmx)
TOPDEPS = $(TOPDIR)/toplevel/toplevellib.cma $(TOPDIR)/toplevel/topmain.cmo
-all : labltk.cma labltktop labltk
+all : labltk.cma labltktop$(EXE) labltk
opt : labltk.cmxa
@@ -25,8 +25,8 @@ labltk.cmxa : $(SUPPORTX) $(WIDGETOBJSX) tk.cmx
$(CAMLOPTLIBR) -o labltk.cmxa $(SUPPORTX) tk.cmx $(WIDGETOBJSX) \
-cclib -llabltk41 $(TK_LINK) $(X11_LINK)
-labltktop : $(TOPDEPS) $(WIDGETOBJS) $(SUPPORT)
- $(LABLC) -custom -linkall -o labltktop -I ../support \
+labltktop$(EXE) : $(TOPDEPS) $(WIDGETOBJS) $(SUPPORT) ../support/liblabltk41.a
+ $(LABLC) -custom -linkall -o labltktop$(EXE) -I ../support \
-I $(TOPDIR)/toplevel toplevellib.cma labltk.cma \
-I $(OTHERS)/unix unix.cma \
-I $(OTHERS)/str str.cma \
@@ -35,18 +35,18 @@ labltktop : $(TOPDEPS) $(WIDGETOBJS) $(SUPPORT)
labltk: Makefile $(TOPDIR)/config/Makefile
@echo Generate $@
@echo "#!/bin/sh" > $@
- @echo 'exec $(LABLTKDIR)/labltktop -I $(LABLTKDIR) $$*' >> $@
+ @echo 'exec $(LABLTKDIR)/labltktop$(EXE) -I $(LABLTKDIR) $$*' >> $@
# All .{ml,mli} files are generated in this directory
clean :
- rm -f *.cm* *.ml *.mli *.o *.a labltktop
+ rm -f *.cm* *.ml *.mli *.o *.a labltktop$(EXE)
-install: labltk.cma labltktop labltk
+install: labltk.cma labltktop$(EXE) labltk
@if test -d $(LABLTKDIR); then : ; else mkdir $(LABLTKDIR); fi
- cp *.cmi labltk.cma labltktop $(LABLTKDIR)
+ cp *.cmi labltk.cma labltktop$(EXE) $(LABLTKDIR)
chmod 644 $(LABLTKDIR)/*.cmi
chmod 644 $(LABLTKDIR)/labltk.cma
- chmod 755 $(LABLTKDIR)/labltktop
+ chmod 755 $(LABLTKDIR)/labltktop$(EXE)
@if test -d $(BINDIR); then : ; else mkdir $(BINDIR); fi
cp labltk $(BINDIR)
chmod 755 $(BINDIR)/labltk
diff --git a/otherlibs/labltk/support/cltkFile.c b/otherlibs/labltk/support/cltkFile.c
index 183acb277..5de029c79 100644
--- a/otherlibs/labltk/support/cltkFile.c
+++ b/otherlibs/labltk/support/cltkFile.c
@@ -15,6 +15,10 @@
/* $Id$ */
+#ifdef __CYGWIN__
+#define _WIN32
+#endif
+
#ifdef _WIN32
#include <wtypes.h>
#include <winbase.h>