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 #
|
2001-12-07 05:41:02 -08:00
|
|
|
# under the terms of the GNU Library General Public License, with #
|
|
|
|
# the special exception on linking described in file ../../LICENSE. #
|
1999-11-17 10:59:06 -08:00
|
|
|
# #
|
|
|
|
#########################################################################
|
|
|
|
|
|
|
|
# $Id$
|
|
|
|
|
1995-09-07 05:31:26 -07:00
|
|
|
# Makefile for the str library
|
|
|
|
|
1996-02-13 08:29:09 -08:00
|
|
|
include ../../config/Makefile
|
1995-09-07 05:31:26 -07:00
|
|
|
|
|
|
|
# Compilation options
|
1995-09-28 10:15:00 -07:00
|
|
|
CC=$(BYTECC)
|
2002-12-09 06:05:18 -08:00
|
|
|
CFLAGS=-O -I../../byterun $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS)
|
2002-04-27 07:45:33 -07:00
|
|
|
CAMLC=../../ocamlcomp.sh
|
|
|
|
CAMLOPT=../../ocamlcompopt.sh
|
2007-01-29 04:11:18 -08:00
|
|
|
COMPFLAGS=-warn-error A -g
|
2002-12-09 06:05:18 -08:00
|
|
|
COBJS=strstubs.o
|
2001-11-08 02:32:24 -08:00
|
|
|
MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib
|
1995-09-07 05:31:26 -07:00
|
|
|
|
1995-10-23 09:57:13 -07:00
|
|
|
all: libstr.a str.cmi str.cma
|
|
|
|
|
|
|
|
allopt: libstr.a str.cmi str.cmxa
|
1995-09-07 05:31:26 -07:00
|
|
|
|
|
|
|
libstr.a: $(COBJS)
|
2001-08-28 07:47:48 -07:00
|
|
|
$(MKLIB) -o str $(COBJS)
|
1995-09-07 05:31:26 -07:00
|
|
|
|
|
|
|
str.cma: str.cmo
|
2001-08-28 07:47:48 -07:00
|
|
|
$(MKLIB) -ocamlc '$(CAMLC)' -o str str.cmo
|
1995-09-07 05:31:26 -07:00
|
|
|
|
1995-10-23 09:57:13 -07:00
|
|
|
str.cmxa: str.cmx
|
2001-08-28 07:47:48 -07:00
|
|
|
$(MKLIB) -ocamlopt '$(CAMLOPT)' -o str str.cmx
|
1995-10-23 09:57:13 -07:00
|
|
|
|
1999-02-13 15:09:35 -08:00
|
|
|
str.cmx: ../../ocamlopt
|
1995-11-26 12:23:16 -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-11-05 08:26:31 -08:00
|
|
|
rm -f *.a *.so *.o
|
1995-09-07 05:31:26 -07:00
|
|
|
|
|
|
|
install:
|
2002-06-27 04:36:02 -07:00
|
|
|
if test -f dllstr.so; then cp dllstr.so $(STUBLIBDIR)/dllstr.so; fi
|
1995-09-07 05:31:26 -07:00
|
|
|
cp libstr.a $(LIBDIR)/libstr.a
|
|
|
|
cd $(LIBDIR); $(RANLIB) libstr.a
|
1997-07-30 05:29:46 -07:00
|
|
|
cp str.cma str.cmi str.mli $(LIBDIR)
|
1995-09-07 05:31:26 -07:00
|
|
|
|
1995-10-23 09:57:13 -07:00
|
|
|
installopt:
|
1995-11-09 05:23:22 -08:00
|
|
|
cp str.cmx str.cmxa str.a $(LIBDIR)
|
1995-10-23 09:57:13 -07:00
|
|
|
cd $(LIBDIR); $(RANLIB) str.a
|
|
|
|
|
|
|
|
.SUFFIXES: .ml .mli .cmo .cmi .cmx
|
1995-09-07 05:31:26 -07:00
|
|
|
|
|
|
|
.mli.cmi:
|
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
.ml.cmo:
|
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
1995-10-23 09:57:13 -07:00
|
|
|
.ml.cmx:
|
|
|
|
$(CAMLOPT) -c $(COMPFLAGS) $<
|
|
|
|
|
1995-09-07 05:31:26 -07:00
|
|
|
depend:
|
|
|
|
gcc -MM $(CFLAGS) *.c > .depend
|
1999-02-13 15:09:35 -08:00
|
|
|
../../boot/ocamlrun ../../tools/ocamldep *.mli *.ml >> .depend
|
1995-09-07 05:31:26 -07:00
|
|
|
|
|
|
|
include .depend
|