1995-05-04 03:15:53 -07:00
|
|
|
# The main Makefile
|
|
|
|
|
|
|
|
include config/Makefile.h
|
|
|
|
include Makefile.config
|
|
|
|
|
|
|
|
CAMLC=boot/camlrun boot/camlc -I boot
|
1995-07-12 07:22:01 -07:00
|
|
|
CAMLOPT=boot/camlrun ./camlopt -I stdlib
|
1995-05-04 03:15:53 -07:00
|
|
|
COMPFLAGS=$(INCLUDES)
|
|
|
|
LINKFLAGS=
|
|
|
|
CAMLYACC=boot/camlyacc
|
|
|
|
YACCFLAGS=
|
|
|
|
CAMLLEX=boot/camlrun boot/camllex
|
1995-08-25 06:53:40 -07:00
|
|
|
CAMLDEP=boot/camlrun tools/camldep
|
1995-05-04 03:15:53 -07:00
|
|
|
DEPFLAGS=$(INCLUDES)
|
|
|
|
CAMLRUN=byterun/camlrun
|
|
|
|
|
1995-07-02 09:40:47 -07:00
|
|
|
INCLUDES=-I utils -I parsing -I typing -I bytecomp -I asmcomp -I driver -I toplevel
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1995-05-30 06:36:40 -07:00
|
|
|
UTILS=utils/misc.cmo utils/tbl.cmo utils/config.cmo \
|
1995-10-09 06:37:11 -07:00
|
|
|
utils/clflags.cmo utils/terminfo.cmo utils/digest.cmo
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1995-09-28 03:40:19 -07:00
|
|
|
PARSING=parsing/location.cmo parsing/longident.cmo \
|
|
|
|
parsing/parser.cmo parsing/lexer.cmo parsing/parse.cmo
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1995-07-27 10:38:09 -07:00
|
|
|
TYPING=typing/ident.cmo typing/path.cmo \
|
|
|
|
typing/primitive.cmo typing/typedtree.cmo \
|
1995-05-04 03:15:53 -07:00
|
|
|
typing/subst.cmo typing/printtyp.cmo \
|
1995-07-25 04:36:29 -07:00
|
|
|
typing/predef.cmo typing/datarepr.cmo typing/env.cmo \
|
1995-05-04 03:15:53 -07:00
|
|
|
typing/ctype.cmo typing/mtype.cmo \
|
|
|
|
typing/includecore.cmo typing/includemod.cmo typing/parmatch.cmo \
|
|
|
|
typing/typetexp.cmo typing/typecore.cmo \
|
|
|
|
typing/typedecl.cmo typing/typemod.cmo
|
|
|
|
|
1995-07-02 09:40:47 -07:00
|
|
|
COMP=bytecomp/lambda.cmo bytecomp/printlambda.cmo \
|
1995-06-18 07:43:13 -07:00
|
|
|
bytecomp/dectree.cmo bytecomp/matching.cmo \
|
1995-07-18 01:39:40 -07:00
|
|
|
bytecomp/translcore.cmo bytecomp/translmod.cmo \
|
|
|
|
bytecomp/runtimedef.cmo
|
1995-07-02 09:40:47 -07:00
|
|
|
|
1995-07-12 08:30:16 -07:00
|
|
|
BYTECOMP=bytecomp/meta.cmo bytecomp/instruct.cmo bytecomp/bytegen.cmo \
|
1995-05-04 03:15:53 -07:00
|
|
|
bytecomp/printinstr.cmo bytecomp/opcodes.cmo bytecomp/emitcode.cmo \
|
1995-07-18 01:39:40 -07:00
|
|
|
bytecomp/symtable.cmo bytecomp/bytelibrarian.cmo bytecomp/bytelink.cmo
|
1995-07-02 09:40:47 -07:00
|
|
|
|
|
|
|
ASMCOMP=asmcomp/arch.cmo asmcomp/cmm.cmo asmcomp/printcmm.cmo \
|
1995-07-25 04:36:29 -07:00
|
|
|
asmcomp/reg.cmo asmcomp/mach.cmo asmcomp/proc.cmo \
|
1995-07-02 09:40:47 -07:00
|
|
|
asmcomp/clambda.cmo asmcomp/compilenv.cmo \
|
|
|
|
asmcomp/closure.cmo asmcomp/cmmgen.cmo \
|
1995-08-24 06:18:55 -07:00
|
|
|
asmcomp/printmach.cmo asmcomp/selection.cmo asmcomp/liveness.cmo \
|
|
|
|
asmcomp/spill.cmo asmcomp/split.cmo \
|
1995-07-02 09:40:47 -07:00
|
|
|
asmcomp/interf.cmo asmcomp/coloring.cmo asmcomp/reload.cmo \
|
1995-08-13 02:31:50 -07:00
|
|
|
asmcomp/printlinear.cmo asmcomp/linearize.cmo asmcomp/scheduling.cmo \
|
|
|
|
asmcomp/emitaux.cmo asmcomp/emit.cmo asmcomp/asmgen.cmo \
|
1995-07-11 11:02:00 -07:00
|
|
|
asmcomp/asmlink.cmo asmcomp/asmlibrarian.cmo
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
DRIVER=driver/errors.cmo driver/compile.cmo driver/main.cmo
|
|
|
|
|
1995-07-02 09:40:47 -07:00
|
|
|
OPTDRIVER=driver/opterrors.cmo driver/optcompile.cmo driver/optmain.cmo
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
TOPLEVEL=driver/errors.cmo driver/compile.cmo \
|
1995-09-14 04:51:35 -07:00
|
|
|
toplevel/printval.cmo toplevel/toploop.cmo \
|
|
|
|
toplevel/trace.cmo toplevel/topdirs.cmo
|
1995-08-28 04:44:00 -07:00
|
|
|
|
|
|
|
TOPLEVELMAIN=toplevel/topmain.cmo
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1995-07-02 09:40:47 -07:00
|
|
|
COMPOBJS=$(UTILS) $(PARSING) $(TYPING) $(COMP) $(BYTECOMP) $(DRIVER)
|
|
|
|
|
1995-08-28 04:44:00 -07:00
|
|
|
TOPLIB=$(UTILS) $(PARSING) $(TYPING) $(COMP) $(BYTECOMP) $(TOPLEVEL)
|
|
|
|
|
|
|
|
TOPOBJS=$(TOPLIB) $(TOPLEVELMAIN)
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1995-07-02 09:40:47 -07:00
|
|
|
OPTOBJS=$(UTILS) $(PARSING) $(TYPING) $(COMP) $(ASMCOMP) $(OPTDRIVER)
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1995-05-30 06:36:40 -07:00
|
|
|
EXPUNGEOBJS=utils/misc.cmo utils/tbl.cmo \
|
1995-05-04 03:15:53 -07:00
|
|
|
utils/config.cmo utils/clflags.cmo \
|
|
|
|
typing/ident.cmo typing/predef.cmo \
|
|
|
|
bytecomp/runtimedef.cmo bytecomp/symtable.cmo \
|
|
|
|
toplevel/expunge.cmo
|
|
|
|
|
1995-05-30 06:36:40 -07:00
|
|
|
PERVASIVES=arg array char filename format hashtbl lexing list map \
|
1995-05-09 02:33:58 -07:00
|
|
|
obj parsing pervasives printexc printf queue set sort stack string sys
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
# Recompile the system using the bootstrap compiler
|
1995-08-28 04:44:00 -07:00
|
|
|
all: runtime camlc camllex camlyacc camltools library camltop
|
1995-06-18 07:43:13 -07:00
|
|
|
|
|
|
|
# The compilation of camltop will fail if the runtime has changed.
|
|
|
|
# Never mind, just do make bootstrap to reach fixpoint again.
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
# Compile everything the first time
|
1995-07-10 02:48:27 -07:00
|
|
|
world: coldstart clean all
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1995-06-18 07:43:13 -07:00
|
|
|
# Complete bootstrapping cycle
|
1995-07-02 09:40:47 -07:00
|
|
|
bootstrap:
|
1995-07-07 05:04:35 -07:00
|
|
|
# Save the original bootstrap compiler
|
1995-07-02 09:40:47 -07:00
|
|
|
$(MAKE) backup
|
1995-07-07 05:04:35 -07:00
|
|
|
# Promote the new compiler but keep the old runtime
|
|
|
|
# This compiler runs on boot/camlrun and produces bytecode for byterun/camlrun
|
1995-07-02 09:40:47 -07:00
|
|
|
$(MAKE) promote-cross
|
1995-07-07 05:04:35 -07:00
|
|
|
# Rebuild camlc and camllex (run on byterun/camlrun)
|
1995-07-02 09:40:47 -07:00
|
|
|
$(MAKE) clean
|
|
|
|
$(MAKE) camlc camllex
|
1995-07-07 05:04:35 -07:00
|
|
|
# Rebuild the library (using byterun/camlrun ./camlc)
|
1995-07-02 09:40:47 -07:00
|
|
|
$(MAKE) library-cross
|
1995-07-07 05:04:35 -07:00
|
|
|
# Promote the new compiler and the new runtime
|
1995-07-02 09:40:47 -07:00
|
|
|
$(MAKE) promote
|
1995-08-28 04:44:00 -07:00
|
|
|
# Rebuild everything, including camltop and the tools
|
1995-07-02 09:40:47 -07:00
|
|
|
$(MAKE) clean
|
|
|
|
$(MAKE) all
|
1995-07-07 05:04:35 -07:00
|
|
|
# Check if fixpoint reached
|
1995-07-02 09:40:47 -07:00
|
|
|
$(MAKE) compare
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
# Start up the system from the distribution compiler
|
|
|
|
coldstart:
|
|
|
|
cd byterun; $(MAKE) all
|
|
|
|
cp byterun/camlrun boot/camlrun
|
|
|
|
cd yacc; $(MAKE) all
|
|
|
|
cp yacc/camlyacc boot/camlyacc
|
|
|
|
cd stdlib; $(MAKE) COMPILER=../boot/camlc all
|
1995-05-04 04:48:01 -07:00
|
|
|
cp stdlib/stdlib.cma stdlib/*.cmi stdlib/cslheader boot
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1995-06-18 07:43:13 -07:00
|
|
|
# Save the current bootstrap compiler
|
|
|
|
backup:
|
1995-09-11 07:57:21 -07:00
|
|
|
if test -d boot/Saved; then : ; else mkdir boot/Saved; fi
|
1995-05-04 03:15:53 -07:00
|
|
|
mv boot/Saved boot/Saved.prev
|
|
|
|
mkdir boot/Saved
|
|
|
|
mv boot/Saved.prev boot/Saved/Saved.prev
|
1995-06-18 07:43:13 -07:00
|
|
|
cp boot/camlrun boot/Saved
|
|
|
|
mv boot/camlc boot/camllex boot/camlyacc boot/Saved
|
1995-05-04 04:48:01 -07:00
|
|
|
mv boot/*.cmi boot/stdlib.cma boot/cslheader boot/Saved
|
1995-06-18 07:43:13 -07:00
|
|
|
|
|
|
|
# Promote the newly compiled system to the rank of cross compiler
|
|
|
|
# (Runs on the old runtime, produces code for the new runtime)
|
|
|
|
promote-cross:
|
1995-05-04 03:15:53 -07:00
|
|
|
cp camlc boot/camlc
|
|
|
|
cp lex/camllex boot/camllex
|
|
|
|
cp yacc/camlyacc boot/camlyacc
|
1995-05-04 04:48:01 -07:00
|
|
|
cp stdlib/stdlib.cma stdlib/*.cmi stdlib/cslheader boot
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1995-06-18 07:43:13 -07:00
|
|
|
# Promote the newly compiled system to the rank of bootstrap compiler
|
|
|
|
# (Runs on the new runtime, produces code for the new runtime)
|
|
|
|
promote: promote-cross
|
|
|
|
cp byterun/camlrun boot/camlrun
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
# Restore the saved bootstrap compiler if a problem arises
|
|
|
|
restore:
|
|
|
|
mv boot/Saved/* boot
|
|
|
|
rmdir boot/Saved
|
|
|
|
mv boot/Saved.prev boot/Saved
|
|
|
|
|
|
|
|
# Check if fixpoint reached
|
|
|
|
compare:
|
1995-05-04 04:48:01 -07:00
|
|
|
@if cmp boot/camlc camlc && cmp boot/camllex lex/camllex; \
|
1995-05-04 03:15:53 -07:00
|
|
|
then echo "Fixpoint reached, bootstrap succeeded."; \
|
|
|
|
else echo "Fixpoint not reached, try one more bootstrapping cycle."; \
|
|
|
|
fi
|
|
|
|
|
1995-05-04 04:48:01 -07:00
|
|
|
# Remove old bootstrap compilers
|
|
|
|
cleanboot:
|
|
|
|
rm -rf boot/Saved/Saved.prev/*
|
|
|
|
|
1995-07-21 02:03:58 -07:00
|
|
|
# Compile the native-code compiler
|
1995-08-25 01:45:40 -07:00
|
|
|
opt: runtimeopt camlopt libraryopt
|
1995-07-21 02:03:58 -07:00
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
# Installation
|
|
|
|
install:
|
1995-09-11 07:57:21 -07:00
|
|
|
if test -d $(BINDIR); then : ; else mkdir $(BINDIR); fi
|
|
|
|
if test -d $(LIBDIR); then : ; else mkdir $(LIBDIR); fi
|
|
|
|
if test -d $(MANDIR); then : ; else mkdir $(MANDIR); fi
|
1995-05-04 03:15:53 -07:00
|
|
|
cd byterun; $(MAKE) install
|
|
|
|
cp camlc $(BINDIR)/cslc
|
|
|
|
cp camltop $(BINDIR)/csltop
|
|
|
|
cd stdlib; $(MAKE) install
|
|
|
|
cp lex/camllex $(BINDIR)/csllex
|
|
|
|
cp yacc/camlyacc $(BINDIR)/cslyacc
|
1995-08-28 04:44:00 -07:00
|
|
|
$(CAMLC) -a -o $(LIBDIR)/toplevellib.cma $(TOPLIB)
|
|
|
|
cp toplevel/topmain.cmo $(LIBDIR)
|
|
|
|
cp toplevel/toploop.cmi toplevel/topdirs.cmi $(LIBDIR)
|
1995-05-09 02:33:58 -07:00
|
|
|
cp tools/camldep $(BINDIR)/csldep
|
|
|
|
cp tools/camlmktop $(BINDIR)/cslmktop
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1995-07-21 02:03:58 -07:00
|
|
|
# Installation of the native-code compiler
|
|
|
|
installopt:
|
|
|
|
cd asmrun; $(MAKE) install
|
|
|
|
cp camlopt $(BINDIR)/cslopt
|
|
|
|
cd stdlib; $(MAKE) installopt
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
realclean:: clean
|
|
|
|
|
|
|
|
# The compiler
|
|
|
|
|
|
|
|
camlc: $(COMPOBJS)
|
|
|
|
$(CAMLC) $(LINKFLAGS) -o camlc $(COMPOBJS)
|
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f camlc
|
|
|
|
|
1995-07-02 09:40:47 -07:00
|
|
|
# The native-code compiler
|
|
|
|
|
|
|
|
camlopt: $(OPTOBJS)
|
|
|
|
$(CAMLC) $(LINKFLAGS) -o camlopt $(OPTOBJS)
|
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f camlopt
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
# The toplevel
|
|
|
|
|
|
|
|
camltop: $(TOPOBJS) expunge
|
|
|
|
$(CAMLC) $(LINKFLAGS) -linkall -o camltop.tmp $(TOPOBJS)
|
1995-06-18 07:43:13 -07:00
|
|
|
- $(CAMLRUN) ./expunge camltop.tmp camltop $(PERVASIVES)
|
1995-05-04 03:15:53 -07:00
|
|
|
rm -f camltop.tmp
|
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f camltop
|
|
|
|
|
|
|
|
# The configuration file
|
|
|
|
|
|
|
|
utils/config.ml: utils/config.mlp Makefile.config
|
1995-07-02 09:40:47 -07:00
|
|
|
@rm -f utils/config.ml
|
1995-05-04 03:15:53 -07:00
|
|
|
sed -e 's|%%LIBDIR%%|$(LIBDIR)|' \
|
1995-09-27 03:46:25 -07:00
|
|
|
-e 's|%%BYTECC%%|$(BYTECC) $(BYTECCLINKFLAGS) $(LOWADDRESSES)|' \
|
|
|
|
-e 's|%%NATIVECC%%|$(NATIVECC) $(NATIVECCLINKFLAGS)|' \
|
1995-05-04 03:15:53 -07:00
|
|
|
-e 's|%%CCLIBS%%|$(CCLIBS)|' \
|
1995-08-08 05:17:31 -07:00
|
|
|
-e 's|%%ARCH%%|$(ARCH)|' \
|
|
|
|
-e 's|%%SYSTEM%%|$(SYSTEM)|' \
|
1995-05-04 03:15:53 -07:00
|
|
|
utils/config.mlp > utils/config.ml
|
1995-07-02 09:40:47 -07:00
|
|
|
@chmod -w utils/config.ml
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f utils/config.ml
|
|
|
|
|
1995-07-02 09:40:47 -07:00
|
|
|
beforedepend:: utils/config.ml
|
|
|
|
|
1995-07-12 07:22:01 -07:00
|
|
|
# The parser generator
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
parsing/parser.mli parsing/parser.ml: parsing/parser.mly
|
|
|
|
$(CAMLYACC) $(YACCFLAGS) parsing/parser.mly
|
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f parsing/parser.mli parsing/parser.ml parsing/parser.output
|
|
|
|
|
|
|
|
beforedepend:: parsing/parser.mli parsing/parser.ml
|
|
|
|
|
1995-07-12 07:22:01 -07:00
|
|
|
# The lexer generator
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
parsing/lexer.ml: parsing/lexer.mll
|
|
|
|
$(CAMLLEX) parsing/lexer.mll
|
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f parsing/lexer.ml
|
|
|
|
|
|
|
|
beforedepend:: parsing/lexer.ml
|
|
|
|
|
1995-07-12 07:22:01 -07:00
|
|
|
# The compiler compiled with the native-code compiler
|
1995-09-19 06:47:32 -07:00
|
|
|
# Currently not working because it requires C primitives from byterun/meta.c
|
|
|
|
# which are not provided by asmrun/libasmrun.a
|
1995-07-12 07:22:01 -07:00
|
|
|
|
1995-09-19 06:47:32 -07:00
|
|
|
# camlc.opt: $(COMPOBJS:.cmo=.cmx)
|
|
|
|
# $(CAMLOPT) $(LINKFLAGS) -o camlc.opt $(COMPOBJS:.cmo=.cmx)
|
1995-07-12 07:22:01 -07:00
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f camlc.opt
|
|
|
|
|
|
|
|
# The native-code compiler compiled with itself
|
|
|
|
|
|
|
|
camlopt.opt: $(OPTOBJS:.cmo=.cmx)
|
1995-07-12 08:30:16 -07:00
|
|
|
$(CAMLOPT) $(LINKFLAGS) -o camlopt.opt $(OPTOBJS:.cmo=.cmx)
|
1995-07-12 07:22:01 -07:00
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f camlopt.opt
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
# The numeric opcodes
|
|
|
|
|
|
|
|
bytecomp/opcodes.ml: byterun/instruct.h
|
|
|
|
sed -n -e '/^enum/p' -e 's/,//g' -e '/^ /p' byterun/instruct.h | \
|
|
|
|
awk -f tools/make-opcodes > bytecomp/opcodes.ml
|
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f bytecomp/opcodes.ml
|
|
|
|
|
|
|
|
beforedepend:: bytecomp/opcodes.ml
|
|
|
|
|
|
|
|
# The predefined exceptions and primitives
|
|
|
|
|
|
|
|
runtime/primitives:
|
|
|
|
cd runtime; make primitives
|
|
|
|
|
|
|
|
bytecomp/runtimedef.ml: byterun/primitives byterun/fail.h
|
|
|
|
(echo 'let builtin_exceptions = [|'; \
|
|
|
|
sed -n -e 's|.*/\* \("[A-Za-z_]*"\) \*/$$| \1;|p' byterun/fail.h | \
|
|
|
|
sed -e '$$s/;$$//'; \
|
|
|
|
echo '|]'; \
|
|
|
|
echo 'let builtin_primitives = [|'; \
|
|
|
|
sed -e 's/.*/ "&";/' -e '$$s/;$$//' byterun/primitives; \
|
|
|
|
echo '|]') > bytecomp/runtimedef.ml
|
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f bytecomp/runtimedef.ml
|
|
|
|
|
|
|
|
beforedepend:: bytecomp/runtimedef.ml
|
|
|
|
|
1995-07-02 09:40:47 -07:00
|
|
|
# Choose the right arch, emit and proc files
|
|
|
|
|
|
|
|
asmcomp/arch.ml: asmcomp/arch_$(ARCH).ml
|
|
|
|
ln -s arch_$(ARCH).ml asmcomp/arch.ml
|
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f asmcomp/arch.ml
|
|
|
|
|
|
|
|
beforedepend:: asmcomp/arch.ml
|
|
|
|
|
|
|
|
asmcomp/proc.ml: asmcomp/proc_$(ARCH).ml
|
|
|
|
ln -s proc_$(ARCH).ml asmcomp/proc.ml
|
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f asmcomp/proc.ml
|
|
|
|
|
|
|
|
beforedepend:: asmcomp/proc.ml
|
|
|
|
|
|
|
|
# Preprocess the code emitters
|
|
|
|
|
|
|
|
asmcomp/emit.ml: asmcomp/emit_$(ARCH).mlp tools/cvt_emit
|
1995-08-10 05:50:19 -07:00
|
|
|
perl tools/cvt_emit asmcomp/emit_$(ARCH).mlp > asmcomp/emit.ml \
|
|
|
|
|| { rm -f asmcomp/emit.ml; exit 2; }
|
1995-07-02 09:40:47 -07:00
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f asmcomp/emit.ml
|
|
|
|
|
|
|
|
beforedepend:: asmcomp/emit.ml
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
# The "expunge" utility
|
|
|
|
|
|
|
|
expunge: $(EXPUNGEOBJS)
|
|
|
|
$(CAMLC) $(LINKFLAGS) -o expunge $(EXPUNGEOBJS)
|
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f expunge
|
|
|
|
|
1995-07-21 02:03:58 -07:00
|
|
|
# The runtime system for the bytecode compiler
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
runtime:
|
|
|
|
cd byterun; $(MAKE) all
|
|
|
|
realclean::
|
|
|
|
cd byterun; $(MAKE) clean
|
|
|
|
alldepend::
|
|
|
|
cd byterun; $(MAKE) depend
|
|
|
|
|
1995-07-21 02:03:58 -07:00
|
|
|
# The runtime system for the native-code compiler
|
|
|
|
|
|
|
|
runtimeopt:
|
|
|
|
cd asmrun; $(MAKE) all
|
1995-07-28 06:58:50 -07:00
|
|
|
if test -f stdlib/libasmrun.a; then :; else \
|
1995-07-30 07:24:06 -07:00
|
|
|
ln -s ../asmrun/libasmrun.a stdlib/libasmrun.a; fi
|
1995-07-21 02:03:58 -07:00
|
|
|
realclean::
|
|
|
|
cd asmrun; $(MAKE) clean
|
|
|
|
alldepend::
|
|
|
|
cd asmrun; $(MAKE) depend
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
# The library
|
|
|
|
|
|
|
|
library:
|
|
|
|
cd stdlib; $(MAKE) all
|
1995-06-18 07:43:13 -07:00
|
|
|
library-cross:
|
|
|
|
cd stdlib; $(MAKE) RUNTIME=../byterun/camlrun all
|
1995-07-21 02:03:58 -07:00
|
|
|
libraryopt:
|
|
|
|
cd stdlib; $(MAKE) allopt
|
1995-05-04 03:15:53 -07:00
|
|
|
clean::
|
|
|
|
cd stdlib; $(MAKE) clean
|
|
|
|
alldepend::
|
|
|
|
cd stdlib; $(MAKE) depend
|
|
|
|
|
|
|
|
# The lexer and parser generators
|
|
|
|
|
1995-06-18 07:43:13 -07:00
|
|
|
camllex:
|
1995-08-28 04:44:00 -07:00
|
|
|
cd lex; $(MAKE) all
|
1995-05-04 03:15:53 -07:00
|
|
|
clean::
|
|
|
|
cd lex; $(MAKE) clean
|
|
|
|
alldepend::
|
|
|
|
cd lex; $(MAKE) depend
|
|
|
|
|
1995-06-18 07:43:13 -07:00
|
|
|
camlyacc:
|
1995-08-28 04:44:00 -07:00
|
|
|
cd yacc; $(MAKE) all
|
1995-05-04 03:15:53 -07:00
|
|
|
realclean::
|
|
|
|
cd yacc; $(MAKE) clean
|
|
|
|
|
1995-08-28 04:44:00 -07:00
|
|
|
# Tools
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1995-08-28 04:44:00 -07:00
|
|
|
camltools:
|
|
|
|
cd tools; $(MAKE) all
|
1995-05-04 03:15:53 -07:00
|
|
|
realclean::
|
|
|
|
cd tools; $(MAKE) clean
|
|
|
|
alldepend::
|
|
|
|
cd tools; $(MAKE) depend
|
|
|
|
|
|
|
|
# Default rules
|
|
|
|
|
1995-07-12 07:22:01 -07:00
|
|
|
.SUFFIXES: .ml .mli .cmo .cmi .cmx
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
.ml.cmo:
|
|
|
|
$(CAMLC) $(COMPFLAGS) -c $<
|
|
|
|
|
|
|
|
.mli.cmi:
|
|
|
|
$(CAMLC) $(COMPFLAGS) -c $<
|
|
|
|
|
1995-07-12 07:22:01 -07:00
|
|
|
.ml.cmx:
|
|
|
|
$(CAMLOPT) $(COMPFLAGS) -c $<
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
clean::
|
1995-07-12 08:30:16 -07:00
|
|
|
rm -f utils/*.cm[iox] utils/*.[so] utils/*~
|
|
|
|
rm -f parsing/*.cm[iox] parsing/*.[so] parsing/*~
|
|
|
|
rm -f typing/*.cm[iox] typing/*.[so] typing/*~
|
|
|
|
rm -f bytecomp/*.cm[iox] bytecomp/*.[so] bytecomp/*~
|
|
|
|
rm -f asmcomp/*.cm[iox] asmcomp/*.[so] asmcomp/*~
|
|
|
|
rm -f driver/*.cm[iox] driver/*.[so] driver/*~
|
|
|
|
rm -f toplevel/*.cm[iox] toplevel/*.[so] toplevel/*~
|
1995-08-25 06:53:40 -07:00
|
|
|
rm -f tools/*.cm[iox] tools/*.[so] tools/*~
|
1995-05-04 03:15:53 -07:00
|
|
|
rm -f *~
|
|
|
|
|
|
|
|
depend: beforedepend
|
1995-08-25 06:53:40 -07:00
|
|
|
(for d in utils parsing typing bytecomp asmcomp driver toplevel; \
|
|
|
|
do $(CAMLDEP) $(DEPFLAGS) $$d/*.mli $$d/*.ml; \
|
|
|
|
done) > .depend
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
alldepend:: depend
|
|
|
|
|
|
|
|
include .depend
|