diff options
Diffstat (limited to 'otherlibs/labltk/lib')
-rw-r--r-- | otherlibs/labltk/lib/.cvsignore | 3 | ||||
-rw-r--r-- | otherlibs/labltk/lib/Makefile | 65 | ||||
-rw-r--r-- | otherlibs/labltk/lib/Makefile.gen | 35 |
3 files changed, 103 insertions, 0 deletions
diff --git a/otherlibs/labltk/lib/.cvsignore b/otherlibs/labltk/lib/.cvsignore new file mode 100644 index 0000000000..c555693118 --- /dev/null +++ b/otherlibs/labltk/lib/.cvsignore @@ -0,0 +1,3 @@ +*.ml *.mli labltktop +modules +.depend diff --git a/otherlibs/labltk/lib/Makefile b/otherlibs/labltk/lib/Makefile new file mode 100644 index 0000000000..0931fee20c --- /dev/null +++ b/otherlibs/labltk/lib/Makefile @@ -0,0 +1,65 @@ +include ../Makefile.config + +COMPFLAGS= -I ../support + +TKLINKOPT=$(STATIC) \ + -ccopt -L../support -cclib -llabltk41 \ + $(TKLIBS) $(X11_LIBS) + + +SUPPORT=../support/support.cmo ../support/widget.cmo ../support/protocol.cmo \ + ../support/textvariable.cmo ../support/timer.cmo \ + ../support/fileevent.cmo + +SUPPORTX = $(SUPPORT:.cmo=.cmx) + +all : tk41.cma labltktop + +opt : tk41.cmxa + +include ./modules +WIDGETOBJSX = $(WIDGETOBJS:.cmo=.cmx) + +tk41.cma : $(SUPPORT) $(WIDGETOBJS) tk.cmo + $(LABLLIBR) -o tk41.cma $(SUPPORT) tk.cmo $(WIDGETOBJS) + +tk41.cmxa : $(SUPPORTX) $(WIDGETOBJSX) tk.cmx + $(CAMLOPTLIBR) -o tk41.cmxa $(SUPPORTX) tk.cmx $(WIDGETOBJSX) + +## Until olabltktop is fixed (next release), we in-line it +## (otherwise our trick with -ccopt is broken) + +labltktop : $(WIDGETOBJS) $(SUPPORT) + $(LABLC) -custom -linkall -o labltktop -I ../support $(TKLINKOPT) \ + toplevellib.cma tk41.cma topmain.cmo + +# All .{ml,mli} files are generated in this directory +clean : + rm -f *.cm* *.ml *.mli *.o *.a labltktop + +install: tk41.cma labltktop + cp *.cmi tk41.cma labltktop $(INSTALLDIR) + chmod 644 $(INSTALLDIR)/*.cmi + chmod 644 $(INSTALLDIR)/tk41.cma + chmod 755 $(INSTALLDIR)/labltktop + + +installopt: tk41.cmxa + if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi + cp tk41.cmxa tk41.a $(INSTALLDIR) + chmod 644 $(INSTALLDIR)/tk41.cmxa + chmod 644 $(INSTALLDIR)/tk41.a + +.SUFFIXES : +.SUFFIXES : .mli .ml .cmi .cmx .cmo .mlp + +.mli.cmi: + $(LABLCOMP) $(COMPFLAGS) $< + +.ml.cmo: + $(LABLCOMP) $(COMPFLAGS) $< + +.ml.cmx: + $(CAMLOPT) -c $(COMPFLAGS) $< + +include .depend diff --git a/otherlibs/labltk/lib/Makefile.gen b/otherlibs/labltk/lib/Makefile.gen new file mode 100644 index 0000000000..4f41c54cf1 --- /dev/null +++ b/otherlibs/labltk/lib/Makefile.gen @@ -0,0 +1,35 @@ +include ../Makefile.config + +all: tk.ml .depend + +tkgen.ml: ../Widgets.src ../compiler/tkcompiler + cd ..; compiler/tkcompiler + +# dependencies are broken: wouldn't work with gmake 3.77 + +tk.ml .depend: tkgen.ml ../support/report.ml #../builtin/builtin_*.ml + (echo 'open Widget'; \ + echo 'open Protocol'; \ + echo 'open Support'; \ + echo 'open Textvariable'; \ + cat ../support/may.ml; \ + cat ../support/coerce.ml; \ + cat ../support/report.ml; \ + cat ../builtin/builtin_*.ml; \ + cat tkgen.ml; \ + echo ; \ + echo ; \ + echo 'module Tkintf = struct'; \ + cat ../builtin/builtini_*.ml; \ + cat tkigen.ml; \ + echo 'end (* module Tkintf *)'; \ + echo ; \ + echo ; \ + echo 'open Tkintf' ;\ + echo ; \ + echo ; \ + cat ../builtin/builtinf_*.ml; \ + cat tkfgen.ml; \ + echo ; \ + ) > tk.ml + $(LABLDEP) *.mli *.ml > .depend |