Adjusting Makefiles and config files for a master RaspberryPi
[iot2.git] / benchmarks / Java / IrrigationController / Makefile
index 069fd9021b56d4c5d9939f877fb827cd69664a3e..e475b382c4f78eb1469dad1cdecd94d7171b70d9 100644 (file)
@@ -5,17 +5,35 @@ include $(BASE)/common.mk
 BOOFDIR := ../../libs/boofcv_libs
 BOOFJARS := $(BOOFDIR)/BoofCV-feature-0.21.jar:$(BOOFDIR)/BoofCV-io-0.21.jar:$(BOOFDIR)/BoofCV-visualize-0.21.jar:$(BOOFDIR)/BoofCV-ip-0.21.jar:$(CHECKERJARS)
 
-JFLAGS = -d $(BIN_DIR) -cp $(BOOFJARS):$(BIN_DIR):.
+JFLAGS = -d $(BIN_DIR) -cp $(BOOFJARS):$(BIN_DIR):$(CHECKERJARS):.
 JARFLAGS = cf 
 
+# checker option
+#
+CHECKER_OPT = -processor iotchecker.IoTJavaChecker -AprintErrorStack
+
+ASTUBS = -Astubs=../../../checker/astubs/ 
+
 all: irrigation
 
+check-all: check-irrigation
+
 PHONY += irrigation
 irrigation:
        $(JAVAC) $(JFLAGS) *.java
-       cd  $(BIN_DIR)/IrrigationController; $(JAR) $(JARFLAGS) IrrigationController.jar ../IrrigationController/*.class ../iotcode/interfaces/*.class
+       cd  $(BIN_DIR)/IrrigationController; $(JAR) $(JARFLAGS) IrrigationController.jar ../IrrigationController/*.class ../iotcode/interfaces/*.class; mkdir tmp; mv IrrigationController.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
+       cp IrrigationController.config $(BIN_DIR)/IrrigationController
+       cp IrrigationController.tomoyo $(BIN_DIR)/IrrigationController
+       cp -rf ./resources ./help_files $(BIN_DIR)/IrrigationController
+       cd  $(BIN_DIR)/IrrigationController; zip -r IrrigationController.zip ./resources ./help_files; rm -rf ./resources ./help_files
+
+PHONY += check-irrigation
+check-irrigation:
+       $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) *.java
+       cd  $(BIN_DIR)/IrrigationController; $(JAR) $(JARFLAGS) IrrigationController.jar ../IrrigationController/*.class ../iotcode/interfaces/*.class; mkdir tmp; mv IrrigationController.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
        cp IrrigationController.config $(BIN_DIR)/IrrigationController
+       cp IrrigationController.tomoyo $(BIN_DIR)/IrrigationController
        cp -rf ./resources ./help_files $(BIN_DIR)/IrrigationController
-       cd  $(BIN_DIR)/IrrigationController; zip -r IrrigationController.zip ./resources ./help_files
+       cd  $(BIN_DIR)/IrrigationController; zip -r IrrigationController.zip ./resources ./help_files; rm -rf ./resources ./help_files
 
 .PHONY: $(PHONY)