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-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)
|
1999-02-13 15:09:35 -08:00
|
|
|
CFLAGS=-O -I$(REGEXLIB) -I../../byterun $(BYTECCCOMPOPTS)
|
2000-02-05 04:16:09 -08:00
|
|
|
CAMLC=../../boot/ocamlrun ../../ocamlc -I ../../stdlib
|
1999-02-13 15:09:35 -08:00
|
|
|
CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib
|
1995-09-07 05:31:26 -07:00
|
|
|
REGEXLIB=regex-0.12
|
|
|
|
COBJS=strstubs.o $(REGEXLIB)/regex.o
|
|
|
|
|
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)
|
|
|
|
rm -f libstr.a
|
|
|
|
ar rc libstr.a $(COBJS)
|
|
|
|
$(RANLIB) libstr.a
|
|
|
|
|
|
|
|
str.cma: str.cmo
|
2000-03-09 01:12:28 -08:00
|
|
|
$(CAMLC) -a -o str.cma -custom str.cmo -cclib -lstr
|
1995-09-07 05:31:26 -07:00
|
|
|
|
1995-10-23 09:57:13 -07:00
|
|
|
str.cmxa: str.cmx
|
2000-03-09 01:12:28 -08:00
|
|
|
$(CAMLOPT) -a -o str.cmxa str.cmx -cclib -lstr
|
1995-10-23 09:57:13 -07:00
|
|
|
|
1995-09-07 05:31:26 -07:00
|
|
|
$(REGEXLIB)/regex.o: $(REGEXLIB)/regex.c $(REGEXLIB)/regex.h
|
1999-03-10 02:04:28 -08:00
|
|
|
cd $(REGEXLIB); CC="$(CC) $(BYTECCCOMPOPTS)" sh configure; $(MAKE)
|
1995-09-07 05:31:26 -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
|
1995-11-06 03:09:03 -08:00
|
|
|
rm -f *.a *.o
|
1995-12-05 05:09:02 -08:00
|
|
|
cd $(REGEXLIB); if test -f Makefile; then $(MAKE) distclean; else exit 0; fi
|
1995-09-07 05:31:26 -07:00
|
|
|
|
|
|
|
install:
|
|
|
|
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
|