84 lines
2.2 KiB
Makefile
84 lines
2.2 KiB
Makefile
#########################################################################
|
|
# #
|
|
# 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, with #
|
|
# the special exception on linking described in file ../../LICENSE. #
|
|
# #
|
|
#########################################################################
|
|
|
|
# $Id$
|
|
|
|
# Makefile for the str library
|
|
|
|
include ../../config/Makefile
|
|
|
|
# Compilation options
|
|
CC=$(BYTECC)
|
|
CFLAGS=-I../../byterun
|
|
CAMLC=../../boot/ocamlrun ../../ocamlc -I ../../boot
|
|
CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib
|
|
DCOBJS=strstubs.$(DO)
|
|
SCOBJS=strstubs.$(SO)
|
|
|
|
all: dllstr.dll libstr.$(A) str.cmi str.cma
|
|
|
|
allopt: libstr.$(A) str.cmi str.cmxa
|
|
|
|
dllstr.dll: $(DCOBJS)
|
|
$(call MKDLL,dllstr.dll,tmp.$(A),$(DCOBJS) ../../byterun/ocamlrun.$(A))
|
|
rm tmp.*
|
|
|
|
libstr.$(A): $(SCOBJS)
|
|
$(call MKLIB,libstr.$(A),$(SCOBJS))
|
|
|
|
str.cma: str.cmo
|
|
$(CAMLC) -a -o str.cma str.cmo -dllib -lstr -cclib -lstr
|
|
|
|
str.cmxa: str.cmx
|
|
$(CAMLOPT) -a -o str.cmxa str.cmx -cclib -lstr
|
|
|
|
str.cmx: ../../ocamlopt
|
|
|
|
partialclean:
|
|
rm -f *.cm*
|
|
|
|
clean: partialclean
|
|
rm -f *.$(A) *.dll *.$(O) *.$(SO)
|
|
|
|
install:
|
|
cp dllstr.dll $(STUBLIBDIR)/dllstr.dll
|
|
cp libstr.$(A) $(LIBDIR)/libstr.$(A)
|
|
cp str.cma str.cmi $(LIBDIR)
|
|
|
|
installopt:
|
|
cp str.cmx str.cmxa str.$(A) $(LIBDIR)
|
|
|
|
.SUFFIXES: .ml .mli .cmo .cmi .cmx .$(DO) .$(SO)
|
|
|
|
.mli.cmi:
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
.ml.cmo:
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
.ml.cmx:
|
|
$(CAMLOPT) -c $(COMPFLAGS) $<
|
|
|
|
.c.$(DO):
|
|
$(BYTECC) $(DLLCCCOMPOPTS) $(CFLAGS) -c $<
|
|
mv $*.$(O) $*.$(DO)
|
|
|
|
.c.$(SO):
|
|
$(BYTECC) $(BYTECCCOMPOPTS) $(CFLAGS) -c $<
|
|
mv $*.$(O) $*.$(SO)
|
|
|
|
depend:
|
|
|
|
str.cmo: str.cmi
|
|
str.cmx: str.cmi
|