ocaml/otherlibs/str/Makefile.nt

76 lines
2.0 KiB
Makefile
Raw Normal View History

#########################################################################
# #
# 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$
# Makefile for the str library
!include ..\..\config\Makefile.nt
# Compilation options
CC=$(BYTECC)
CFLAGS=-I$(REGEXLIB) -I..\..\byterun $(BYTECCCOMPOPTS)
CAMLC=..\..\boot\ocamlrun ..\..\ocamlc -I ..\..\boot
CAMLOPT=..\..\boot\ocamlrun ..\..\ocamlopt -I ..\..\stdlib
REGEXLIB=regex-0.12
REGEXFLAGS=-DREGEX_MALLOC -DSTDC_HEADERS $(BYTECCCOMPOPTS)
COBJS=strstubs.obj $(REGEXLIB)\regex.obj
all: libstr.lib str.cmi str.cma
allopt: libstr.lib str.cmi str.cmxa
libstr.lib: $(COBJS)
$(MKLIB)libstr.lib $(COBJS)
str.cma: str.cmo
$(CAMLC) -a -o str.cma -custom str.cmo -cclib -lstr
str.cmxa: str.cmx
$(CAMLOPT) -a -o str.cmxa str.cmx -cclib -lstr
$(REGEXLIB)\regex.obj: $(REGEXLIB)\regex.c $(REGEXLIB)\regex.h
cd $(REGEXLIB) & $(CC) $(REGEXFLAGS) -c regex.c
str.cmx: ..\..\ocamlopt
partialclean:
rm -f *.cm*
clean: partialclean
rm -f *.lib *.obj
rm -f $(REGEXLIB)/*.obj
install:
cp libstr.lib $(LIBDIR)\libstr.lib
cp str.cma str.cmi $(LIBDIR)
installopt:
cp str.cmx str.cmxa str.lib $(LIBDIR)
.SUFFIXES: .ml .mli .cmo .cmi .cmx
.mli.cmi:
$(CAMLC) -c $(COMPFLAGS) $<
.ml.cmo:
$(CAMLC) -c $(COMPFLAGS) $<
.ml.cmx:
$(CAMLOPT) -c $(COMPFLAGS) $<
depend:
gcc -MM $(CFLAGS) *.c > .depend
..\..\tools\ocamldep *.mli *.ml >> .depend
!include .depend