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)
|
|
|
|
CFLAGS=-O -I$(REGEXLIB) -I../../byterun $(BYTECCCOMPOPTS)
|
1995-11-02 06:09:42 -08:00
|
|
|
CAMLC=../../boot/cslrun ../../boot/cslc -I ../../boot
|
|
|
|
CAMLOPT=../../boot/cslrun ../../cslopt -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
|
|
|
|
$(CAMLC) -a -o str.cma str.cmo
|
|
|
|
|
1995-10-23 09:57:13 -07:00
|
|
|
str.cmxa: str.cmx
|
|
|
|
$(CAMLOPT) -a -o str.cmxa str.cmx
|
|
|
|
|
1995-09-07 05:31:26 -07:00
|
|
|
$(REGEXLIB)/regex.o: $(REGEXLIB)/regex.c $(REGEXLIB)/regex.h
|
1995-11-06 08:21:20 -08:00
|
|
|
cd $(REGEXLIB); CC="$(CC)" sh configure; $(MAKE)
|
1995-09-07 05:31:26 -07:00
|
|
|
|
1995-11-26 12:23:16 -08:00
|
|
|
str.cmx: ../../cslopt
|
|
|
|
|
1995-09-07 05:31:26 -07:00
|
|
|
clean:
|
1995-11-06 03:09:03 -08:00
|
|
|
rm -f *.cm*
|
|
|
|
|
|
|
|
realclean: clean
|
|
|
|
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
|
|
|
|
cp str.cma str.cmi $(LIBDIR)
|
|
|
|
|
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
|
1995-11-02 06:09:42 -08:00
|
|
|
../../tools/csldep *.mli *.ml >> .depend
|
1995-09-07 05:31:26 -07:00
|
|
|
|
|
|
|
include .depend
|