summaryrefslogtreecommitdiff
path: root/otherlibs/graph/Makefile
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2001-08-28 14:47:48 +0000
committerXavier Leroy <xavier.leroy@inria.fr>2001-08-28 14:47:48 +0000
commitddd99c7e5d2f0f8e7364e8521fa7e8308999344e (patch)
tree3c0158d035a52c0cf185c08c3288c3c76d6718d0 /otherlibs/graph/Makefile
parentc345611817d76ccc3bbd02db1f942774220739f9 (diff)
downloadocaml-ddd99c7e5d2f0f8e7364e8521fa7e8308999344e.tar.gz
Chargement dynamique de primitives C
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3677 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/graph/Makefile')
-rw-r--r--otherlibs/graph/Makefile17
1 files changed, 7 insertions, 10 deletions
diff --git a/otherlibs/graph/Makefile b/otherlibs/graph/Makefile
index 5c320a432f..4cef66712a 100644
--- a/otherlibs/graph/Makefile
+++ b/otherlibs/graph/Makefile
@@ -17,10 +17,10 @@
include ../../config/Makefile
CC=$(BYTECC)
-CFLAGS=-I../../byterun $(X11_INCLUDES) -O $(BYTECCCOMPOPTS)
-
+CFLAGS=-I../../byterun $(X11_INCLUDES) -O $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS)
CAMLC=../../boot/ocamlrun ../../ocamlc -I ../../stdlib
CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib
+MKLIB=../../tools/ocamlmklib
OBJS=open.o draw.o fill.o color.o text.o \
image.o make_img.o dump_img.o point_col.o sound.o events.o \
@@ -33,25 +33,22 @@ all: libgraphics.a graphics.cmi graphics.cma
allopt: libgraphics.a graphics.cmi graphics.cmxa
libgraphics.a: $(OBJS)
- rm -f libgraphics.a
- ar rc libgraphics.a $(OBJS)
- $(RANLIB) libgraphics.a
+ $(MKLIB) -o graphics $(OBJS) $(X11_LINK)
graphics.cma: $(CAMLOBJS)
- $(CAMLC) -a -o graphics.cma -custom \
- $(CAMLOBJS) -cclib -lgraphics $(X11_LINK)
+ $(MKLIB) -ocamlc '$(CAMLC)' -o graphics $(CAMLOBJS) $(X11_LINK)
graphics.cmxa: $(CAMLOBJS:.cmo=.cmx)
- $(CAMLOPT) -a -o graphics.cmxa \
- $(CAMLOBJS:.cmo=.cmx) -cclib -lgraphics $(X11_LINK)
+ $(MKLIB) -ocamlopt '$(CAMLOPT)' -o graphics $(CAMLOBJS:.cmo=.cmx) $(X11_LINK)
partialclean:
rm -f *.cm*
clean: partialclean
- rm -f *.a *.o
+ rm -f *.a *.so *.o
install:
+ test -f libgraphics.so && cp libgraphics.so $(LIBDIR)/libgraphics.so
cp libgraphics.a $(LIBDIR)/libgraphics.a
cd $(LIBDIR); $(RANLIB) libgraphics.a
cp graphics.cm[ia] graphicsX11.cmi graphics.mli graphicsX11.mli $(LIBDIR)