ocaml/otherlibs/str/Makefile.nt

93 lines
2.6 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. #
# #
#########################################################################
# $Id$
# Makefile for the str library
!include ..\..\config\Makefile.nt
# Compilation options
CC=$(BYTECC)
CFLAGS=-I$(REGEXLIB) -I..\..\byterun
CAMLC=..\..\boot\ocamlrun ..\..\ocamlc -I ..\..\boot
CAMLOPT=..\..\boot\ocamlrun ..\..\ocamlopt -I ..\..\stdlib
REGEXLIB=regex-0.12
REGEXFLAGS=-DREGEX_MALLOC -DSTDC_HEADERS
COBJS=strstubs.obj $(REGEXLIB)\regex.obj
all: libstr.dll libstr.lib str.cmi str.cma
allopt: libstr.lib str.cmi str.cmxa
libstr.dll: $(COBJS:.obj=.dobj)
link /nologo /dll /out:libstr.dll /implib:tmp.lib $(COBJS:.obj=.dobj) ..\..\byterun\ocamlrun.lib
rm tmp.*
libstr.lib: $(COBJS:.obj=.sobj)
$(MKLIB)libstr.lib $(COBJS:.obj=.sobj)
str.cma: str.cmo
$(CAMLC) -a -o str.cma str.cmo -cclib -lstr
str.cmxa: str.cmx
$(CAMLOPT) -a -o str.cmxa str.cmx -cclib -lstr
$(REGEXLIB)\regex.dobj: $(REGEXLIB)\regex.c $(REGEXLIB)\regex.h
cd $(REGEXLIB) & $(CC) $(REGEXFLAGS) $(DLLCCCOMPOPTS) -c regex.c
mv $(REGEXLIB)\regex.obj $(REGEXLIB)\regex.dobj
$(REGEXLIB)\regex.sobj: $(REGEXLIB)\regex.c $(REGEXLIB)\regex.h
cd $(REGEXLIB) & $(CC) $(REGEXFLAGS) $(BYTECCCOMPOPTS) -c regex.c
mv $(REGEXLIB)\regex.obj $(REGEXLIB)\regex.sobj
str.cmx: ..\..\ocamlopt
partialclean:
rm -f *.cm*
clean: partialclean
rm -f *.lib *.dll *.dobj *.sobj
rm -f $(REGEXLIB)/*.dobj $(REGEXLIB)/*.sobj
install:
cp libstr.dll $(LIBDIR)\libstr.dll
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 .dobj .sobj
.mli.cmi:
$(CAMLC) -c $(COMPFLAGS) $<
.ml.cmo:
$(CAMLC) -c $(COMPFLAGS) $<
.ml.cmx:
$(CAMLOPT) -c $(COMPFLAGS) $<
.c.dobj:
$(BYTECC) $(DLLCCCOMPOPTS) $(CFLAGS) -c $<
mv $*.obj $*.dobj
.c.sobj:
$(BYTECC) $(BYTECCCOMPOPTS) $(CFLAGS) -c $<
mv $*.obj $*.sobj
depend:
str.cmo: str.cmi
str.cmx: str.cmi