X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=benchmarks%2FCpp%2FLifxtest%2FMakefile;h=c57d1a452c64d7ba15dc8e65b9d61afe616f447a;hb=ffea2cb68e5a2e1bac041fe2279620eba8d227f8;hp=648fccac7d3663b97656f1080b4ed5c4f78a22bd;hpb=4d76dd9bf966df1b7fa8acfbcb14911d0bc5fdd0;p=iot2.git diff --git a/benchmarks/Cpp/Lifxtest/Makefile b/benchmarks/Cpp/Lifxtest/Makefile index 648fcca..c57d1a4 100755 --- a/benchmarks/Cpp/Lifxtest/Makefile +++ b/benchmarks/Cpp/Lifxtest/Makefile @@ -2,28 +2,48 @@ BASE = ../../.. include $(BASE)/common.mk -all: lifxtest +all: so-lifxtest so-lightstub so-roomstub 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/ - cp ./Lifxtest.config $(BIN_DIR)/Lifxtest - +# Lifxtest .so file will be generated for ARM (Raspberry Pi) 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/ + $(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/ +# Lifxtest .so file will be generated for ARM (Raspberry Pi) using a cross-compiler +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 +# Light stub .so file will be generated for ARM (Raspberry Pi) 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/ + $(G++) $(ARGS) ./LightBulbTest_Stub.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) using a cross-compiler +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 +so-roomstub: + $(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/ + cp ./Lifxtest.config $(BIN_DIR)/Lifxtest + +# Room stub .so file will be generated for ARM (Raspberry Pi) using a cross-compiler +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/ + cp ./Lifxtest.config $(BIN_DIR)/Lifxtest + +PHONY += zip +zip: + cd $(BIN_DIR)/Lifxtest; zip -r Lifxtest.zip *.so + .PHONY: $(PHONY)