2002-04-26 05:16:26 -07:00
|
|
|
include ../support/Makefile.common
|
|
|
|
|
2002-04-26 16:59:08 -07:00
|
|
|
COMPFLAGS=-I ../../../byterun -I ../support -I ../camltk -I ../../unix
|
2002-05-28 20:51:53 -07:00
|
|
|
CCFLAGS=-I../../../byterun -I../support $(TK_DEFS) $(SHAREDCCCOMPOPTS)
|
2002-04-26 05:16:26 -07:00
|
|
|
|
|
|
|
all: tkanim.cma libtkanim.a
|
|
|
|
opt: tkanim.cmxa libtkanim.a
|
|
|
|
example: gifanimtest
|
|
|
|
|
|
|
|
OBJS=tkanim.cmo
|
|
|
|
COBJS= cltkaniminit.o tkAnimGIF.o
|
|
|
|
|
|
|
|
tkanim.cma: $(OBJS)
|
|
|
|
$(MKLIB) -ocamlc '$(CAMLC)' -o tkanim -oc tkanim \
|
2002-05-28 20:51:53 -07:00
|
|
|
$(OBJS) $(TK_LINK)
|
2002-04-26 05:16:26 -07:00
|
|
|
|
|
|
|
tkanim.cmxa: $(OBJS:.cmo=.cmx)
|
|
|
|
$(MKLIB) -ocamlopt '$(CAMLOPT)' -o tkanim -oc tkanim \
|
2002-05-28 20:51:53 -07:00
|
|
|
$(OBJS:.cmo=.cmx) $(TK_LINK)
|
2002-04-26 05:16:26 -07:00
|
|
|
|
|
|
|
libtkanim.a: $(COBJS)
|
2002-05-28 20:51:53 -07:00
|
|
|
$(MKLIB) -o tkanim $(COBJS) $(TK_LINK)
|
2002-04-26 05:16:26 -07:00
|
|
|
|
2003-04-28 00:45:14 -07:00
|
|
|
gifanimtest-static: all gifanimtest.cmo
|
|
|
|
$(CAMLC) -custom -o $@ -I ../lib -I ../support -I ../../unix -dllpath ../support -dllpath . unix.cma -ccopt -L. $(LIBNAME).cma tkanim.cma gifanimtest.cmo
|
|
|
|
|
|
|
|
# dynamic loading
|
2002-04-26 05:16:26 -07:00
|
|
|
gifanimtest: all gifanimtest.cmo
|
2003-04-28 00:45:14 -07:00
|
|
|
$(CAMLC) -o $@ -I ../lib -I ../support -I ../../unix -dllpath ../support -dllpath . unix.cma $(LIBNAME).cma tkanim.cma gifanimtest.cmo
|
2002-04-26 05:16:26 -07:00
|
|
|
|
2004-05-08 09:04:39 -07:00
|
|
|
#animwish: $(TKANIM_LIB) tkAppInit.o
|
|
|
|
# $(CC) -o $@ tkAppInit.o $(TK_LINK) $(X11_LINK) \
|
|
|
|
# -L. -ltkanim $(LIBS)
|
2002-04-26 05:16:26 -07:00
|
|
|
|
|
|
|
$(OBJS) $(OBJS:.cmo=.cmi): ../lib/$(LIBNAME).cma
|
|
|
|
|
|
|
|
$(OBJS:.cmo=.cmx): ../lib/$(LIBNAME).cmxa
|
|
|
|
|
|
|
|
clean:
|
2004-05-08 09:04:39 -07:00
|
|
|
rm -f *.cm* *.o *.a dlltkanim.so gifanimtest gifanimtest-static
|
2002-04-26 05:16:26 -07:00
|
|
|
|
|
|
|
.SUFFIXES :
|
|
|
|
.SUFFIXES : .mli .ml .cmi .cmo .mlp .cmx .c .o
|
|
|
|
|
|
|
|
.mli.cmi:
|
|
|
|
$(CAMLCOMP) $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
.ml.cmo:
|
|
|
|
$(CAMLCOMP) $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
.ml.cmx:
|
|
|
|
$(CAMLOPT) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
.c.o:
|
2002-04-26 16:59:08 -07:00
|
|
|
$(BYTECC) $(BYTECCCOMPOPTS) $(CCFLAGS) -c $<
|
2002-04-26 05:16:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
install: tkanim.cma
|
|
|
|
cp tkanim.cma *.cmi *.mli libtkanim.a $(INSTALLDIR)
|
|
|
|
if [ -f dlltkanim.so ]; then \
|
2002-06-27 04:36:02 -07:00
|
|
|
cp dlltkanim.so $(STUBLIBDIR)/dlltkanim.so; \
|
2002-04-26 05:16:26 -07:00
|
|
|
fi
|
|
|
|
|
|
|
|
installopt: tkanim.cmxa
|
|
|
|
cp tkanim.cmxa tkanim.a $(INSTALLDIR)
|
|
|
|
|
|
|
|
depend: tkanim.ml
|
|
|
|
$(CAMLDEP) *.mli *.ml > .depend
|
|
|
|
|
|
|
|
include .depend
|