diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1996-02-22 12:52:45 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1996-02-22 12:52:45 +0000 |
commit | 2a386a8cdc99eb71939bbbfb8ac081ef589ed97d (patch) | |
tree | 04f942ea9ee6a1ec9728aa9556ca5e59ba357621 | |
parent | c3223fadf86b307256773b6356af2062fce1e86f (diff) |
Portage NT.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@655 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | otherlibs/num/Makefile.nt | 73 | ||||
-rw-r--r-- | otherlibs/num/bignum/Makefile.nt | 46 | ||||
-rw-r--r-- | otherlibs/num/test/Makefile.nt | 38 | ||||
-rw-r--r-- | otherlibs/str/Makefile.nt | 61 | ||||
-rw-r--r-- | otherlibs/str/regex-0.12/regex.h | 5 |
5 files changed, 223 insertions, 0 deletions
diff --git a/otherlibs/num/Makefile.nt b/otherlibs/num/Makefile.nt new file mode 100644 index 000000000..3d9a147c5 --- /dev/null +++ b/otherlibs/num/Makefile.nt @@ -0,0 +1,73 @@ +# Makefile for the "num" (exact rational arithmetic) library + +!include ..\..\config\Makefile.nt + +# Compilation options +CC=$(BYTECC) +CFLAGS=-O -I.\bignum\h -I..\..\byterun $(BYTECCCOMPOPTS) +CAMLC=..\..\boot\cslrun ..\..\boot\cslc -I ..\..\boot +CAMLOPT=..\..\boot\cslrun ..\..\cslopt -I ..\..\stdlib + +CAMLOBJS=int_misc.cmo string_misc.cmo nat.cmo big_int.cmo arith_flags.cmo \ + ratio.cmo num.cmo arith_status.cmo + +CAMLINTF=big_int.cmi nat.cmi num.cmi ratio.cmi arith_status.cmi + +COBJS=nat_stubs.obj + +all: libnums.lib nums.cma $(CMIFILES) + +allopt: libnums.lib nums.cmxa $(CMIFILES) + +nums.cma: $(CAMLOBJS) + $(CAMLC) -a -o nums.cma $(CAMLOBJS) + +nums.cmxa: $(CAMLOBJS:.cmo=.cmx) + $(CAMLOPT) -a -o nums.cmxa $(CAMLOBJS:.cmo=.cmx) + +libnums.lib: bignum\libbignum.lib $(COBJS) + $(MKLIB)libnums.lib bignum\libbignum.lib $(COBJS) + +bignum\libbignum.lib: + cd bignum & $(MAKEREC) + +$(CAMLOBJS:.cmo=.cmx): ..\..\cslopt + +install: + cp libnums.lib $(LIBDIR)\libnums.lib + cp nums.cma $(CAMLINTF) $(LIBDIR) + +installopt: + cp $(CAMLOBJS:.cmo=.cmx) nums.cmxa nums.lib $(LIBDIR) + +clean: + rm -f *.cm* + +realclean: clean + rm -f *.lib *.obj + rm -f nat.ml int_misc.ml + cd bignum & $(MAKEREC) clean + cd test & $(MAKEREC) clean + +.SUFFIXES: .ml .mli .mlp .cmi .cmo .cmx + +.mli.cmi: + $(CAMLC) -c $(COMPFLAGS) $< + +.ml.cmo: + $(CAMLC) -c $(COMPFLAGS) $< + +.ml.cmx: + $(CAMLOPT) -c $(COMPFLAGS) $< + +.mlp.ml: + $(CPP) $< > $@ + +int_misc.ml: int_misc.mlp +nat.ml: nat.mlp +nat_stubs.obj: nat.h + +depend: + sed -e "s/\.o/.obj/g" .depend > .depend.nt + +!include .depend.nt diff --git a/otherlibs/num/bignum/Makefile.nt b/otherlibs/num/bignum/Makefile.nt new file mode 100644 index 000000000..ec513e343 --- /dev/null +++ b/otherlibs/num/bignum/Makefile.nt @@ -0,0 +1,46 @@ +CC = cl /nologo +LIB = libbignum.lib +OBJECT = o\KerN.obj o\bnInit.obj o\bnMult.obj o\bnDivide.obj o\bnCmp.obj o\bzf.obj o\bz.obj +KERNH = h\BigNum.h +CFLAGS = -c -I.\h -Ox -DCAML_LIGHT + +all: $(LIB) + +scratch: + rm -f o\*.obj libbignum.lib + +# build the BigNum library +$(LIB): $(OBJECT) + lib /out:$(LIB) $(OBJECT) + +o\KerN.obj: c\KerN.c + $(CC) $(CFLAGS) c\KerN.c + mv KerN.obj o + +o\bnInit.obj: c\bn\bnInit.c $(KERNH) + $(CC) $(CFLAGS) c\bn\bnInit.c + mv bnInit.obj o + +o\bnMult.obj: c\bn\bnMult.c $(KERNH) + $(CC) $(CFLAGS) c\bn\bnMult.c + mv bnMult.obj o + +o\bnDivide.obj: c\bn\bnDivide.c $(KERNH) + $(CC) $(CFLAGS) c\bn\bnDivide.c + mv bnDivide.obj o + +o\bnCmp.obj: c\bn\bnCmp.c $(KERNH) + $(CC) $(CFLAGS) c\bn\bnCmp.c + mv bnCmp.obj o + +o\bz.obj: c\bz.c h/BigZ.h $(KERNH) + $(CC) $(CFLAGS) c\bz.c + mv bz.obj o + +o\br.obj: c\br.c h/BigR.h h/BigZ.h $(KERNH) + $(CC) $(CFLAGS) c\br.c + mv br.obj o + +o\bzf.obj: c\bzf.c h/BigZ.h $(KERNH) + $(CC) $(CFLAGS) c\bzf.c + mv bzf.obj o diff --git a/otherlibs/num/test/Makefile.nt b/otherlibs/num/test/Makefile.nt new file mode 100644 index 000000000..903b23c9c --- /dev/null +++ b/otherlibs/num/test/Makefile.nt @@ -0,0 +1,38 @@ +CAMLC=..\..\..\boot\cslrun ..\..\..\cslc -I ..\..\..\stdlib +CAMLOPT=..\..\..\boot\cslrun ..\..\..\cslopt -I ..\..\..\stdlib + +test: test.byt test.opt + .\test.byt + .\test.opt + +TESTFILES=test.cmo \ + test_nats.cmo test_big_ints.cmo test_ratios.cmo test_nums.cmo end_test.cmo + +TESTOPTFILES=$(TESTFILES:.cmo=.cmx) + +test.byt: $(TESTFILES) ..\nums.cma ..\libnums.lib + $(CAMLC) -o test.byt -custom ..\nums.cma $(TESTFILES) ..\libnums.lib + +test.opt: $(TESTOPTFILES) ..\nums.cmxa ..\libnums.lib + $(CAMLOPT) -o test.opt ..\nums.cmxa $(TESTOPTFILES) ..\libnums.lib + +$(TESTOPTFILES): ..\..\..\cslopt + +.SUFFIXES: .ml .cmo .cmx + +.ml.cmo: + $(CAMLC) -I .. -c $< + +.ml.cmx: + $(CAMLOPT) -I .. -c $< + +csltopnum: + cslmktop -o csltopnum -custom ..\nums.cma ..\libnums.lib + +clean: + rm -f test.byt test.opt *.obj *.cm? csltopnum + +depend: + csldep *.ml > .depend + +!include .depend diff --git a/otherlibs/str/Makefile.nt b/otherlibs/str/Makefile.nt new file mode 100644 index 000000000..ba7d951e2 --- /dev/null +++ b/otherlibs/str/Makefile.nt @@ -0,0 +1,61 @@ +# Makefile for the str library + +!include ..\..\config\Makefile.nt + +# Compilation options +CC=$(BYTECC) +CFLAGS=-I$(REGEXLIB) -I..\..\byterun $(BYTECCCOMPOPTS) +CAMLC=..\..\boot\cslrun ..\..\boot\cslc -I ..\..\boot +CAMLOPT=..\..\boot\cslrun ..\..\cslopt -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 str.cmo + +str.cmxa: str.cmx + $(CAMLOPT) -a -o str.cmxa str.cmx + +$(REGEXLIB)\regex.obj: $(REGEXLIB)\regex.c $(REGEXLIB)\regex.h + cd $(REGEXLIB) & $(CC) $(REGEXFLAGS) -c regex.c + +str.cmx: ..\..\cslopt + +clean: + rm -f *.cm* + +realclean: clean + 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\csldep *.mli *.ml >> .depend + +!include .depend diff --git a/otherlibs/str/regex-0.12/regex.h b/otherlibs/str/regex-0.12/regex.h index 408dd2103..69c3f44b6 100644 --- a/otherlibs/str/regex-0.12/regex.h +++ b/otherlibs/str/regex-0.12/regex.h @@ -29,6 +29,11 @@ #include <stddef.h> #endif +#ifdef _WIN32 +/* Same for Microsoft Visual C++ */ +#include <stddef.h> +#endif + /* The following bits are used to determine the regexp syntax we recognize. The set/not-set meanings are chosen so that Emacs syntax |