ocaml/otherlibs/labltk/support/Makefile.nt

81 lines
2.1 KiB
Makefile

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