1999-12-07 07:25:56 -08:00
|
|
|
include ../support/Makefile.common
|
1999-11-30 06:59:39 -08:00
|
|
|
|
2002-04-26 05:16:26 -07:00
|
|
|
all: $(LIBNAME).cma $(LIBNAME)top$(EXE) $(LIBNAME)
|
1999-11-30 06:59:39 -08:00
|
|
|
|
2002-04-26 05:16:26 -07:00
|
|
|
opt: $(LIBNAME).cmxa
|
1999-11-30 06:59:39 -08:00
|
|
|
|
2002-04-26 05:16:26 -07:00
|
|
|
clean:
|
2002-04-27 04:15:30 -07:00
|
|
|
rm -f $(LIBNAME)top$(EXE) $(LIBNAME) *.cm* *.a
|
2002-02-26 05:10:58 -08:00
|
|
|
|
2002-05-03 05:56:42 -07:00
|
|
|
superclean:
|
|
|
|
- if test -f tk.cmo; then \
|
|
|
|
echo We have changes... Now lib directory has no .cmo files; \
|
|
|
|
rm -f *.cm* *.o; \
|
|
|
|
fi
|
|
|
|
|
2002-04-26 05:16:26 -07:00
|
|
|
include ../labltk/modules
|
|
|
|
LABLTKOBJS=tk.cmo $(WIDGETOBJS)
|
2002-02-26 05:10:58 -08:00
|
|
|
|
2002-04-26 05:16:26 -07:00
|
|
|
include ../camltk/modules
|
|
|
|
CAMLTKOBJS=cTk.cmo $(CWIDGETOBJS) labltk.cmo camltk.cmo
|
|
|
|
|
|
|
|
SUPPORT=../support/support.cmo ../support/rawwidget.cmo \
|
|
|
|
../support/widget.cmo ../support/protocol.cmo \
|
|
|
|
../support/textvariable.cmo ../support/timer.cmo \
|
|
|
|
../support/fileevent.cmo ../support/camltkwrap.cmo
|
2002-02-26 05:10:58 -08:00
|
|
|
|
2002-04-26 05:16:26 -07:00
|
|
|
TKOBJS=$(SUPPORT) $(LABLTKOBJS) $(CAMLTKOBJS)
|
1999-11-30 06:59:39 -08:00
|
|
|
|
2002-04-26 05:16:26 -07:00
|
|
|
TOPDEPS = $(TOPDIR)/toplevel/toplevellib.cma $(TOPDIR)/toplevel/topmain.cmo
|
1999-11-30 06:59:39 -08:00
|
|
|
|
2003-04-01 18:35:19 -08:00
|
|
|
$(LIBNAME).cma: $(SUPPORT) ../Widgets.src
|
2002-05-06 07:24:50 -07:00
|
|
|
$(MAKE) superclean
|
2002-04-26 05:16:26 -07:00
|
|
|
cd ../labltk; $(MAKE)
|
|
|
|
cd ../camltk; $(MAKE)
|
|
|
|
$(MKLIB) -ocamlc '$(CAMLC)' -o $(LIBNAME) -oc $(LIBNAME) \
|
|
|
|
-I ../labltk -I ../camltk $(TKOBJS) \
|
2002-05-28 20:51:53 -07:00
|
|
|
$(TK_LINK)
|
1999-11-30 06:59:39 -08:00
|
|
|
|
2003-04-01 18:35:19 -08:00
|
|
|
$(LIBNAME).cmxa: $(SUPPORT:.cmo=.cmx) ../Widgets.src
|
2002-05-06 07:24:50 -07:00
|
|
|
$(MAKE) superclean
|
2002-04-26 05:16:26 -07:00
|
|
|
cd ../labltk; $(MAKE) opt
|
|
|
|
cd ../camltk; $(MAKE) opt
|
|
|
|
$(MKLIB) -ocamlopt '$(CAMLOPT)' -o $(LIBNAME) -oc $(LIBNAME) \
|
|
|
|
-I ../labltk -I ../camltk $(TKOBJS:.cmo=.cmx) \
|
2002-05-28 20:51:53 -07:00
|
|
|
$(TK_LINK)
|
1999-11-30 06:59:39 -08:00
|
|
|
|
2002-04-26 05:16:26 -07:00
|
|
|
$(LIBNAME)top$(EXE) : $(TOPDEPS) $(LIBNAME).cma ../support/lib$(LIBNAME).a
|
2002-05-28 20:51:53 -07:00
|
|
|
$(CAMLC) -verbose -linkall -o $(LIBNAME)top$(EXE) -I ../support \
|
2002-04-26 05:16:26 -07:00
|
|
|
-I $(TOPDIR)/toplevel toplevellib.cma \
|
|
|
|
-I ../labltk -I ../camltk $(LIBNAME).cma \
|
2002-02-26 05:10:58 -08:00
|
|
|
-I $(OTHERS)/unix unix.cma \
|
|
|
|
-I $(OTHERS)/str str.cma \
|
2002-08-08 17:46:30 -07:00
|
|
|
topstart.cmo
|
2002-02-26 05:10:58 -08:00
|
|
|
|
2002-04-26 05:16:26 -07:00
|
|
|
$(LIBNAME): Makefile $(TOPDIR)/config/Makefile
|
2002-02-26 05:10:58 -08:00
|
|
|
@echo Generate $@
|
|
|
|
@echo "#!/bin/sh" > $@
|
2002-04-26 05:16:26 -07:00
|
|
|
@echo 'exec $(INSTALLDIR)/$(LIBNAME)top$(EXE) -I $(INSTALLDIR) $$*' >> $@
|
|
|
|
|
2002-05-06 07:24:50 -07:00
|
|
|
install:
|
2002-04-26 05:16:26 -07:00
|
|
|
if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
|
|
|
|
cp $(LIBNAME).cma $(LIBNAME)top$(EXE) $(INSTALLDIR)
|
|
|
|
chmod 644 $(INSTALLDIR)/$(LIBNAME).cma
|
|
|
|
chmod 755 $(INSTALLDIR)/$(LIBNAME)top$(EXE)
|
2002-02-26 05:10:58 -08:00
|
|
|
@if test -d $(BINDIR); then : ; else mkdir $(BINDIR); fi
|
2002-04-26 05:16:26 -07:00
|
|
|
cp $(LIBNAME) $(BINDIR)
|
|
|
|
chmod 755 $(BINDIR)/$(LIBNAME)
|
|
|
|
|
2002-05-06 07:24:50 -07:00
|
|
|
installopt:
|
2002-04-26 05:16:26 -07:00
|
|
|
@if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
|
|
|
|
cp $(LIBNAME).cmxa $(LIBNAME).a $(INSTALLDIR)
|
|
|
|
cd $(INSTALLDIR); $(RANLIB) $(LIBNAME).a
|
|
|
|
chmod 644 $(INSTALLDIR)/$(LIBNAME).cmxa
|
|
|
|
chmod 644 $(INSTALLDIR)/$(LIBNAME).a
|