Files
mercury/samples/java_interface/standalone_java/Makefile
Zoltan Somogyi d33273d033 Tell vim not to expand tabs in Makefiles.
This file-specific setting will override a default setting of expandtabs
in $HOME/.vimrc.

*/Makefile:
*/Mmakefile:
    As above.

tests/hard_coded/.gitignore:
    Don't ignore the purity subdir. This ignore must have been left over
    from when purity.m was a test in hard_coded, not hard_coded/purity,
    and it ignored an executable, not a directory.
2015-01-08 22:07:29 +11:00

37 lines
1012 B
Makefile

#-----------------------------------------------------------------------------#
# vim: ts=8 sw=8 noexpandtab
#-----------------------------------------------------------------------------#
# This source file is hereby placed in the public domain.
#-----------------------------------------------------------------------------#
MMC = mmc
JAVAC = javac
JAVA = java
# We need to tell javac about the Mercury libraries.
GRADE = java
MER_LIB_DIR = $(dir $(shell which mmc))../lib/mercury/lib/$(GRADE)
MER_JARS = $(MER_LIB_DIR)/mer_std.jar:$(MER_LIB_DIR)/mer_rt.jar
.PHONY: all
all: run
JavaMain.class: JavaMain.java mercury_lib.jar
$(JAVAC) JavaMain.java -cp $(MER_JARS):Mercury/classs -d .
mercury_lib.jar: mercury_lib.m
$(MMC) --grade $(GRADE) --make libmercury_lib
.PHONY: run
run: JavaMain.class
$(JAVA) -cp $(MER_JARS):./mercury_lib.jar:. JavaMain
.PHONY: clean
clean:
$(MMC) --make mercury_lib.realclean
$(RM) -f mercury_lib.jar JavaMain.class
$(RM) -rf Mercury
.PHONY: realclean
realclean: clean