

# NOTE: This makefile is automatically generated from make-makefile.t,
# and should not normally be edited by hand.  New makefiles are
# generated with 'make Makefile'.

OAFILES = st.oa da.oa pl.oa do.oa cold-booting.oa kernel0.oa kernel0types.oa kernel1-install.oa kernel1-funs.oa kernel1-make.oa kernel1-freeze.oa kernel1-maketype.oa kernel1-inittypes.oa kernel1-segments.oa super.oa kernel.oa mix-types.oa operations.oa ops.oa truth.oa logops.oa consume.oa conses.oa coerce.oa eqv.oa mapping.oa fastmap.oa fluid.oa vector-type.oa vl-mixin.oa numbers.oa subtypes.oa weak.oa strings.oa sequences.oa undefined.oa subprimitive.oa gc.oa tag-trap.oa code-vector.oa hash-table.oa format.oa signal.oa error.oa symbols.oa print-noise.oa patch-symbols.oa predicates.oa print.oa print-integer.oa print-list.oa reader-errors.oa reader.oa reader-macros.oa hash-reader.oa read-char.oa locales.oa expand.oa make-locales.oa patch-locales.oa freeze.oa bp-alist.oa describe.oa warm.oa interpreter.oa top-level.oa booted.oa dump-stack.oa destructure.oa macros1.oa macros2.oa icky-macros.oa obsolese.oa define.oa file-errors.oa streams.oa cold.oa nargs.oa has-method.oa op-error.oa error2.oa error3.oa backquote.oa file-io.oa fasl.oa load-oaf.oa load-file.oa string-stream.oa list.oa catch.oa continuation.oa unwind-protect.oa bounders.oa anonymous.oa sort.oa exit.oa export.oa cold-boot-end.oa

MISCFILES = promise.oa bignum.oa bignum2.oa rational.oa complex.oa rounding.oa lazy-cons.oa math.oa trace.oa apropos.oa time.oa

COMPFILES = crunch.oa mac-comp-stuff.oa mac-compiler-nodes.oa mac-compiler1.oa mac-compiler2.oa mac-compiler3.oa mac-code.oa assembler.oa peephole.oa file-compiler.oa compiler-exports.oa

BATFILE = batch-compiler.oa

# The following is a trick to deal with the endianity problem.
# Bigendian machines need binary oaklisp worlds with extension .ol*
# while littleendian ones need .lo*.

# If on a system without the fancy CMU mods to make, just change the
# line 'E = ...' to 'E = ol' or 'E = lo', as appropriate.

VAX_EXT		= lo
SUN_EXT		= ol
IBMRT_EXT	= ol
CONVEX_EXT	= ol
MMAX_EXT	= lo

E = ${$(MACHINE)_EXT}


all: Makefile new.$Ez new.$Es

# Make correct_endian_worlds when bringing up a release distributed
# with only a bigendian world on a littleendian machine.

correct_endian_worlds: ../lib/oaklisp.$Ez ../lib/oaklisp.$Es

# Explain how to make oaklisp object files:
.SUFFIXES: .oa .oak

.oak.oa:
	oakliszt $*

# Get the compiler sources compiled in the correct locale:
$(COMPFILES) $(BATFILE): $$@k
	oakliszt $* compiler-locale


# Explain how to make T object files:
.SUFFIXES: .mo .t

.t.mo:
	echo "(block (compile-file '$*)(exit 0))(exit 1)"|t


# Explain how to boot cold worlds into warm worlds:
.SUFFIXES: .$E .cold

.cold.$E:
	rm -f $*.$E
	echo $*.$E|../etc/emulator -d -b -G $*.cold


# Explain how to load misc stuff into warm worlds:
.SUFFIXES: .$Em .$E

.$E.$Em:
	../etc/fliw $*.$E $*.$Em system-locale $(MISCFILES)

%.$Em       : %.$E       $(MISCFILES)


# Explain how to load the compiler into misc worlds:
.SUFFIXES: .$Ec .$Em

.$Em.$Ec:
	../etc/fliw $*.$Em $*.$Ec compiler-locale $(COMPFILES)

%.$Ec       : %.$Em       $(COMPFILES)


# Explain how to load the batch compiler into worlds with the compiler in 'em:
.SUFFIXES: .$Ez .$Ec

.$Ec.$Ez:
	../etc/fliw $*.$Ec $*.$Ez compiler-locale $(BATFILE)

%.$Ez       : %.$Ec       $(BATFILE)



SCHEMEOA = scheme-upgrade.oa scheme.oa scheme-macros.oa

# Explain how to load the scheme compatibility package:
.SUFFIXES: .$Es .$Ec

.$Ec.$Es:
	../etc/fliw $*.$Ec $*.$Es system-locale scheme-upgrade

%.$Es       : %.$Ec       $(SCHEMEOA)
new.$Es     : new.$Ec     $(SCHEMEOA)
oaklisp.$Es : oaklisp.$Ec $(SCHEMEOA)





oafiles: $(OAFILES)

# How to build a new cold world using the linker:

new.cold: oafiles files.mo build-world.mo ../linker/tool.mo
	rm -f new.cold new.sym
	echo "(block (load 'build-world)(build-world 'new)(exit 0))(exit 1)"|t
	echo ''


# How to rebuild this makefile:

Makefile: make-makefile.mo files.mo
	echo "(block (load 'make-makefile)(make-makefile" '"'Makefile'"'")(exit 0))(exit 1)"|t
	echo Makefile modified -- redo the make
	false


# Delete all the crap:

clean-oa-files:
	rm -f $(OAFILES) $(COMPFILES) $(MISCFILES) $(BATFILE)


# What goes in an official release:

COMPOA = $(COMPFILES) $(BATFILE)
TFILES = build-world.t files.t make-makefile.t
BENCHMARKS = tak.oak compile-bench.oak
MISCOTHERS = $(TFILES) $(BENCHMARKS) Makefile

release:
	../etc/rel-source ../$(RELEASEDIR)/mac \
		$(OAFILES) $(COMPOA) $(SCHEMEOA) $(MISCFILES)
	copy -l $(MISCOTHERS) $(COMPOA) $(SCHEMEOA) ../$(RELEASEDIR)/mac

min-release:
	copy -l $(BENCHMARKS) oaklisp.$Ec oaklisp.$Ez oaklisp.$Es ../$(RELEASEDIR)/mac

#eof
