Adjustments and clean-ups for Makefile for C++ benchmark and drivers
authorrtrimana <rtrimana@uci.edu>
Wed, 7 Mar 2018 17:20:13 +0000 (09:20 -0800)
committerrtrimana <rtrimana@uci.edu>
Wed, 7 Mar 2018 17:20:13 +0000 (09:20 -0800)
benchmarks/Cpp/Lifxtest/Makefile
benchmarks/Java/Lifxtest/Lifxtest.config
benchmarks/Makefile
benchmarks/drivers/Cpp/LifxLightBulb/LifxLightBulb.config
benchmarks/drivers/Cpp/Makefile
benchmarks/drivers/Java/LifxLightBulb/LifxLightBulb.config
common.mk

index b79627bbf63791c2e440044742628586ebc6965f..d71ea12b10f624351edb1acab4685725928cf34e 100755 (executable)
@@ -6,36 +6,19 @@ all: so-lifxtest-arm so-lightstub-arm so-roomstub-arm zip
 
 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/
index d1320f7b04729cbc0418cb8c88d7ae659bea6b32..51c6dbc5dbbd46f488cade0933f288c97980df2b 100644 (file)
@@ -1,11 +1,24 @@
 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
 
index 2a886b10633b67b630168e4797a417ead81a3f34..9c23cbdceef743b7e609ab5f5ed7edafbbf4155f 100644 (file)
@@ -4,7 +4,11 @@ BOOFJARS := $(BOOFDIR)/BoofCV-feature-0.21.jar:$(BOOFDIR)/BoofCV-io-0.21.jar:$(B
 
 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:
@@ -22,15 +26,21 @@ PHONY += annotation
 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:
index 878d6c4dc8030b410c0158e0b7dc62ba00ba63d2..25322a6f492019794a2efff8f9067d26ae655919 100644 (file)
@@ -1,8 +1,8 @@
 # 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
@@ -11,7 +11,13 @@ FIELD_CLASS_0=IoTDeviceAddress
 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
index 242ab67e65046ccf47c4b96937bf76c1bdbc2143..d531d5af71b1bded2c408da2b22f69768f748b25 100644 (file)
@@ -9,36 +9,14 @@ ARGS = -shared -fpic
 # 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/
@@ -49,11 +27,14 @@ lightzip:
        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/
index 11d28bb58317ab2c6295541dbf35ab9cdd912ac7..25322a6f492019794a2efff8f9067d26ae655919 100644 (file)
@@ -1,13 +1,22 @@
 # 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
index 40d2ede38bd67be4beaedaae61d3a85f7affc613..9cacf5b2044d64170df5b1bf5ed4cabc486791dd 100644 (file)
--- a/common.mk
+++ b/common.mk
@@ -1,6 +1,5 @@
 G++ := g++
 ARM_G++ := arm-linux-gnueabihf-g++
-#ARM_G++ := arm-linux-gnueabi-g++
 JAVA := java
 JAR := jar
 JAVADOC := javadoc