3 include $(BASE)/common.mk
5 BOOFDIR := ../libs/boofcv_libs
6 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
7 JLAYERDIR := ../libs/jlayer_libs
8 JLAYERJARS := $(JLAYERDIR)/jl1.0.1.jar
9 JFLAGS = -d $(BIN_DIR) -cp $(BIN_DIR):$(PHONEJARS):$(BOOFJARS):$(JLAYERJARS):$(CHECKERJARS)
11 INTFACE_DIR = iotcode/interfaces
15 CHECKER_OPT = -processor iotchecker.IoTJavaChecker -AprintErrorStack
17 ASTUBS = -Astubs=../../../checker/astubs/
19 all: light camera labroom greenlawn sprinkler moisture weathergateway audioroom gpsgateway ihome homeroom alarm motion multipurpose waterleak
20 check-all: check-light check-camera check-labroom check-greenlawn check-sprinkler check-moisture check-weathergateway check-audioroom check-gpsgateway check-ihome check-homeroom check-alarm check-motion check-multipurpose check-waterleak
22 # Compile - without checker
26 $(JAVAC) $(JFLAGS) LifxLightBulb/*.java
27 cp LifxLightBulb/LifxLightBulb.config $(BIN_DIR)/iotcode/LifxLightBulb
28 cd $(BIN_DIR)/iotcode/LifxLightBulb; $(JAR) $(JARFLAGS) LifxLightBulb.jar ../../iotcode/LifxLightBulb/*.class ../../iotcode/interfaces/LightBulb*.class
32 $(JAVAC) $(JFLAGS) AmcrestCamera/*.java
33 cp AmcrestCamera/AmcrestCamera.config $(BIN_DIR)/iotcode/AmcrestCamera
34 cd $(BIN_DIR)/iotcode/AmcrestCamera; $(JAR) $(JARFLAGS) AmcrestCamera.jar ../../iotcode/AmcrestCamera/*.class ../../iotcode/interfaces/Camera*.class ../../iotcode/interfaces/Resolution*.class
38 $(JAVAC) $(JFLAGS) LabRoom/*.java
39 cp LabRoom/LabRoom.config $(BIN_DIR)/iotcode/LabRoom
40 cd $(BIN_DIR)/iotcode/LabRoom; $(JAR) $(JARFLAGS) LabRoom.jar ../../iotcode/LabRoom/*.class ../../iotcode/interfaces/Room*.class
44 $(JAVAC) $(JFLAGS) GreenLawn/*.java
45 cp GreenLawn/GreenLawn.config $(BIN_DIR)/iotcode/GreenLawn
46 cd $(BIN_DIR)/iotcode/GreenLawn; $(JAR) $(JARFLAGS) GreenLawn.jar ../../iotcode/GreenLawn/*.class ../../iotcode/interfaces/Lawn*.class
50 $(JAVAC) $(JFLAGS) EspSprinkler/*.java
51 cp EspSprinkler/EspSprinkler.config $(BIN_DIR)/iotcode/EspSprinkler
52 cd $(BIN_DIR)/iotcode/EspSprinkler; $(JAR) $(JARFLAGS) EspSprinkler.jar ../../iotcode/EspSprinkler/*.class ../../iotcode/interfaces/Sprinkler*.class ../../iotcode/interfaces/ZoneState*.class
56 $(JAVAC) $(JFLAGS) SpruceSensor/*.java
57 cp SpruceSensor/SpruceSensor.config $(BIN_DIR)/iotcode/SpruceSensor
58 cd $(BIN_DIR)/iotcode/SpruceSensor; $(JAR) $(JARFLAGS) SpruceSensor.jar ../../iotcode/SpruceSensor/*.class ../../iotcode/interfaces/MoistureSensor*.class ../../iotcode/interfaces/Camera*.class ../../IrrigationController/MotionDetection*.class
60 PHONY += weathergateway
62 $(JAVAC) $(JFLAGS) WeatherPhoneGateway/*.java
63 cp WeatherPhoneGateway/WeatherPhoneGateway.config $(BIN_DIR)/iotcode/WeatherPhoneGateway
64 cd $(BIN_DIR)/iotcode/WeatherPhoneGateway; $(JAR) $(JARFLAGS) WeatherPhoneGateway.jar ../../iotcode/WeatherPhoneGateway/*.class ../../iotcode/interfaces/WeatherGateway*.class
68 $(JAVAC) $(JFLAGS) AudioRoom/*.java
69 cp AudioRoom/AudioRoom.config $(BIN_DIR)/iotcode/AudioRoom
70 cd $(BIN_DIR)/iotcode/AudioRoom; $(JAR) $(JARFLAGS) AudioRoom.jar ../../iotcode/AudioRoom/*.class ../../iotcode/interfaces/Room*.class
74 $(JAVAC) $(JFLAGS) GPSPhoneGateway/*.java
75 cp GPSPhoneGateway/GPSPhoneGateway.config $(BIN_DIR)/iotcode/GPSPhoneGateway
76 cd $(BIN_DIR)/iotcode/GPSPhoneGateway; $(JAR) $(JARFLAGS) GPSPhoneGateway.jar ../../iotcode/GPSPhoneGateway/*.class ../../iotcode/interfaces/GPSGateway*.class
80 $(JAVAC) $(JFLAGS) IHome/*.java
81 cp IHome/IHome.config $(BIN_DIR)/iotcode/IHome
82 cd $(BIN_DIR)/iotcode/IHome; $(JAR) $(JARFLAGS) IHome.jar ../../iotcode/IHome/*.class ../../iotcode/interfaces/Speaker*.class
86 $(JAVAC) $(JFLAGS) HomeRoom/*.java
87 cp HomeRoom/HomeRoom.config $(BIN_DIR)/iotcode/HomeRoom
88 cd $(BIN_DIR)/iotcode/HomeRoom; $(JAR) $(JARFLAGS) HomeRoom.jar ../../iotcode/HomeRoom/*.class ../../iotcode/interfaces/Room*.class
92 $(JAVAC) $(JFLAGS) EspAlarm/*.java
93 cp EspAlarm/EspAlarm.config $(BIN_DIR)/iotcode/EspAlarm
94 cd $(BIN_DIR)/iotcode/EspAlarm; $(JAR) $(JARFLAGS) EspAlarm.jar ../../iotcode/EspAlarm/*.class ../../iotcode/interfaces/Alarm*.class ../../iotcode/interfaces/ZoneState*.class
98 $(JAVAC) $(JFLAGS) MotionSensor/*.java
99 cp MotionSensor/MotionSensor.config $(BIN_DIR)/iotcode/MotionSensor
100 cd $(BIN_DIR)/iotcode/MotionSensor; $(JAR) $(JARFLAGS) MotionSensor.jar ../../iotcode/MotionSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class ../../IrrigationController/MotionDetection*.class
102 PHONY += multipurpose
104 $(JAVAC) $(JFLAGS) MultipurposeSensor/*.java
105 cp MultipurposeSensor/MultipurposeSensor.config $(BIN_DIR)/iotcode/MultipurposeSensor
106 cd $(BIN_DIR)/iotcode/MultipurposeSensor; $(JAR) $(JARFLAGS) MultipurposeSensor.jar ../../iotcode/MultipurposeSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class ../../IrrigationController/MotionDetection*.class
110 $(JAVAC) $(JFLAGS) WaterLeakSensor/*.java
111 cp WaterLeakSensor/WaterLeakSensor.config $(BIN_DIR)/iotcode/WaterLeakSensor
112 cd $(BIN_DIR)/iotcode/WaterLeakSensor; $(JAR) $(JARFLAGS) WaterLeakSensor.jar ../../iotcode/WaterLeakSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class ../../IrrigationController/MotionDetection*.class
115 # Compile - with checker
119 $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) LifxLightBulb/*.java
120 cp LifxLightBulb/LifxLightBulb.config $(BIN_DIR)/iotcode/LifxLightBulb
121 cd $(BIN_DIR)/iotcode/LifxLightBulb; $(JAR) $(JARFLAGS) LifxLightBulb.jar ../../iotcode/LifxLightBulb/*.class ../../iotcode/interfaces/LightBulb*.class
123 PHONY += check-camera
125 $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) AmcrestCamera/*.java
126 cp AmcrestCamera/AmcrestCamera.config $(BIN_DIR)/iotcode/AmcrestCamera
127 cd $(BIN_DIR)/iotcode/AmcrestCamera; $(JAR) $(JARFLAGS) AmcrestCamera.jar ../../iotcode/AmcrestCamera/*.class ../../iotcode/interfaces/Camera*.class ../../iotcode/interfaces/Resolution*.class
129 PHONY += check-labroom
131 $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) LabRoom/*.java
132 cp LabRoom/LabRoom.config $(BIN_DIR)/iotcode/LabRoom
133 cd $(BIN_DIR)/iotcode/LabRoom; $(JAR) $(JARFLAGS) LabRoom.jar ../../iotcode/LabRoom/*.class ../../iotcode/interfaces/Room*.class
135 PHONY += check-greenlawn
137 $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) GreenLawn/*.java
138 cp GreenLawn/GreenLawn.config $(BIN_DIR)/iotcode/GreenLawn
139 cd $(BIN_DIR)/iotcode/GreenLawn; $(JAR) $(JARFLAGS) GreenLawn.jar ../../iotcode/GreenLawn/*.class ../../iotcode/interfaces/Lawn*.class
141 PHONY += check-sprinkler
143 $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) EspSprinkler/*.java
144 cp EspSprinkler/EspSprinkler.config $(BIN_DIR)/iotcode/EspSprinkler
145 cd $(BIN_DIR)/iotcode/EspSprinkler; $(JAR) $(JARFLAGS) EspSprinkler.jar ../../iotcode/EspSprinkler/*.class ../../iotcode/interfaces/Sprinkler*.class ../../iotcode/interfaces/ZoneState*.class
147 PHONY += check-moisture
149 $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) SpruceSensor/*.java
150 cp SpruceSensor/SpruceSensor.config $(BIN_DIR)/iotcode/SpruceSensor
151 cd $(BIN_DIR)/iotcode/SpruceSensor; $(JAR) $(JARFLAGS) SpruceSensor.jar ../../iotcode/SpruceSensor/*.class ../../iotcode/interfaces/MoistureSensor*.class ../../iotcode/interfaces/Camera*.class ../../IrrigationController/MotionDetection*.class
153 PHONY += check-weathergateway
154 check-weathergateway:
155 $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) WeatherPhoneGateway/*.java
156 cp WeatherPhoneGateway/WeatherPhoneGateway.config $(BIN_DIR)/iotcode/WeatherPhoneGateway
157 cd $(BIN_DIR)/iotcode/WeatherPhoneGateway; $(JAR) $(JARFLAGS) WeatherPhoneGateway.jar ../../iotcode/WeatherPhoneGateway/*.class ../../iotcode/interfaces/WeatherGateway*.class
159 PHONY += check-audioroom
161 $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) AudioRoom/*.java
162 cp AudioRoom/AudioRoom.config $(BIN_DIR)/iotcode/AudioRoom
163 cd $(BIN_DIR)/iotcode/AudioRoom; $(JAR) $(JARFLAGS) AudioRoom.jar ../../iotcode/AudioRoom/*.class ../../iotcode/interfaces/Room*.class
165 PHONY += check-gpsgateway
167 $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) GPSPhoneGateway/*.java
168 cp GPSPhoneGateway/GPSPhoneGateway.config $(BIN_DIR)/iotcode/GPSPhoneGateway
169 cd $(BIN_DIR)/iotcode/GPSPhoneGateway; $(JAR) $(JARFLAGS) GPSPhoneGateway.jar ../../iotcode/GPSPhoneGateway/*.class ../../iotcode/interfaces/GPSGateway*.class
173 $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) IHome/*.java
174 cp IHome/IHome.config $(BIN_DIR)/iotcode/IHome
175 cd $(BIN_DIR)/iotcode/IHome; $(JAR) $(JARFLAGS) IHome.jar ../../iotcode/IHome/*.class ../../iotcode/interfaces/Speaker*.class
177 PHONY += check-homeroom
179 $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) HomeRoom/*.java
180 cp HomeRoom/HomeRoom.config $(BIN_DIR)/iotcode/HomeRoom
181 cd $(BIN_DIR)/iotcode/HomeRoom; $(JAR) $(JARFLAGS) HomeRoom.jar ../../iotcode/HomeRoom/*.class ../../iotcode/interfaces/Room*.class
185 $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) EspAlarm/*.java
186 cp EspAlarm/EspAlarm.config $(BIN_DIR)/iotcode/EspAlarm
187 cd $(BIN_DIR)/iotcode/EspAlarm; $(JAR) $(JARFLAGS) EspAlarm.jar ../../iotcode/EspAlarm/*.class ../../iotcode/interfaces/Alarm*.class ../../iotcode/interfaces/ZoneState*.class
189 PHONY += check-motion
191 $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) MotionSensor/*.java
192 cp MotionSensor/MotionSensor.config $(BIN_DIR)/iotcode/MotionSensor
193 cd $(BIN_DIR)/iotcode/MotionSensor; $(JAR) $(JARFLAGS) MotionSensor.jar ../../iotcode/MotionSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class ../../IrrigationController/MotionDetection*.class
195 PHONY += check-multipurpose
197 $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) MultipurposeSensor/*.java
198 cp MultipurposeSensor/MultipurposeSensor.config $(BIN_DIR)/iotcode/MultipurposeSensor
199 cd $(BIN_DIR)/iotcode/MultipurposeSensor; $(JAR) $(JARFLAGS) MultipurposeSensor.jar ../../iotcode/MultipurposeSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class ../../IrrigationController/MotionDetection*.class
201 PHONY += check-waterleak
203 $(JAVAC) $(JFLAGS) $(CHECKER_OPT) $(ASTUBS) WaterLeakSensor/*.java
204 cp WaterLeakSensor/WaterLeakSensor.config $(BIN_DIR)/iotcode/WaterLeakSensor
205 cd $(BIN_DIR)/iotcode/WaterLeakSensor; $(JAR) $(JARFLAGS) WaterLeakSensor.jar ../../iotcode/WaterLeakSensor/*.class ../../iotcode/interfaces/SmartthingsSensor*.class ../../iotcode/interfaces/Camera*.class ../../IrrigationController/MotionDetection*.class