You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 lines
1.1 KiB

################################################
# NB: This Makefile is designed to be called #
# from the main PRISM Makefile. It won't #
# work on its own because it needs #
# various options to be passed in #
################################################
# Reminder: $@ = target, $* = target without extension, $< = dependency
THIS_DIR = settings
PRISM_DIR_REL = ../..
JAVA_FILES = $(wildcard *.java)
CLASS_FILES = $(JAVA_FILES:%.java=$(PRISM_DIR_REL)/$(CLASSES_DIR)/$(THIS_DIR)/%.class)
default: all
all: checks $(CLASS_FILES)
# Try and prevent accidental makes (i.e. called manually, not from top-level Makefile)
checks:
@if [ "$(SRC_DIR)" = "" ]; then \
(echo "Error: This Makefile is designed to be called from the main PRISM Makefile"; exit 1) \
fi;
$(PRISM_DIR_REL)/$(CLASSES_DIR)/$(THIS_DIR)/%.class: %.java
(cd ..; $(JAVAC) -sourcepath $(THIS_DIR)/$(PRISM_DIR_REL)/$(SRC_DIR) -classpath $(THIS_DIR)/$(PRISM_DIR_REL)/$(CLASSES_DIR) -d $(THIS_DIR)/$(PRISM_DIR_REL)/$(CLASSES_DIR) $(THIS_DIR)/$<)
clean: checks
@rm -f $(CLASS_FILES)
celan: clean
#################################################