SRCDIR=../..

SRC=common.lsp conditns.lsp loadfsl.lsp stepper.lsp

FSL=common.fsl conditns.fsl loadfsl.fsl stepper.fsl

.SUFFIXES: .lsp .fsl

.lsp.fsl:
	cp $< fsltmp.lsp
	echo '(compile-file "fsltmp.lsp" :output-file "fsltmp.fsl") (exit)' \
	  | ../sources/xlisp.bin ../sources/cmpload
	mv fsltmp.fsl $@
	rm fsltmp.lsp

all: $(FSL)

$(FSL): $(SRC)

# this is used if compiling in a subdirectory of the xlispstat tree
$(SRC):
	ln -s $(SRCDIR)/$@ $@

# this is used for creating the separate xlisp only distribution
srcfiles:
	(cd $(SRCDIR); tar cf - $(SRC)) | tar xf -

clean:
	rm -f *.fsl
