Adding Java Checker Framework checker option in the makefiles; basically this is...
[iot2.git] / benchmarks / drivers / Java / Makefile
1 BASE = ../../..
2
3 include $(BASE)/common.mk
4
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)
10 JARFLAGS = cf
11 INTFACE_DIR = iotcode/interfaces
12
13 # checker option
14 #
15 CHECKER_OPT = -processor iotchecker.IoTJavaChecker -AprintErrorStack
16
17 ASTUBS = -Astubs=../../../checker/astubs/ 
18
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
21
22 # Compile - without checker
23 #
24 PHONY += light
25 light:
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
29
30 PHONY += camera
31 camera:
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
35
36 PHONY += labroom
37 labroom:
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
41
42 PHONY += greenlawn
43 greenlawn:
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
47
48 PHONY += sprinkler
49 sprinkler:
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
53
54 PHONY += moisture
55 moisture:
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
59
60 PHONY += weathergateway
61 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
65
66 PHONY += audioroom
67 audioroom:
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
71
72 PHONY += gpsgateway
73 gpsgateway:
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
77
78 PHONY += ihome
79 ihome:
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
83
84 PHONY += homeroom
85 homeroom:
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
89
90 PHONY += alarm
91 alarm:
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
95
96 PHONY += motion
97 motion:
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
101
102 PHONY += multipurpose
103 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
107
108 PHONY += waterleak
109 waterleak:
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
113
114
115 # Compile - with checker
116 #
117 PHONY += check-light
118 check-light:
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
122
123 PHONY += check-camera
124 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
128
129 PHONY += check-labroom
130 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
134
135 PHONY += check-greenlawn
136 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
140
141 PHONY += check-sprinkler
142 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
146
147 PHONY += check-moisture
148 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
152
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
158
159 PHONY += check-audioroom
160 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
164
165 PHONY += check-gpsgateway
166 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
170
171 PHONY += check-ihome
172 check-ihome:
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
176
177 PHONY += check-homeroom
178 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
182
183 PHONY += check-alarm
184 check-alarm:
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
188
189 PHONY += check-motion
190 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
194
195 PHONY += check-multipurpose
196 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
200
201 PHONY += check-waterleak
202 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
206
207 .PHONY: $(PHONY)