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)
|
2001-08-28 07:47:48 -07:00
|
|
|
CFLAGS=-O -I$(REGEXLIB) -I../../byterun $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS)
|
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
|
2002-01-20 07:12:32 -08:00
|
|
|
COMPFLAGS=-warn-error A
|
1995-09-07 05:31:26 -07:00
|
|
|
REGEXLIB=regex-0.12
|
|
|
|
COBJS=strstubs.o $(REGEXLIB)/regex.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
|
|
|
|
1995-09-07 05:31:26 -07:00
|
|
|
$(REGEXLIB)/regex.o: $(REGEXLIB)/regex.c $(REGEXLIB)/regex.h
|
2001-08-28 07:47:48 -07:00
|
|
|
cd $(REGEXLIB); CC="$(CC) $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS)" 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
|
2001-11-05 08:26:31 -08:00
|
|
|
rm -f *.a *.so *.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:
|
2001-10-30 01:32:32 -08:00
|
|
|
if test -f dllstr.so; then cp dllstr.so $(LIBDIR)/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
|