summaryrefslogtreecommitdiffstats
path: root/otherlibs/labltk/support
diff options
context:
space:
mode:
authorAlain Frisch <alain@frisch.fr>2007-11-06 15:16:56 +0000
committerAlain Frisch <alain@frisch.fr>2007-11-06 15:16:56 +0000
commit3958a92c729c6588bdd4a39d6d8bc5dadb00b3de (patch)
treed1cb483d1cfed72c42cd3311ae735784bfbe5d13 /otherlibs/labltk/support
parent2a99b8737bd88e4af552da873ce904a684c631ae (diff)
Merge the natdynlink branch into HEAD.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8477 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/labltk/support')
-rw-r--r--otherlibs/labltk/support/Makefile39
-rw-r--r--otherlibs/labltk/support/Makefile.common6
-rw-r--r--otherlibs/labltk/support/Makefile.common.nt30
-rw-r--r--otherlibs/labltk/support/Makefile.nt81
4 files changed, 24 insertions, 132 deletions
diff --git a/otherlibs/labltk/support/Makefile b/otherlibs/labltk/support/Makefile
index 3e315bfc3..837fbc341 100644
--- a/otherlibs/labltk/support/Makefile
+++ b/otherlibs/labltk/support/Makefile
@@ -2,48 +2,49 @@ include Makefile.common
all: support.cmo rawwidget.cmo widget.cmo protocol.cmo \
textvariable.cmo timer.cmo fileevent.cmo camltkwrap.cmo \
- tkthread.cmo lib$(LIBNAME).a
+ tkthread.cmo lib$(LIBNAME).$(A)
opt: support.cmx rawwidget.cmx widget.cmx protocol.cmx \
textvariable.cmx timer.cmx fileevent.cmx camltkwrap.cmx \
- tkthread.cmx lib$(LIBNAME).a
+ tkthread.cmx lib$(LIBNAME).$(A)
-COBJS=cltkCaml.o cltkUtf.o cltkEval.o cltkEvent.o cltkFile.o cltkMain.o \
- cltkMisc.o cltkTimer.o cltkVar.o cltkWait.o cltkImg.o
+COBJS=cltkCaml.$(O) cltkUtf.$(O) cltkEval.$(O) cltkEvent.$(O) \
+ cltkFile.$(O) cltkMain.$(O) cltkMisc.$(O) cltkTimer.$(O) \
+ cltkVar.$(O) cltkWait.$(O) cltkImg.$(O)
CCFLAGS=-I../../../byterun $(TK_DEFS) $(SHAREDCCCOMPOPTS)
-COMPFLAGS=-I $(OTHERS)/unix
+COMPFLAGS=-I $(OTHERS)/win32unix -I $(OTHERS)/unix
THFLAGS=-I $(OTHERS)/systhreads -I $(OTHERS)/threads
-lib$(LIBNAME).a : $(COBJS)
- $(MKLIB) -o $(LIBNAME) $(COBJS) $(TK_LINK)
+lib$(LIBNAME).$(A) : $(COBJS)
+ $(MKLIB) -o $(LIBNAME) $(COBJS) -ldopt "$(TK_LINK)"
PUBMLI=fileevent.mli protocol.mli textvariable.mli timer.mli \
rawwidget.mli widget.mli
PUB= $(PUBMLI) $(PUBMLI:.mli=.cmi) tkthread.mli tkthread.cmi tkthread.cmo
-install: lib$(LIBNAME).a $(PUB)
+install: lib$(LIBNAME).$(A) $(PUB)
if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
- cp $(PUB) lib$(LIBNAME).a $(INSTALLDIR)
- cd $(INSTALLDIR); $(RANLIB) lib$(LIBNAME).a
- cd $(INSTALLDIR); chmod 644 $(PUB) lib$(LIBNAME).a
- if test -f dll$(LIBNAME).so; then \
- cp dll$(LIBNAME).so $(STUBLIBDIR)/dll$(LIBNAME).so; fi
+ cp $(PUB) lib$(LIBNAME).$(A) $(INSTALLDIR)
+ cd $(INSTALLDIR); $(RANLIB) lib$(LIBNAME).$(A)
+ cd $(INSTALLDIR); chmod 644 $(PUB) lib$(LIBNAME).$(A)
+ if test -f dll$(LIBNAME)$(EXT_DLL); then \
+ cp dll$(LIBNAME)$(EXT_DLL) $(STUBLIBDIR)/; fi
installopt: opt
@if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
cp $(PUBMLI:.mli=.cmx) $(INSTALLDIR)
- if test -f tkthread.cmx; then \
- cp tkthread.cmx tkthread.o $(INSTALLDIR); \
- chmod 644 $(INSTALLDIR)/tkthread.cmx $(INSTALLDIR)/tkthread.o; \
+ if test -f tkthread.$(O); then \
+ cp tkthread.cmx tkthread.$(O) $(INSTALLDIR); \
+ chmod 644 $(INSTALLDIR)/tkthread.cmx $(INSTALLDIR)/tkthread.$(O); \
fi
clean :
- rm -f *.cm* *.o *.a *.so
+ rm -f *.cm* *.o *.a *.so *.obj *.lib *.dll *.exp
.SUFFIXES :
-.SUFFIXES : .mli .ml .cmi .cmo .cmx .mlp .c .o
+.SUFFIXES : .mli .ml .cmi .cmo .cmx .mlp .c .$(O)
.mli.cmi:
$(CAMLCOMP) $(COMPFLAGS) $<
@@ -54,7 +55,7 @@ clean :
.ml.cmx:
$(CAMLOPT) -c $(COMPFLAGS) $<
-.c.o:
+.c.$(O):
$(BYTECC) $(BYTECCCOMPOPTS) $(CCFLAGS) -c $<
tkthread.cmi: tkthread.mli
diff --git a/otherlibs/labltk/support/Makefile.common b/otherlibs/labltk/support/Makefile.common
index b8aa786f7..215804826 100644
--- a/otherlibs/labltk/support/Makefile.common
+++ b/otherlibs/labltk/support/Makefile.common
@@ -2,7 +2,7 @@
## Where you compiled Objective Caml
TOPDIR=../../..
## Path to the otherlibs subdirectory
-OTHERS=../..
+OTHERS=$(TOPDIR)/otherlibs
LIBNAME=labltk
@@ -13,8 +13,8 @@ INSTALLDIR=$(LIBDIR)/$(LIBNAME)
## Tools from the Objective Caml distribution
CAMLRUN=$(TOPDIR)/boot/ocamlrun
-CAMLC=$(TOPDIR)/ocamlcomp.sh
-CAMLOPT=$(TOPDIR)/ocamlcompopt.sh
+CAMLC=$(CAMLRUN) $(TOPDIR)/ocamlc -nostdlib -I $(TOPDIR)/stdlib
+CAMLOPT=$(CAMLRUN) $(TOPDIR)/ocamlopt -nostdlib -I $(TOPDIR)/stdlib
CAMLCOMP=$(CAMLC) -c -warn-error A
CAMLYACC=$(TOPDIR)/boot/ocamlyacc -v
CAMLLEX=$(CAMLRUN) $(TOPDIR)/boot/ocamllex
diff --git a/otherlibs/labltk/support/Makefile.common.nt b/otherlibs/labltk/support/Makefile.common.nt
deleted file mode 100644
index 3f37dda00..000000000
--- a/otherlibs/labltk/support/Makefile.common.nt
+++ /dev/null
@@ -1,30 +0,0 @@
-## Paths are relative to subdirectories
-## Where you compiled Objective Caml
-TOPDIR=../../..
-## Where to find OCaml binaries
-EXEDIR=$(TOPDIR)
-## Path to the otherlibs subdirectory
-OTHERS=../..
-
-LIBNAME=labltk
-
-include $(TOPDIR)/config/Makefile
-
-INSTALLDIR=$(LIBDIR)/$(LIBNAME)
-TKLINKOPT=$(STATIC)
-
-## Tools from the Objective Caml distribution
-
-CAMLRUN=$(EXEDIR)/boot/ocamlrun
-CAMLC=$(CAMLRUN) $(TOPDIR)/ocamlc -I $(TOPDIR)/stdlib
-CAMLCOMP=$(CAMLC) -c
-CAMLYACC=$(EXEDIR)/boot/ocamlyacc -v
-CAMLLEX=$(CAMLRUN) $(TOPDIR)/boot/ocamllex
-CAMLLIBR=$(CAMLC) -a
-CAMLDEP=$(CAMLRUN) $(TOPDIR)/tools/ocamldep
-COMPFLAGS=
-LINKFLAGS=
-
-CAMLOPT=$(CAMLRUN) $(TOPDIR)/ocamlopt -I $(TOPDIR)/stdlib
-CAMLOPTLIBR=$(CAMLOPT) -a
-CAMLRUNGEN=../../boot/ocamlrun
diff --git a/otherlibs/labltk/support/Makefile.nt b/otherlibs/labltk/support/Makefile.nt
index 64188e3c2..67bf904ed 100644
--- a/otherlibs/labltk/support/Makefile.nt
+++ b/otherlibs/labltk/support/Makefile.nt
@@ -1,80 +1 @@
-include Makefile.common.nt
-
-all: support.cmo rawwidget.cmo widget.cmo protocol.cmo \
- textvariable.cmo timer.cmo fileevent.cmo camltkwrap.cmo \
- tkthread.cmo dll$(LIBNAME).dll lib$(LIBNAME).$(A)
-
-opt: support.cmx rawwidget.cmx widget.cmx protocol.cmx \
- textvariable.cmx timer.cmx fileevent.cmx camltkwrap.cmx \
- tkthread.cmx lib$(LIBNAME).$(A)
-
-COBJS=cltkCaml.o cltkUtf.o cltkEval.o cltkEvent.o cltkFile.o \
- cltkMain.o cltkMisc.o cltkTimer.o cltkVar.o cltkWait.o cltkImg.o
-DCOBJS=$(COBJS:.o=.$(DO))
-SCOBJS=$(COBJS:.o=.$(SO))
-
-CCFLAGS=-I../../../byterun -I../../win32unix $(TK_DEFS) -DIN_CAMLTKSUPPORT
-
-COMPFLAGS=-I $(OTHERS)/win32unix
-THFLAGS=-I $(OTHERS)/systhreads -I $(OTHERS)/threads
-
-dll$(LIBNAME).dll : $(DCOBJS)
- $(call MKDLL,dll$(LIBNAME).dll,dll$(LIBNAME).$(A),\
- $(DCOBJS) ../../../byterun/ocamlrun.$(A) \
- $(TK_LINK) $(call SYSLIB,wsock32))
-
-lib$(LIBNAME).$(A) : $(SCOBJS)
- $(call MKLIB,lib$(LIBNAME).$(A), $(SCOBJS))
-
-PUBMLI=fileevent.mli protocol.mli textvariable.mli timer.mli \
- rawwidget.mli widget.mli tkthread.mli
-PUB= $(PUBMLI) $(PUBMLI:.mli=.cmi) tkthread.cmo
-
-install:
- mkdir -p $(INSTALLDIR)
- cp $(PUB) $(INSTALLDIR)
- cp dll$(LIBNAME).dll $(STUBLIBDIR)/dll$(LIBNAME).dll
- cp dll$(LIBNAME).$(A) lib$(LIBNAME).$(A) $(INSTALLDIR)
-
-installopt:
- @mkdir -p $(INSTALLDIR)
- cp $(PUBMLI:.mli=.cmx) $(INSTALLDIR)
- cp tkthread.$(O) $(INSTALLDIR)
-
-clean :
- rm -f *.cm* *.$(O) *.dll *.$(A) *.exp
-
-.SUFFIXES :
-.SUFFIXES : .mli .ml .cmi .cmo .cmx .mlp .c .$(DO) .$(SO)
-
-.mli.cmi:
- $(CAMLCOMP) $(COMPFLAGS) $<
-
-.ml.cmo:
- $(CAMLCOMP) $(COMPFLAGS) $<
-
-.ml.cmx:
- $(CAMLOPT) -c $(COMPFLAGS) $<
-
-.c.$(DO):
- $(BYTECC) $(DLLCCCOMPOPTS) $(CCFLAGS) -c $<
- mv $*.$(O) $*.$(DO)
-
-.c.$(SO):
- $(BYTECC) $(BYTECCCOMPOPTS) $(CCFLAGS) -c $<
- mv $*.$(O) $*.$(SO)
-
-tkthread.cmi: tkthread.mli
- $(CAMLCOMP) $(COMPFLAGS) $(THFLAGS) $<
-tkthread.cmo: tkthread.ml
- $(CAMLCOMP) $(COMPFLAGS) $(THFLAGS) $<
-tkthread.cmx: tkthread.ml
- if test -f $(OTHERS)/systhreads/threads.cmxa; then \
- $(CAMLOPT) -c $(COMPFLAGS) $(THFLAGS) $< ; \
- fi
-depend:
- $(CAMLDEP) *.mli *.ml > .depend
-
-$(DCOBJS) $(SCOBJS): camltk.h
-
-include .depend
+include Makefile \ No newline at end of file