ARGS = -shared -fpic
-PHONY += lifxtest
-lifxtest:
- $(G++) ./Lifxtest.cpp $(BASE)/iotjava/iotruntime/cpp/socket/Socket.cpp -o $(BIN_DIR)/Lifxtest/Lifxtest.o --std=c++11 -pthread -pg -I$(BASE)/iotjava/iotruntime/cpp/ -I$(BASE)/iotjava/iotruntime/cpp/socket/ -I$(BASE)/iotjava/iotruntime/cpp/setrelation/ -I$(BASE)/iotjava/iotrmi/C++/ -I$(BASE)/benchmarks/virtuals/ -I$(BASE)/benchmarks/drivers/Cpp/LifxLightBulb/ -I$(BASE)/benchmarks/drivers/Cpp/LabRoom/
- cp ./Lifxtest.config $(BIN_DIR)/Lifxtest
-
-PHONY += so-lifxtest
-so-lifxtest:
- $(G++) $(ARGS) ./Lifxtest.cpp $(BASE)/iotjava/iotruntime/cpp/socket/Socket.cpp -o $(BIN_DIR)/Lifxtest/Lifxtest.so --std=c++11 -pthread -pg -I$(BASE)/iotjava/iotruntime/cpp/ -I$(BASE)/iotjava/iotruntime/cpp/socket/ -I$(BASE)/iotjava/iotruntime/cpp/setrelation/ -I$(BASE)/iotjava/iotrmi/C++/ -I$(BASE)/benchmarks/virtuals/ -I$(BASE)/benchmarks/drivers/Cpp/LifxLightBulb/ -I$(BASE)/benchmarks/drivers/Cpp/LabRoom/
- cp ./Lifxtest.config $(BIN_DIR)/Lifxtest
-
+# Lifxtest .so file will be generated for ARM (Raspberry Pi)
PHONY += so-lifxtest-arm
so-lifxtest-arm:
$(ARM_G++) $(ARGS) ./Lifxtest.cpp $(BASE)/iotjava/iotruntime/cpp/socket/Socket.cpp -o $(BIN_DIR)/Lifxtest/Lifxtest.so --std=c++11 -pthread -pg -I$(BASE)/iotjava/iotruntime/cpp/ -I$(BASE)/iotjava/iotruntime/cpp/socket/ -I$(BASE)/iotjava/iotruntime/cpp/setrelation/ -I$(BASE)/iotjava/iotrmi/C++/ -I$(BASE)/benchmarks/virtuals/ -I$(BASE)/benchmarks/drivers/Cpp/LifxLightBulb/ -I$(BASE)/benchmarks/drivers/Cpp/LabRoom/
cp ./Lifxtest.config $(BIN_DIR)/Lifxtest
-PHONY += lightstub
-lightstub:
- $(G++) ./LightBulbTest_Stub.cpp $(BASE)/iotjava/iotruntime/cpp/socket/Socket.cpp -o $(BIN_DIR)/Lifxtest/LightBulbTest_Stub.o --std=c++11 -pthread -pg -I$(BASE)/iotjava/iotruntime/cpp/ -I$(BASE)/iotjava/iotruntime/cpp/socket/ -I$(BASE)/iotjava/iotruntime/cpp/setrelation/ -I$(BASE)/iotjava/iotrmi/C++/ -I$(BASE)/benchmarks/virtuals/
- cp ./Lifxtest.config $(BIN_DIR)/Lifxtest
-
-PHONY += so-lightstub
-so-lightstub:
- $(G++) $(ARGS) ./LightBulbTest_Stub.cpp $(BASE)/iotjava/iotruntime/cpp/socket/Socket.cpp -o $(BIN_DIR)/Lifxtest/LightBulbTest_Stub.so --std=c++11 -pthread -pg -I$(BASE)/iotjava/iotruntime/cpp/ -I$(BASE)/iotjava/iotruntime/cpp/socket/ -I$(BASE)/iotjava/iotruntime/cpp/setrelation/ -I$(BASE)/iotjava/iotrmi/C++/ -I$(BASE)/benchmarks/virtuals/
- cp ./Lifxtest.config $(BIN_DIR)/Lifxtest
-
+# Light stub .so file will be generated for ARM (Raspberry Pi)
PHONY += so-lightstub-arm
so-lightstub-arm:
$(ARM_G++) $(ARGS) ./LightBulbTest_Stub.cpp $(BASE)/iotjava/iotruntime/cpp/socket/Socket.cpp -o $(BIN_DIR)/Lifxtest/LightBulbTest_Stub.so --std=c++11 -pthread -pg -I$(BASE)/iotjava/iotruntime/cpp/ -I$(BASE)/iotjava/iotruntime/cpp/socket/ -I$(BASE)/iotjava/iotruntime/cpp/setrelation/ -I$(BASE)/iotjava/iotrmi/C++/ -I$(BASE)/benchmarks/virtuals/
cp ./Lifxtest.config $(BIN_DIR)/Lifxtest
+# Room stub .so file will be generated for ARM (Raspberry Pi)
PHONY += so-roomstub-arm
so-roomstub-arm:
$(ARM_G++) $(ARGS) ./RoomSmart_Stub.cpp $(BASE)/iotjava/iotruntime/cpp/socket/Socket.cpp -o $(BIN_DIR)/Lifxtest/RoomSmart_Stub.so --std=c++11 -pthread -pg -I$(BASE)/iotjava/iotruntime/cpp/ -I$(BASE)/iotjava/iotruntime/cpp/socket/ -I$(BASE)/iotjava/iotruntime/cpp/setrelation/ -I$(BASE)/iotjava/iotrmi/C++/ -I$(BASE)/benchmarks/virtuals/
ADDITIONAL_ZIP_FILE=No
# For C++ instrumentation
-FIELD_NUMBER=1
+FIELD_NUMBER=3
+
+# Field lifx_light_bulb
FIELD_0=lifx_light_bulb
FIELD_CLASS_0=LightBulbTest
FIELD_TYPE_0=IoTSet
+# Field lab_room
+FIELD_1=lab_room
+FIELD_CLASS_1=RoomSmart
+FIELD_TYPE_1=IoTSet
+
+# Field roomLightRelation
+FIELD_2=roomLightRelation
+FIELD_CLASS_2=RoomSmart
+FIELD_CLASS_REL_2=LightBulbTest
+FIELD_TYPE_2=IoTRelation
+
# Language
LANGUAGE=Java
include $(BASE)/common.mk
-all: copy_libs interfaces annotation drivers Lifxtest SmartLights Irrigation Speaker HomeSecurity
+# Compile Java
+j-all: copy_libs interfaces annotation drivers-j Lifxtest SmartLights Irrigation Speaker HomeSecurity
+
+# Compile C++
+c-all: drivers-c Lifxtest-c
PHONY += copy_libs
copy_libs:
annotation:
$(JAVAC) -d $(BIN_DIR) -classpath $(BIN_DIR):. annotation/*java
-PHONY += drivers
-drivers:
+PHONY += drivers-j
+drivers-j:
$(MAKE) -C drivers/Java
- #$(MAKE) -C drivers/Cpp
+
+PHONY += drivers-c
+drivers-c:
+ $(MAKE) -C drivers/Cpp
PHONY += Lifxtest
Lifxtest:
$(MAKE) -C Java/Lifxtest
- #$(MAKE) -C Cpp/Lifxtest
+
+PHONY += Lifxtest-c
+Lifxtest-c:
+ $(MAKE) -C Cpp/Lifxtest
PHONY += SmartLights
SmartLights:
# Skeleton/original interface
INTERFACE_CLASS=LightBulb
# Stub
-#INTERFACE_STUB_CLASS=LightBulbTest
-INTERFACE_STUB_CLASS=LightBulbSmart
+#INTERFACE_STUB_CLASS=LightBulbTest # This one is needed for Lifxtest application
+INTERFACE_STUB_CLASS=LightBulbSmart # This one is needed for SmartLightsController application
# For C++ instrumentation
FIELD_NUMBER=1
FIELD_TYPE_0=IoTSet
# Language
+LANGUAGE=Java
#LANGUAGE=C++
# Language (fine-grained flags)
-LANGUAGE_LifxLightBulbLB1=C++
-LANGUAGE_LifxLightBulbLB2=C++
+#LANGUAGE_LifxLightBulbLB1=C++
+#LANGUAGE_LifxLightBulbLB1=Java
+#LANGUAGE_LifxLightBulbLB2=C++
+#LANGUAGE_LifxLightBulbLB2=Java
+
+# Tomoyo
+ADDITIONAL_MAC_POLICY=No
# Compile
#
# LightBulb
-PHONY += light
-light:
- cd LifxLightBulb/; $(G++) ./LifxLightBulb.cpp $(BASE)/../iotjava/iotruntime/cpp/socket/Socket.cpp -o ../$(BIN_DIR)/iotcode/LifxLightBulb/LifxLightBulb.o --std=c++11 -pthread -pg -I$(BASE)/../iotjava/iotruntime/cpp/ -I$(BASE)/../iotjava/iotruntime/cpp/socket/ -I$(BASE)/../iotjava/iotruntime/cpp/setrelation/ -I$(BASE)/../iotjava/iotrmi/C++/ -I$(BASE)/../benchmarks/virtuals/
- cp LifxLightBulb/LifxLightBulb.config $(BIN_DIR)/iotcode/LifxLightBulb
-
-PHONY += light-arm
-light-arm:
- cd LifxLightBulb/; $(ARM_G++) ./LifxLightBulb.cpp $(BASE)/../iotjava/iotruntime/cpp/socket/Socket.cpp -o ../$(BIN_DIR)/iotcode/LifxLightBulb/LifxLightBulb.o --std=c++11 -pthread -pg -I$(BASE)/../iotjava/iotruntime/cpp/ -I$(BASE)/../iotjava/iotruntime/cpp/socket/ -I$(BASE)/../iotjava/iotruntime/cpp/setrelation/ -I$(BASE)/../iotjava/iotrmi/C++/ -I$(BASE)/../benchmarks/virtuals/
- cp LifxLightBulb/LifxLightBulb.config $(BIN_DIR)/iotcode/LifxLightBulb
-
-PHONY += so-light
-so-light:
- cd LifxLightBulb/; $(G++) $(ARGS) ./LifxLightBulb.cpp $(BASE)/../iotjava/iotruntime/cpp/socket/Socket.cpp -o ../$(BIN_DIR)/iotcode/LifxLightBulb/LifxLightBulb.so --std=c++11 -pthread -pg -I$(BASE)/../iotjava/iotruntime/cpp/ -I$(BASE)/../iotjava/iotruntime/cpp/socket/ -I$(BASE)/../iotjava/iotruntime/cpp/setrelation/ -I$(BASE)/../iotjava/iotrmi/C++/ -I$(BASE)/../benchmarks/virtuals/
- cp LifxLightBulb/LifxLightBulb.config $(BIN_DIR)/iotcode/LifxLightBulb
+# LifxLightBulb .so file will be generated for ARM (Raspberry Pi)
PHONY += so-light-arm
so-light-arm:
cd LifxLightBulb/; $(ARM_G++) $(ARGS) ./LifxLightBulb.cpp $(BASE)/../iotjava/iotruntime/cpp/socket/Socket.cpp -o ../$(BIN_DIR)/iotcode/LifxLightBulb/LifxLightBulb.so --std=c++11 -pthread -pg -I$(BASE)/../iotjava/iotruntime/cpp/ -I$(BASE)/../iotjava/iotruntime/cpp/socket/ -I$(BASE)/../iotjava/iotruntime/cpp/setrelation/ -I$(BASE)/../iotjava/iotrmi/C++/ -I$(BASE)/../benchmarks/virtuals/
cp LifxLightBulb/LifxLightBulb.config $(BIN_DIR)/iotcode/LifxLightBulb
-PHONY += lightskel
-lightskel:
- cd LifxLightBulb/; $(G++) ./LightBulb_Skeleton.cpp $(BASE)/../iotjava/iotruntime/cpp/socket/Socket.cpp -o ../$(BIN_DIR)/iotcode/LifxLightBulb/LightBulb_Skeleton.o --std=c++11 -pthread -pg -I$(BASE)/../iotjava/iotruntime/cpp/ -I$(BASE)/../iotjava/iotruntime/cpp/socket/ -I$(BASE)/../iotjava/iotruntime/cpp/setrelation/ -I$(BASE)/../iotjava/iotrmi/C++/ -I$(BASE)/../benchmarks/virtuals/
- cp LifxLightBulb/LifxLightBulb.config $(BIN_DIR)/iotcode/LifxLightBulb
-
-PHONY += so-lightskel
-so-lightskel:
- cd LifxLightBulb/; $(G++) $(ARGS) ./LightBulb_Skeleton.cpp $(BASE)/../iotjava/iotruntime/cpp/socket/Socket.cpp -o ../$(BIN_DIR)/iotcode/LifxLightBulb/LightBulb_Skeleton.so --std=c++11 -pthread -pg -I$(BASE)/../iotjava/iotruntime/cpp/ -I$(BASE)/../iotjava/iotruntime/cpp/socket/ -I$(BASE)/../iotjava/iotruntime/cpp/setrelation/ -I$(BASE)/../iotjava/iotrmi/C++/ -I$(BASE)/../benchmarks/virtuals/
- cp LifxLightBulb/LifxLightBulb.config $(BIN_DIR)/iotcode/LifxLightBulb
-
+# LifxLightBulb skeleton .so file will be generated for ARM (Raspberry Pi)
PHONY += so-lightskel-arm
so-lightskel-arm:
cd LifxLightBulb/; $(ARM_G++) $(ARGS) ./LightBulb_Skeleton.cpp $(BASE)/../iotjava/iotruntime/cpp/socket/Socket.cpp -o ../$(BIN_DIR)/iotcode/LifxLightBulb/LightBulb_Skeleton.so --std=c++11 -pthread -pg -I$(BASE)/../iotjava/iotruntime/cpp/ -I$(BASE)/../iotjava/iotruntime/cpp/socket/ -I$(BASE)/../iotjava/iotruntime/cpp/setrelation/ -I$(BASE)/../iotjava/iotrmi/C++/ -I$(BASE)/../benchmarks/virtuals/
cd $(BIN_DIR)/iotcode/LifxLightBulb/; zip -r LifxLightBulb.zip *.so
# LabRoom
+
+# LabRoom .so file will be generated for ARM (Raspberry Pi)
PHONY += so-labroom-arm
so-labroom-arm:
cd LabRoom/; $(ARM_G++) $(ARGS) ./LabRoom.cpp $(BASE)/../iotjava/iotruntime/cpp/socket/Socket.cpp -o ../$(BIN_DIR)/iotcode/LabRoom/LabRoom.so --std=c++11 -pthread -pg -I$(BASE)/../iotjava/iotruntime/cpp/ -I$(BASE)/../iotjava/iotruntime/cpp/socket/ -I$(BASE)/../iotjava/iotruntime/cpp/setrelation/ -I$(BASE)/../iotjava/iotrmi/C++/ -I$(BASE)/../benchmarks/virtuals/
cp LabRoom/LabRoom.config $(BIN_DIR)/iotcode/LabRoom
+# LabRoom skeleton .so file will be generated for ARM (Raspberry Pi)
PHONY += so-labroomskel-arm
so-labroomskel-arm:
cd LabRoom/; $(ARM_G++) $(ARGS) ./Room_Skeleton.cpp $(BASE)/../iotjava/iotruntime/cpp/socket/Socket.cpp -o ../$(BIN_DIR)/iotcode/LabRoom/Room_Skeleton.so --std=c++11 -pthread -pg -I$(BASE)/../iotjava/iotruntime/cpp/ -I$(BASE)/../iotjava/iotruntime/cpp/socket/ -I$(BASE)/../iotjava/iotruntime/cpp/setrelation/ -I$(BASE)/../iotjava/iotrmi/C++/ -I$(BASE)/../benchmarks/virtuals/
# Skeleton/original interface
INTERFACE_CLASS=LightBulb
# Stub
-INTERFACE_STUB_CLASS=LightBulbTest # This one is needed for Lifxtest application
-#INTERFACE_STUB_CLASS=LightBulbSmart # This one is needed for SmartLightsController application
+#INTERFACE_STUB_CLASS=LightBulbTest # This one is needed for Lifxtest application
+INTERFACE_STUB_CLASS=LightBulbSmart # This one is needed for SmartLightsController application
+
+# For C++ instrumentation
+FIELD_NUMBER=1
+FIELD_0=lb_addresses
+FIELD_CLASS_0=IoTDeviceAddress
+FIELD_TYPE_0=IoTSet
# Language
LANGUAGE=Java
+#LANGUAGE=C++
# Language (fine-grained flags)
+#LANGUAGE_LifxLightBulbLB1=C++
#LANGUAGE_LifxLightBulbLB1=Java
+#LANGUAGE_LifxLightBulbLB2=C++
#LANGUAGE_LifxLightBulbLB2=Java
# Tomoyo
G++ := g++
ARM_G++ := arm-linux-gnueabihf-g++
-#ARM_G++ := arm-linux-gnueabi-g++
JAVA := java
JAR := jar
JAVADOC := javadoc