Adding file cleanup in the drivers Makefile
authorrtrimana <rtrimana@uci.edu>
Mon, 19 Feb 2018 22:55:53 +0000 (14:55 -0800)
committerrtrimana <rtrimana@uci.edu>
Mon, 19 Feb 2018 22:55:53 +0000 (14:55 -0800)
benchmarks/drivers/Java/Makefile
iotjava/Makefile

index 46387b0..89ee2fc 100644 (file)
@@ -25,120 +25,120 @@ PHONY += light
 light:
        $(JAVAC) $(JFLAGS) LifxLightBulb/*.java
        cp LifxLightBulb/LifxLightBulb.config $(BIN_DIR)/iotcode/LifxLightBulb
-       cd $(BIN_DIR)/iotcode/LifxLightBulb; $(JAR) $(JARFLAGS) LifxLightBulb.jar ../../iotcode/LifxLightBulb/*.class ../../iotcode/interfaces/LightBulb*.class
+       cd $(BIN_DIR)/iotcode/LifxLightBulb; $(JAR) $(JARFLAGS) LifxLightBulb.jar ../../iotcode/LifxLightBulb/*.class ../../iotcode/interfaces/LightBulb*.class; mkdir tmp; mv LifxLightBulb.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += camera
 camera:
        $(JAVAC) $(JFLAGS) AmcrestCamera/*.java
        cp AmcrestCamera/AmcrestCamera.config $(BIN_DIR)/iotcode/AmcrestCamera
        cp AmcrestCamera/AmcrestCamera.tomoyo $(BIN_DIR)/iotcode/AmcrestCamera
-       cd $(BIN_DIR)/iotcode/AmcrestCamera; $(JAR) $(JARFLAGS) AmcrestCamera.jar ../../iotcode/AmcrestCamera/*.class ../../iotcode/interfaces/Camera*.class ../../iotcode/interfaces/Resolution*.class
+       cd $(BIN_DIR)/iotcode/AmcrestCamera; $(JAR) $(JARFLAGS) AmcrestCamera.jar ../../iotcode/AmcrestCamera/*.class ../../iotcode/interfaces/Camera*.class ../../iotcode/interfaces/Resolution*.class; mkdir tmp; mv AmcrestCamera.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += labroom
 labroom:
        $(JAVAC) $(JFLAGS) LabRoom/*.java
        cp LabRoom/LabRoom.config $(BIN_DIR)/iotcode/LabRoom
-       cd $(BIN_DIR)/iotcode/LabRoom; $(JAR) $(JARFLAGS) LabRoom.jar ../../iotcode/LabRoom/*.class ../../iotcode/interfaces/Room*.class
+       cd $(BIN_DIR)/iotcode/LabRoom; $(JAR) $(JARFLAGS) LabRoom.jar ../../iotcode/LabRoom/*.class ../../iotcode/interfaces/Room*.class; mkdir tmp; mv LabRoom.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += greenlawn
 greenlawn:
        $(JAVAC) $(JFLAGS) GreenLawn/*.java
        cp GreenLawn/GreenLawn.config $(BIN_DIR)/iotcode/GreenLawn
-       cd $(BIN_DIR)/iotcode/GreenLawn; $(JAR) $(JARFLAGS) GreenLawn.jar ../../iotcode/GreenLawn/*.class ../../iotcode/interfaces/Lawn*.class
+       cd $(BIN_DIR)/iotcode/GreenLawn; $(JAR) $(JARFLAGS) GreenLawn.jar ../../iotcode/GreenLawn/*.class ../../iotcode/interfaces/Lawn*.class; mkdir tmp; mv GreenLawn.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += sprinkler
 sprinkler:
        $(JAVAC) $(JFLAGS) EspSprinkler/*.java
        cp EspSprinkler/EspSprinkler.config $(BIN_DIR)/iotcode/EspSprinkler
-       cd $(BIN_DIR)/iotcode/EspSprinkler; $(JAR) $(JARFLAGS) EspSprinkler.jar ../../iotcode/EspSprinkler/*.class ../../iotcode/interfaces/Sprinkler*.class ../../iotcode/interfaces/ZoneState*.class
+       cd $(BIN_DIR)/iotcode/EspSprinkler; $(JAR) $(JARFLAGS) EspSprinkler.jar ../../iotcode/EspSprinkler/*.class ../../iotcode/interfaces/Sprinkler*.class ../../iotcode/interfaces/ZoneState*.class; mkdir tmp; mv EspSprinkler.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
        
 PHONY += blossomsprinkler
 blossomsprinkler:
        $(JAVAC) $(JFLAGS) BlossomSprinkler/*.java
        cp BlossomSprinkler/BlossomSprinkler.config $(BIN_DIR)/iotcode/BlossomSprinkler
-       cd $(BIN_DIR)/iotcode/BlossomSprinkler; $(JAR) $(JARFLAGS) BlossomSprinkler.jar ../../iotcode/BlossomSprinkler/*.class ../../iotcode/interfaces/Sprinkler*.class ../../iotcode/interfaces/ZoneState*.class
+       cd $(BIN_DIR)/iotcode/BlossomSprinkler; $(JAR) $(JARFLAGS) BlossomSprinkler.jar ../../iotcode/BlossomSprinkler/*.class ../../iotcode/interfaces/Sprinkler*.class ../../iotcode/interfaces/ZoneState*.class; mkdir tmp; mv BlossomSprinkler.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += moisture
 moisture:
        $(JAVAC) $(JFLAGS) SpruceSensor/*.java
        cp SpruceSensor/SpruceSensor.config $(BIN_DIR)/iotcode/SpruceSensor
        #cd $(BIN_DIR)/iotcode/SpruceSensor; $(JAR) $(JARFLAGS) SpruceSensor.jar ../../iotcode/SpruceSensor/*.class ../../iotcode/interfaces/MoistureSensor*.class ../../iotcode/interfaces/Camera*.class ../../IrrigationController/MotionDetection*.class
-       cd $(BIN_DIR)/iotcode/SpruceSensor; $(JAR) $(JARFLAGS) SpruceSensor.jar ../../iotcode/SpruceSensor/*.class ../../iotcode/interfaces/MoistureSensor*.class ../../iotcode/interfaces/Camera*.class
+       cd $(BIN_DIR)/iotcode/SpruceSensor; $(JAR) $(JARFLAGS) SpruceSensor.jar ../../iotcode/SpruceSensor/*.class ../../iotcode/interfaces/MoistureSensor*.class ../../iotcode/interfaces/Camera*.class; mkdir tmp; mv SpruceSensor.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += weathergateway
 weathergateway:
        $(JAVAC) $(JFLAGS) WeatherPhoneGateway/*.java
        cp WeatherPhoneGateway/WeatherPhoneGateway.config $(BIN_DIR)/iotcode/WeatherPhoneGateway
-       cd $(BIN_DIR)/iotcode/WeatherPhoneGateway; $(JAR) $(JARFLAGS) WeatherPhoneGateway.jar ../../iotcode/WeatherPhoneGateway/*.class ../../iotcode/interfaces/WeatherGateway*.class
+       cd $(BIN_DIR)/iotcode/WeatherPhoneGateway; $(JAR) $(JARFLAGS) WeatherPhoneGateway.jar ../../iotcode/WeatherPhoneGateway/*.class ../../iotcode/interfaces/WeatherGateway*.class; mkdir tmp; mv WeatherPhoneGateway.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += audioroom
 audioroom:
        $(JAVAC) $(JFLAGS) AudioRoom/*.java
        cp AudioRoom/AudioRoom.config $(BIN_DIR)/iotcode/AudioRoom
-       cd $(BIN_DIR)/iotcode/AudioRoom; $(JAR) $(JARFLAGS) AudioRoom.jar ../../iotcode/AudioRoom/*.class ../../iotcode/interfaces/Room*.class
+       cd $(BIN_DIR)/iotcode/AudioRoom; $(JAR) $(JARFLAGS) AudioRoom.jar ../../iotcode/AudioRoom/*.class ../../iotcode/interfaces/Room*.class; mkdir tmp; mv AudioRoom.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += gpsgateway
 gpsgateway:
        $(JAVAC) $(JFLAGS) GPSPhoneGateway/*.java
        cp GPSPhoneGateway/GPSPhoneGateway.config $(BIN_DIR)/iotcode/GPSPhoneGateway
-       cd $(BIN_DIR)/iotcode/GPSPhoneGateway; $(JAR) $(JARFLAGS) GPSPhoneGateway.jar ../../iotcode/GPSPhoneGateway/*.class ../../iotcode/interfaces/GPSGateway*.class
+       cd $(BIN_DIR)/iotcode/GPSPhoneGateway; $(JAR) $(JARFLAGS) GPSPhoneGateway.jar ../../iotcode/GPSPhoneGateway/*.class ../../iotcode/interfaces/GPSGateway*.class; mkdir tmp; mv GPSPhoneGateway.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += ihome
 ihome:
        $(JAVAC) $(JFLAGS) IHome/*.java
        cp IHome/IHome.config $(BIN_DIR)/iotcode/IHome
-       cd $(BIN_DIR)/iotcode/IHome; $(JAR) $(JARFLAGS) IHome.jar ../../iotcode/IHome/*.class ../../iotcode/interfaces/Speaker*.class
+       cd $(BIN_DIR)/iotcode/IHome; $(JAR) $(JARFLAGS) IHome.jar ../../iotcode/IHome/*.class ../../iotcode/interfaces/Speaker*.class; mkdir tmp; mv IHome.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += homeroom
 homeroom:
        $(JAVAC) $(JFLAGS) HomeRoom/*.java
        cp HomeRoom/HomeRoom.config $(BIN_DIR)/iotcode/HomeRoom
-       cd $(BIN_DIR)/iotcode/HomeRoom; $(JAR) $(JARFLAGS) HomeRoom.jar ../../iotcode/HomeRoom/*.class ../../iotcode/interfaces/Room*.class
+       cd $(BIN_DIR)/iotcode/HomeRoom; $(JAR) $(JARFLAGS) HomeRoom.jar ../../iotcode/HomeRoom/*.class ../../iotcode/interfaces/Room*.class; mkdir tmp; mv HomeRoom.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += alarm
 alarm:
        $(JAVAC) $(JFLAGS) EspAlarm/*.java
        cp EspAlarm/EspAlarm.config $(BIN_DIR)/iotcode/EspAlarm
-       cd $(BIN_DIR)/iotcode/EspAlarm; $(JAR) $(JARFLAGS) EspAlarm.jar ../../iotcode/EspAlarm/*.class ../../iotcode/interfaces/Alarm*.class ../../iotcode/interfaces/ZoneState*.class
+       cd $(BIN_DIR)/iotcode/EspAlarm; $(JAR) $(JARFLAGS) EspAlarm.jar ../../iotcode/EspAlarm/*.class ../../iotcode/interfaces/Alarm*.class ../../iotcode/interfaces/ZoneState*.class; mkdir tmp; mv EspAlarm.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
        
 PHONY += dlink-alarm
 dlink-alarm:
        $(JAVAC) $(JFLAGS) DlinkAlarm/*.java
        cp DlinkAlarm/DlinkAlarm.config $(BIN_DIR)/iotcode/DlinkAlarm
-       cd $(BIN_DIR)/iotcode/DlinkAlarm; $(JAR) $(JARFLAGS) DlinkAlarm.jar ../../iotcode/DlinkAlarm/*.class ../../iotcode/interfaces/Alarm*.class ../../iotcode/interfaces/ZoneState*.class
+       cd $(BIN_DIR)/iotcode/DlinkAlarm; $(JAR) $(JARFLAGS) DlinkAlarm.jar ../../iotcode/DlinkAlarm/*.class ../../iotcode/interfaces/Alarm*.class ../../iotcode/interfaces/ZoneState*.class; mkdir tmp; mv DlinkAlarm.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += motion
 motion:
        $(JAVAC) $(JFLAGS) MotionSensor/*.java
        cp MotionSensor/MotionSensor.config $(BIN_DIR)/iotcode/MotionSensor
        #cd $(BIN_DIR)/iotcode/MotionSensor; $(JAR) $(JARFLAGS) MotionSensor.jar ../../iotcode/MotionSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class ../../IrrigationController/MotionDetection*.class
-       cd $(BIN_DIR)/iotcode/MotionSensor; $(JAR) $(JARFLAGS) MotionSensor.jar ../../iotcode/MotionSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class
+       cd $(BIN_DIR)/iotcode/MotionSensor; $(JAR) $(JARFLAGS) MotionSensor.jar ../../iotcode/MotionSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class; mkdir tmp; mv MotionSensor.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += multipurpose
 multipurpose:
        $(JAVAC) $(JFLAGS) MultipurposeSensor/*.java
        cp MultipurposeSensor/MultipurposeSensor.config $(BIN_DIR)/iotcode/MultipurposeSensor
        #cd $(BIN_DIR)/iotcode/MultipurposeSensor; $(JAR) $(JARFLAGS) MultipurposeSensor.jar ../../iotcode/MultipurposeSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class ../../IrrigationController/MotionDetection*.class
-       cd $(BIN_DIR)/iotcode/MultipurposeSensor; $(JAR) $(JARFLAGS) MultipurposeSensor.jar ../../iotcode/MultipurposeSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class
+       cd $(BIN_DIR)/iotcode/MultipurposeSensor; $(JAR) $(JARFLAGS) MultipurposeSensor.jar ../../iotcode/MultipurposeSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class; mkdir tmp; mv MultipurposeSensor.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += waterleak
 waterleak:
        $(JAVAC) $(JFLAGS) WaterLeakSensor/*.java
        cp WaterLeakSensor/WaterLeakSensor.config $(BIN_DIR)/iotcode/WaterLeakSensor
        #cd $(BIN_DIR)/iotcode/WaterLeakSensor; $(JAR) $(JARFLAGS) WaterLeakSensor.jar ../../iotcode/WaterLeakSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class ../../IrrigationController/MotionDetection*.class
-       cd $(BIN_DIR)/iotcode/WaterLeakSensor; $(JAR) $(JARFLAGS) WaterLeakSensor.jar ../../iotcode/WaterLeakSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class
+       cd $(BIN_DIR)/iotcode/WaterLeakSensor; $(JAR) $(JARFLAGS) WaterLeakSensor.jar ../../iotcode/WaterLeakSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class; mkdir tmp; mv WaterLeakSensor.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += doorlock
 doorlock:
        $(JAVAC) $(JFLAGS) DoorlockSensor/*.java
        cp DoorlockSensor/DoorlockSensor.config $(BIN_DIR)/iotcode/DoorlockSensor
-       cd $(BIN_DIR)/iotcode/DoorlockSensor; $(JAR) $(JARFLAGS) DoorlockSensor.jar ../../iotcode/DoorlockSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class
+       cd $(BIN_DIR)/iotcode/DoorlockSensor; $(JAR) $(JARFLAGS) DoorlockSensor.jar ../../iotcode/DoorlockSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class; mkdir tmp; mv DoorlockSensor.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += doorlockactuator
 doorlockactuator:
        $(JAVAC) $(JFLAGS) DoorlockActuator/*.java
        cp DoorlockActuator/DoorlockActuator.config $(BIN_DIR)/iotcode/DoorlockActuator
-       cd $(BIN_DIR)/iotcode/DoorlockActuator; $(JAR) $(JARFLAGS) DoorlockActuator.jar ../../iotcode/DoorlockActuator/*.class ../../iotcode/interfaces/SmartthingsActuator*.class ../../iotcode/interfaces/Camera*.class
+       cd $(BIN_DIR)/iotcode/DoorlockActuator; $(JAR) $(JARFLAGS) DoorlockActuator.jar ../../iotcode/DoorlockActuator/*.class ../../iotcode/interfaces/SmartthingsActuator*.class ../../iotcode/interfaces/Camera*.class; mkdir tmp; mv DoorlockActuator.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 # Compile - with checker
 #
@@ -146,116 +146,116 @@ PHONY += check-light
 check-light:
        $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) LifxLightBulb/*.java
        cp LifxLightBulb/LifxLightBulb.config $(BIN_DIR)/iotcode/LifxLightBulb
-       cd $(BIN_DIR)/iotcode/LifxLightBulb; $(JAR) $(JARFLAGS) LifxLightBulb.jar ../../iotcode/LifxLightBulb/*.class ../../iotcode/interfaces/LightBulb*.class
+       cd $(BIN_DIR)/iotcode/LifxLightBulb; $(JAR) $(JARFLAGS) LifxLightBulb.jar ../../iotcode/LifxLightBulb/*.class ../../iotcode/interfaces/LightBulb*.class; mkdir tmp; mv LifxLightBulb.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += check-camera
 check-camera:
        $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) AmcrestCamera/*.java
        cp AmcrestCamera/AmcrestCamera.config $(BIN_DIR)/iotcode/AmcrestCamera
        cp AmcrestCamera/AmcrestCamera.tomoyo $(BIN_DIR)/iotcode/AmcrestCamera
-       cd $(BIN_DIR)/iotcode/AmcrestCamera; $(JAR) $(JARFLAGS) AmcrestCamera.jar ../../iotcode/AmcrestCamera/*.class ../../iotcode/interfaces/Camera*.class ../../iotcode/interfaces/Resolution*.class
+       cd $(BIN_DIR)/iotcode/AmcrestCamera; $(JAR) $(JARFLAGS) AmcrestCamera.jar ../../iotcode/AmcrestCamera/*.class ../../iotcode/interfaces/Camera*.class ../../iotcode/interfaces/Resolution*.class; mkdir tmp; mv AmcrestCamera.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += check-labroom
 check-labroom:
        $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) LabRoom/*.java
        cp LabRoom/LabRoom.config $(BIN_DIR)/iotcode/LabRoom
-       cd $(BIN_DIR)/iotcode/LabRoom; $(JAR) $(JARFLAGS) LabRoom.jar ../../iotcode/LabRoom/*.class ../../iotcode/interfaces/Room*.class
+       cd $(BIN_DIR)/iotcode/LabRoom; $(JAR) $(JARFLAGS) LabRoom.jar ../../iotcode/LabRoom/*.class ../../iotcode/interfaces/Room*.class; mkdir tmp; mv LabRoom.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += check-greenlawn
 check-greenlawn:
        $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) GreenLawn/*.java
        cp GreenLawn/GreenLawn.config $(BIN_DIR)/iotcode/GreenLawn
-       cd $(BIN_DIR)/iotcode/GreenLawn; $(JAR) $(JARFLAGS) GreenLawn.jar ../../iotcode/GreenLawn/*.class ../../iotcode/interfaces/Lawn*.class
+       cd $(BIN_DIR)/iotcode/GreenLawn; $(JAR) $(JARFLAGS) GreenLawn.jar ../../iotcode/GreenLawn/*.class ../../iotcode/interfaces/Lawn*.class; mkdir tmp; mv GreenLawn.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += check-sprinkler
 check-sprinkler:
        $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) EspSprinkler/*.java
        cp EspSprinkler/EspSprinkler.config $(BIN_DIR)/iotcode/EspSprinkler
-       cd $(BIN_DIR)/iotcode/EspSprinkler; $(JAR) $(JARFLAGS) EspSprinkler.jar ../../iotcode/EspSprinkler/*.class ../../iotcode/interfaces/Sprinkler*.class ../../iotcode/interfaces/ZoneState*.class
+       cd $(BIN_DIR)/iotcode/EspSprinkler; $(JAR) $(JARFLAGS) EspSprinkler.jar ../../iotcode/EspSprinkler/*.class ../../iotcode/interfaces/Sprinkler*.class ../../iotcode/interfaces/ZoneState*.class; mkdir tmp; mv EspSprinkler.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
        
 PHONY += check-blossomsprinkler
 check-blossomsprinkler:
        $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) BlossomSprinkler/*.java
        cp BlossomSprinkler/BlossomSprinkler.config $(BIN_DIR)/iotcode/BlossomSprinkler
-       cd $(BIN_DIR)/iotcode/BlossomSprinkler; $(JAR) $(JARFLAGS) BlossomSprinkler.jar ../../iotcode/BlossomSprinkler/*.class ../../iotcode/interfaces/Sprinkler*.class ../../iotcode/interfaces/ZoneState*.class
+       cd $(BIN_DIR)/iotcode/BlossomSprinkler; $(JAR) $(JARFLAGS) BlossomSprinkler.jar ../../iotcode/BlossomSprinkler/*.class ../../iotcode/interfaces/Sprinkler*.class ../../iotcode/interfaces/ZoneState*.class; mkdir tmp; mv BlossomSprinkler.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += check-moisture
 check-moisture:
        $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) SpruceSensor/*.java
        cp SpruceSensor/SpruceSensor.config $(BIN_DIR)/iotcode/SpruceSensor
        #cd $(BIN_DIR)/iotcode/SpruceSensor; $(JAR) $(JARFLAGS) SpruceSensor.jar ../../iotcode/SpruceSensor/*.class ../../iotcode/interfaces/MoistureSensor*.class ../../iotcode/interfaces/Camera*.class ../../IrrigationController/MotionDetection*.class
-       cd $(BIN_DIR)/iotcode/SpruceSensor; $(JAR) $(JARFLAGS) SpruceSensor.jar ../../iotcode/SpruceSensor/*.class ../../iotcode/interfaces/MoistureSensor*.class ../../iotcode/interfaces/Camera*.class
+       cd $(BIN_DIR)/iotcode/SpruceSensor; $(JAR) $(JARFLAGS) SpruceSensor.jar ../../iotcode/SpruceSensor/*.class ../../iotcode/interfaces/MoistureSensor*.class ../../iotcode/interfaces/Camera*.class; mkdir tmp; mv SpruceSensor.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += check-weathergateway
 check-weathergateway:
        $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) WeatherPhoneGateway/*.java
        cp WeatherPhoneGateway/WeatherPhoneGateway.config $(BIN_DIR)/iotcode/WeatherPhoneGateway
-       cd $(BIN_DIR)/iotcode/WeatherPhoneGateway; $(JAR) $(JARFLAGS) WeatherPhoneGateway.jar ../../iotcode/WeatherPhoneGateway/*.class ../../iotcode/interfaces/WeatherGateway*.class
+       cd $(BIN_DIR)/iotcode/WeatherPhoneGateway; $(JAR) $(JARFLAGS) WeatherPhoneGateway.jar ../../iotcode/WeatherPhoneGateway/*.class ../../iotcode/interfaces/WeatherGateway*.class; mkdir tmp; mv WeatherPhoneGateway.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += check-audioroom
 check-audioroom:
        $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) AudioRoom/*.java
        cp AudioRoom/AudioRoom.config $(BIN_DIR)/iotcode/AudioRoom
-       cd $(BIN_DIR)/iotcode/AudioRoom; $(JAR) $(JARFLAGS) AudioRoom.jar ../../iotcode/AudioRoom/*.class ../../iotcode/interfaces/Room*.class
+       cd $(BIN_DIR)/iotcode/AudioRoom; $(JAR) $(JARFLAGS) AudioRoom.jar ../../iotcode/AudioRoom/*.class ../../iotcode/interfaces/Room*.class; mkdir tmp; mv AudioRoom.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += check-gpsgateway
 check-gpsgateway:
        $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) GPSPhoneGateway/*.java
        cp GPSPhoneGateway/GPSPhoneGateway.config $(BIN_DIR)/iotcode/GPSPhoneGateway
-       cd $(BIN_DIR)/iotcode/GPSPhoneGateway; $(JAR) $(JARFLAGS) GPSPhoneGateway.jar ../../iotcode/GPSPhoneGateway/*.class ../../iotcode/interfaces/GPSGateway*.class
+       cd $(BIN_DIR)/iotcode/GPSPhoneGateway; $(JAR) $(JARFLAGS) GPSPhoneGateway.jar ../../iotcode/GPSPhoneGateway/*.class ../../iotcode/interfaces/GPSGateway*.class; mkdir tmp; mv GPSPhoneGateway.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += check-ihome
 check-ihome:
        $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) IHome/*.java
        cp IHome/IHome.config $(BIN_DIR)/iotcode/IHome
-       cd $(BIN_DIR)/iotcode/IHome; $(JAR) $(JARFLAGS) IHome.jar ../../iotcode/IHome/*.class ../../iotcode/interfaces/Speaker*.class
+       cd $(BIN_DIR)/iotcode/IHome; $(JAR) $(JARFLAGS) IHome.jar ../../iotcode/IHome/*.class ../../iotcode/interfaces/Speaker*.class; mkdir tmp; mv AmcrestCamera.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += check-homeroom
 check-homeroom:
        $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) HomeRoom/*.java
        cp HomeRoom/HomeRoom.config $(BIN_DIR)/iotcode/HomeRoom
-       cd $(BIN_DIR)/iotcode/HomeRoom; $(JAR) $(JARFLAGS) HomeRoom.jar ../../iotcode/HomeRoom/*.class ../../iotcode/interfaces/Room*.class
+       cd $(BIN_DIR)/iotcode/HomeRoom; $(JAR) $(JARFLAGS) HomeRoom.jar ../../iotcode/HomeRoom/*.class ../../iotcode/interfaces/Room*.class; mkdir tmp; mv HomeRoom.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += check-alarm
 check-alarm:
        $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) EspAlarm/*.java
        cp DlinkAlarm/EspAlarm.config $(BIN_DIR)/iotcode/EspAlarm
-       cd $(BIN_DIR)/iotcode/EspAlarm; $(JAR) $(JARFLAGS) EspAlarm.jar ../../iotcode/EspAlarm/*.class ../../iotcode/interfaces/Alarm*.class ../../iotcode/interfaces/ZoneState*.class
+       cd $(BIN_DIR)/iotcode/EspAlarm; $(JAR) $(JARFLAGS) EspAlarm.jar ../../iotcode/EspAlarm/*.class ../../iotcode/interfaces/Alarm*.class ../../iotcode/interfaces/ZoneState*.class; mkdir tmp; mv EspAlarm.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += check-dlink-alarm
 check-dlink-alarm:
        $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) DlinkAlarm/*.java
        cp EspAlarm/DlinkAlarm.config $(BIN_DIR)/iotcode/DlinkAlarm
-       cd $(BIN_DIR)/iotcode/DlinkAlarm; $(JAR) $(JARFLAGS) DlinkAlarm.jar ../../iotcode/DlinkAlarm/*.class ../../iotcode/interfaces/Alarm*.class ../../iotcode/interfaces/ZoneState*.class
+       cd $(BIN_DIR)/iotcode/DlinkAlarm; $(JAR) $(JARFLAGS) DlinkAlarm.jar ../../iotcode/DlinkAlarm/*.class ../../iotcode/interfaces/Alarm*.class ../../iotcode/interfaces/ZoneState*.class; mkdir tmp; mv DlinkAlarm.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += check-motion
 check-motion:
        $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) MotionSensor/*.java
        cp MotionSensor/MotionSensor.config $(BIN_DIR)/iotcode/MotionSensor
-       cd $(BIN_DIR)/iotcode/MotionSensor; $(JAR) $(JARFLAGS) MotionSensor.jar ../../iotcode/MotionSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class ../../IrrigationController/MotionDetection*.class
+       cd $(BIN_DIR)/iotcode/MotionSensor; $(JAR) $(JARFLAGS) MotionSensor.jar ../../iotcode/MotionSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class ../../IrrigationController/MotionDetection*.class; mkdir tmp; mv MotionSensor.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += check-multipurpose
 check-multipurpose:
        $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) MultipurposeSensor/*.java
        cp MultipurposeSensor/MultipurposeSensor.config $(BIN_DIR)/iotcode/MultipurposeSensor
-       cd $(BIN_DIR)/iotcode/MultipurposeSensor; $(JAR) $(JARFLAGS) MultipurposeSensor.jar ../../iotcode/MultipurposeSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class ../../IrrigationController/MotionDetection*.class
+       cd $(BIN_DIR)/iotcode/MultipurposeSensor; $(JAR) $(JARFLAGS) MultipurposeSensor.jar ../../iotcode/MultipurposeSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class ../../IrrigationController/MotionDetection*.class; mkdir tmp; mv MultipurposeSensor.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += check-waterleak
 check-waterleak:
        $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) WaterLeakSensor/*.java
        cp WaterLeakSensor/WaterLeakSensor.config $(BIN_DIR)/iotcode/WaterLeakSensor
-       cd $(BIN_DIR)/iotcode/WaterLeakSensor; $(JAR) $(JARFLAGS) WaterLeakSensor.jar ../../iotcode/WaterLeakSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class ../../IrrigationController/MotionDetection*.class
+       cd $(BIN_DIR)/iotcode/WaterLeakSensor; $(JAR) $(JARFLAGS) WaterLeakSensor.jar ../../iotcode/WaterLeakSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class ../../IrrigationController/MotionDetection*.class; mkdir tmp; mv WaterLeakSensor.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += check-doorlock
 check-doorlock:
        $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) DoorlockSensor/*.java
        cp DoorlockSensor/DoorlockSensor.config $(BIN_DIR)/iotcode/DoorlockSensor
-       cd $(BIN_DIR)/iotcode/DoorlockSensor; $(JAR) $(JARFLAGS) DoorlockSensor.jar ../../iotcode/DoorlockSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class
+       cd $(BIN_DIR)/iotcode/DoorlockSensor; $(JAR) $(JARFLAGS) DoorlockSensor.jar ../../iotcode/DoorlockSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class; mkdir tmp; mv DoorlockSensor.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 PHONY += check-doorlockactuator
 check-doorlockactuator:
        $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) DoorlockActuator/*.java
        cp DoorlockActuator/DoorlockActuator.config $(BIN_DIR)/iotcode/DoorlockActuator
-       cd $(BIN_DIR)/iotcode/DoorlockActuator; $(JAR) $(JARFLAGS) DoorlockActuator.jar ../../iotcode/DoorlockActuator/*.class ../../iotcode/interfaces/SmartthingsActuator*.class ../../iotcode/interfaces/Camera*.class
+       cd $(BIN_DIR)/iotcode/DoorlockActuator; $(JAR) $(JARFLAGS) DoorlockActuator.jar ../../iotcode/DoorlockActuator/*.class ../../iotcode/interfaces/SmartthingsActuator*.class ../../iotcode/interfaces/Camera*.class; mkdir tmp; mv DoorlockActuator.class ./tmp; rm -rf *.class; mv ./tmp/* ./; rm -rf ./tmp
 
 .PHONY: $(PHONY)
index 81b323c..0939bd7 100644 (file)
@@ -240,6 +240,7 @@ runtime:
        #cp ../others/sslkey/*.jks $(BIN_DIR)/iotruntime/
        cp -r ../localconfig/mysql $(BIN_DIR)/iotruntime/
        cp -r ../localconfig/tomoyo $(BIN_DIR)/iotruntime/
+       [ -d $(BIN_DIR)/iotruntime/log ] || mkdir $(BIN_DIR)/iotruntime/log
 
 PHONY += doc
 doc: runtime installer rmi compiler