Cleaning up the Makefile for compiler related commands; cleaning up C++ stubs and...
[iot2.git] / benchmarks / Cpp / Lifxtest / Makefile
1 BASE = ../../..
2
3 include $(BASE)/common.mk
4
5 all: so-lifxtest so-lightstub so-roomstub zip
6
7 ARGS = -shared -fpic
8
9 # Lifxtest .so file will be generated for ARM (Raspberry Pi)
10 PHONY += so-lifxtest
11 so-lifxtest:
12         $(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/
13         cp ./Lifxtest.config $(BIN_DIR)/Lifxtest
14
15 # Lifxtest .so file will be generated for ARM (Raspberry Pi) using a cross-compiler
16 PHONY += so-lifxtest-arm
17 so-lifxtest-arm:
18         $(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/
19         cp ./Lifxtest.config $(BIN_DIR)/Lifxtest
20
21 # Light stub .so file will be generated for ARM (Raspberry Pi)
22 PHONY += so-lightstub
23 so-lightstub:
24         $(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/
25         cp ./Lifxtest.config $(BIN_DIR)/Lifxtest
26
27 # Light stub .so file will be generated for ARM (Raspberry Pi) using a cross-compiler
28 PHONY += so-lightstub-arm
29 so-lightstub-arm:
30         $(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/
31         cp ./Lifxtest.config $(BIN_DIR)/Lifxtest
32
33 # Room stub .so file will be generated for ARM (Raspberry Pi)
34 PHONY += so-roomstub
35 so-roomstub:
36         $(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/
37         cp ./Lifxtest.config $(BIN_DIR)/Lifxtest
38
39 # Room stub .so file will be generated for ARM (Raspberry Pi) using a cross-compiler
40 PHONY += so-roomstub-arm
41 so-roomstub-arm:
42         $(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/
43         cp ./Lifxtest.config $(BIN_DIR)/Lifxtest
44
45 PHONY += zip
46 zip:
47         cd  $(BIN_DIR)/Lifxtest; zip -r Lifxtest.zip *.so
48
49 .PHONY: $(PHONY)