DIFF = diff --strip-trailing-cr

if $(mem $(SYSNAME), OpenBSD)
    DIFF = gdiff --strip-trailing-cr
    export


############################################################
# Rules for compiling and linking Lambda Prolog code
#

%.lpo: %.mod %.sig $(TJCC)
    $(TJCC) $<

LPProgram(program, files) =
    file_names = $(addsuffix .lpo, $(files))
    prog_name = $(addsuffix .lp, $(program))

    $(prog_name): $(file_names) $(TJLINK)
        $(TJLINK) $(program)

    value $(prog_name)

############################################################
# Subdirectories
#

.SUBDIRS: linker_tests compiler_tests compiler_negative_tests system_tests

