JARFLAGS = cf
INTFACE_DIR = iotcode/interfaces
-all: light camera labroom greenlawn sprinkler moisture weathergateway audioroom gpsgateway ihome
+all: light camera labroom greenlawn sprinkler moisture weathergateway audioroom gpsgateway ihome homeroom alarm motion multipurpose waterleak
# Compile
#
cp IHome/IHome.config $(BIN_DIR)/iotcode/IHome
cd $(BIN_DIR)/iotcode/IHome; $(JAR) $(JARFLAGS) IHome.jar ../../iotcode/IHome/*.class ../../iotcode/interfaces/Speaker*.class
+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
+
+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
+
+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
+
+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
+
+PHONY += waterleak
+waterleak:
+ $(JAVAC) $(JFLAGS) WaterLeakSensor/*.java
+ cp MotionSensor/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
+
.PHONY: $(PHONY)