Completing compiler with C++ struct support; need to clean up code!
[iot2.git] / iotjava / Makefile
index b79b8e7bd3a5098efcdfb4dd71a46def4125e514..d7f6a9d7fcf625920113a94e2285e6222b071676 100644 (file)
@@ -27,6 +27,21 @@ PHONY += runtime
 runtime:
        $(JAVAC) -classpath . iotruntime/master/*.java -d $(BIN_DIR)
 
+# TODO: Can remove this later - just to test-compile the resulted files from the compiler
+PHONY += compile
+compile:
+       cd $(BIN_DIR)/iotpolicy/output_files; cp *.java ./Java
+       cd $(BIN_DIR)/iotpolicy/output_files; cp *.hpp ./Cplus
+#      cd $(BIN_DIR)/iotpolicy/output_files/Java; $(JAVAC) -cp .:..:../../../$(BIN_DIR) *.java
+#      cd $(BIN_DIR)/iotpolicy/output_files/Cplus; $(G++) ./*.hpp --std=c++11 -pthread -pg -I../../../../iotjava/iotrmi/C++/
+       cd $(BIN_DIR)/iotpolicy/output_files/Cplus; $(G++) ./Camera_Skeleton.hpp --std=c++11 -pthread -pg -I../../../../iotjava/iotrmi/C++/
+
+PHONY += clean
+clean:
+       cd $(BIN_DIR)/iotpolicy/output_files; rm -rf *.class *.gch
+       cd $(BIN_DIR)/iotpolicy/output_files/Java; rm -rf *.class
+       cd $(BIN_DIR)/iotpolicy/output_files/Cplus; rm -rf *.gch
+
 # RMI compilation and run
 PHONY += rmi
 rmi:
@@ -46,7 +61,7 @@ rmi:
 #      $(G++) iotrmi/C++/sample/CallBack_Stub.cpp -o $(BIN_DIR)/iotrmi/C++/sample/CallBack_Stub.out --std=c++11
 #      $(G++) iotrmi/C++/sample/CallBack_Skeleton.cpp -o $(BIN_DIR)/iotrmi/C++/sample/CallBack_Skeleton.out --std=c++11
        #$(G++) iotrmi/C++/sample/TestClass.cpp -o $(BIN_DIR)/iotrmi/C++/sample/TestClass.out --std=c++11
-       $(G++) iotrmi/C++/sample/TestClass_Stub.cpp -o $(BIN_DIR)/iotrmi/C++/sample/TestClass_Stub.out --std=c++11 -pthread -pg
+#      $(G++) iotrmi/C++/sample/TestClass_Stub.cpp -o $(BIN_DIR)/iotrmi/C++/sample/TestClass_Stub.out --std=c++11 -pthread -pg
        $(G++) iotrmi/C++/sample/TestClass_Skeleton.cpp -o $(BIN_DIR)/iotrmi/C++/sample/TestClass_Skeleton.out --std=c++11 -pthread -pg
        #$(G++) iotrmi/C++/sample/Test.cpp -o ../bin/iotrmi/C++/sample/Test.out --std=c++11 -lpthread
        #$(G++) iotrmi/C++/sample/Test2.cpp -o ../bin/iotrmi/C++/sample/Test2.out --std=c++11 -pthread -pg