Adding class file deletion in Makefile for controllers
[iot2.git] / benchmarks / Java / SmartLightsController / Makefile
index 256b5b723ff13f210370eee16952ad9573364fd4..4d26b0e8d50f7d10518c8d780fd0134479fb2aa8 100644 (file)
@@ -5,15 +5,31 @@ 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
+       cp SmartLightsController.tomoyo $(BIN_DIR)/SmartLightsController
+       cd $(BIN_DIR)/SmartLightsController; $(JAR) $(JARFLAGS) SmartLightsController.jar ../SmartLightsController/SmartLightsController*.class ../SmartLightsController/ColorTemperature*.class ../SmartLightsController/MotionDetection*.class ../SmartLightsController/*.class ../iotcode/interfaces/Camera*.class ../iotcode/interfaces/Room*.class ../iotcode/interfaces/LightBulb*.class ../iotcode/interfaces/Resolution*.class; rm -rf *.class
+
+PHONY += check-smartlights
+check-smartlights:
+       $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) *.java
+       cp SmartLightsController.config $(BIN_DIR)/SmartLightsController
+       cp SmartLightsController.tomoyo $(BIN_DIR)/SmartLightsController
+       cd $(BIN_DIR)/SmartLightsController; $(JAR) $(JARFLAGS) SmartLightsController.jar ../SmartLightsController/SmartLightsController*.class ../SmartLightsController/ColorTemperature*.class ../SmartLightsController/MotionDetection*.class ../SmartLightsController/*.class ../iotcode/interfaces/Camera*.class ../iotcode/interfaces/Room*.class ../iotcode/interfaces/LightBulb*.class ../iotcode/interfaces/Resolution*.class; rm -rf *.class
 
 .PHONY: $(PHONY)