1999-11-17 10:59:06 -08:00
|
|
|
#########################################################################
|
|
|
|
# #
|
|
|
|
# Objective Caml #
|
|
|
|
# #
|
|
|
|
# Xavier Leroy, projet Cristal, INRIA Rocquencourt #
|
|
|
|
# #
|
|
|
|
# Copyright 1999 Institut National de Recherche en Informatique et #
|
|
|
|
# en Automatique. All rights reserved. This file is distributed #
|
|
|
|
# under the terms of the GNU Library General Public License. #
|
|
|
|
# #
|
|
|
|
#########################################################################
|
|
|
|
|
|
|
|
# $Id$
|
|
|
|
|
1995-05-08 10:04:35 -07:00
|
|
|
# Makefile for the portable graphics library
|
|
|
|
|
1996-02-13 08:29:09 -08:00
|
|
|
include ../../config/Makefile
|
1995-05-08 10:04:35 -07:00
|
|
|
|
1995-08-09 02:39:43 -07:00
|
|
|
CC=$(BYTECC)
|
2001-08-28 07:47:48 -07:00
|
|
|
CFLAGS=-I../../byterun $(X11_INCLUDES) -O $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS)
|
2000-02-05 04:16:09 -08:00
|
|
|
CAMLC=../../boot/ocamlrun ../../ocamlc -I ../../stdlib
|
1996-04-30 07:53:58 -07:00
|
|
|
CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib
|
2001-08-28 07:47:48 -07:00
|
|
|
MKLIB=../../tools/ocamlmklib
|
1995-05-08 10:04:35 -07:00
|
|
|
|
|
|
|
OBJS=open.o draw.o fill.o color.o text.o \
|
2001-05-14 06:34:02 -07:00
|
|
|
image.o make_img.o dump_img.o point_col.o sound.o events.o \
|
2001-07-14 09:54:41 -07:00
|
|
|
subwindow.o
|
1995-05-08 10:04:35 -07:00
|
|
|
|
2001-07-12 08:32:23 -07:00
|
|
|
CAMLOBJS=graphics.cmo graphicsX11.cmo
|
|
|
|
|
1995-11-09 05:22:56 -08:00
|
|
|
all: libgraphics.a graphics.cmi graphics.cma
|
1995-05-08 10:04:35 -07:00
|
|
|
|
1997-03-08 04:15:43 -08:00
|
|
|
allopt: libgraphics.a graphics.cmi graphics.cmxa
|
1995-11-06 03:09:03 -08:00
|
|
|
|
1995-11-09 05:22:56 -08:00
|
|
|
libgraphics.a: $(OBJS)
|
2001-08-28 07:47:48 -07:00
|
|
|
$(MKLIB) -o graphics $(OBJS) $(X11_LINK)
|
1995-05-08 10:04:35 -07:00
|
|
|
|
2001-07-12 08:32:23 -07:00
|
|
|
graphics.cma: $(CAMLOBJS)
|
2001-08-28 07:47:48 -07:00
|
|
|
$(MKLIB) -ocamlc '$(CAMLC)' -o graphics $(CAMLOBJS) $(X11_LINK)
|
1995-05-08 10:04:35 -07:00
|
|
|
|
2001-07-12 08:32:23 -07:00
|
|
|
graphics.cmxa: $(CAMLOBJS:.cmo=.cmx)
|
2001-08-28 07:47:48 -07:00
|
|
|
$(MKLIB) -ocamlopt '$(CAMLOPT)' -o graphics $(CAMLOBJS:.cmo=.cmx) $(X11_LINK)
|
1997-03-08 04:15:43 -08:00
|
|
|
|
1997-02-16 05:36:42 -08:00
|
|
|
partialclean:
|
1995-11-06 03:09:03 -08:00
|
|
|
rm -f *.cm*
|
|
|
|
|
1997-02-16 05:36:42 -08:00
|
|
|
clean: partialclean
|
2001-08-28 07:47:48 -07:00
|
|
|
rm -f *.a *.so *.o
|
1995-05-08 10:04:35 -07:00
|
|
|
|
|
|
|
install:
|
2001-08-28 07:47:48 -07:00
|
|
|
test -f libgraphics.so && cp libgraphics.so $(LIBDIR)/libgraphics.so
|
1995-11-09 05:22:56 -08:00
|
|
|
cp libgraphics.a $(LIBDIR)/libgraphics.a
|
|
|
|
cd $(LIBDIR); $(RANLIB) libgraphics.a
|
2001-07-12 08:32:23 -07:00
|
|
|
cp graphics.cm[ia] graphicsX11.cmi graphics.mli graphicsX11.mli $(LIBDIR)
|
1995-05-08 10:04:35 -07:00
|
|
|
|
1995-11-06 03:09:03 -08:00
|
|
|
installopt:
|
1997-03-08 04:15:43 -08:00
|
|
|
cp graphics.cmxa graphics.a $(LIBDIR)
|
|
|
|
cd $(LIBDIR); $(RANLIB) graphics.a
|
1995-11-06 03:09:03 -08:00
|
|
|
|
1995-11-06 05:28:02 -08:00
|
|
|
.SUFFIXES: .ml .mli .cmo .cmi .cmx
|
1995-05-08 10:04:35 -07:00
|
|
|
|
|
|
|
.mli.cmi:
|
|
|
|
$(CAMLC) -c $<
|
|
|
|
.ml.cmo:
|
|
|
|
$(CAMLC) -c $<
|
1995-11-06 05:28:02 -08:00
|
|
|
.ml.cmx:
|
|
|
|
$(CAMLOPT) -c $(COMPFLAGS) $<
|
1995-05-08 10:04:35 -07:00
|
|
|
|
1996-10-07 07:03:20 -07:00
|
|
|
depend:
|
1995-05-08 10:04:35 -07:00
|
|
|
gcc -MM $(CFLAGS) *.c > .depend
|
1998-04-21 09:09:03 -07:00
|
|
|
../../boot/ocamlrun ../../tools/ocamldep *.mli *.ml >> .depend
|
1995-05-08 10:04:35 -07:00
|
|
|
|
|
|
|
include .depend
|