Adjustments and clean-ups for Makefile for C++ benchmark and drivers
[iot2.git] / benchmarks / drivers / Cpp / Makefile
1 BASE = ../../..
2
3 include $(BASE)/common.mk
4
5 all: so-light-arm so-lightskel-arm lightzip so-labroom-arm so-labroomskel-arm labroomzip
6
7 ARGS = -shared -fpic
8
9 # Compile
10 #
11 # LightBulb
12
13 # LifxLightBulb .so file will be generated for ARM (Raspberry Pi)
14 PHONY += so-light-arm
15 so-light-arm:
16         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/
17         cp LifxLightBulb/LifxLightBulb.config $(BIN_DIR)/iotcode/LifxLightBulb
18
19 # LifxLightBulb skeleton .so file will be generated for ARM (Raspberry Pi)
20 PHONY += so-lightskel-arm
21 so-lightskel-arm:
22         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/
23         cp LifxLightBulb/LifxLightBulb.config $(BIN_DIR)/iotcode/LifxLightBulb
24
25 PHONY += lightzip
26 lightzip:
27         cd  $(BIN_DIR)/iotcode/LifxLightBulb/; zip -r LifxLightBulb.zip *.so
28
29 # LabRoom
30
31 # LabRoom .so file will be generated for ARM (Raspberry Pi)
32 PHONY += so-labroom-arm
33 so-labroom-arm:
34         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/
35         cp LabRoom/LabRoom.config $(BIN_DIR)/iotcode/LabRoom
36
37 # LabRoom skeleton .so file will be generated for ARM (Raspberry Pi)
38 PHONY += so-labroomskel-arm
39 so-labroomskel-arm:
40         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/
41         cp LabRoom/LabRoom.config $(BIN_DIR)/iotcode/LabRoom
42
43 PHONY += labroomzip
44 labroomzip:
45         cd  $(BIN_DIR)/iotcode/LabRoom/; zip -r LabRoom.zip *.so
46
47 .PHONY: $(PHONY)