Adjusting C++ files to compile with gcc 4.9.3
[iot2.git] / benchmarks / drivers / Cpp / Makefile
index 74221bc06fcd8151682a86166f59310c07474120..0144b487e4a648100bba64c424e7c026e3282837 100644 (file)
@@ -2,25 +2,70 @@ BASE = ../../..
 
 include $(BASE)/common.mk
 
-all: light
+all: so-light so-lightskel lightzip so-labroom so-labroomskel labroomzip
 
 ARGS = -shared -fpic
 
 # Compile
 #
-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
+# LightBulb
 
+# LifxLightBulb .so file will be generated for ARM (Raspberry Pi)
 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 skeleton .so file will be generated for ARM (Raspberry Pi)
 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 .so file will be generated for ARM (Raspberry Pi) using a cross-compiler
+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
+
+# 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/
+       cp LifxLightBulb/LifxLightBulb.config $(BIN_DIR)/iotcode/LifxLightBulb
+
+PHONY += lightzip
+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
+so-labroom:
+       cd LabRoom/; $(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
+so-labroomskel:
+       cd LabRoom/; $(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/
+       cp LabRoom/LabRoom.config $(BIN_DIR)/iotcode/LabRoom
+
+# LabRoom .so file will be generated for ARM (Raspberry Pi) using a cross-compiler
+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/
+       cp LabRoom/LabRoom.config $(BIN_DIR)/iotcode/LabRoom
+
+PHONY += labroomzip
+labroomzip:
+       cd  $(BIN_DIR)/iotcode/LabRoom/; zip -r LabRoom.zip *.so
+
 .PHONY: $(PHONY)