Adding Java Checker Framework checker option in the makefiles; basically this is...
[iot2.git] / benchmarks / Java / SmartLightsController / Makefile
index 256b5b723ff13f210370eee16952ad9573364fd4..69d132b84ee9951268387472edd1572fa695a8a7 100644 (file)
@@ -5,15 +5,29 @@ 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: smartlights
 
+check-all: check-smartlights
+
 PHONY += smartlights
 smartlights:
        $(JAVAC) $(JFLAGS) *.java
        cp SmartLightsController.config $(BIN_DIR)/SmartLightsController
        cd $(BIN_DIR)/SmartLightsController; $(JAR) $(JARFLAGS) SmartLightsController.jar ../SmartLightsController/SmartLightsController*.class ../SmartLightsController/ColorTemperature*.class ../SmartLightsController/MotionDetection*.class ../iotcode/interfaces/Camera*.class ../iotcode/interfaces/Room*.class ../iotcode/interfaces/LightBulb*.class ../iotcode/interfaces/Resolution*.class
 
+PHONY += check-smartlights
+check-smartlights:
+       $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) *.java
+       cp SmartLightsController.config $(BIN_DIR)/SmartLightsController
+       cd $(BIN_DIR)/SmartLightsController; $(JAR) $(JARFLAGS) SmartLightsController.jar ../SmartLightsController/SmartLightsController*.class ../SmartLightsController/ColorTemperature*.class ../SmartLightsController/MotionDetection*.class ../iotcode/interfaces/Camera*.class ../iotcode/interfaces/Room*.class ../iotcode/interfaces/LightBulb*.class ../iotcode/interfaces/Resolution*.class
+
 .PHONY: $(PHONY)