Adjusting Makefiles and config files for a master RaspberryPi
[iot2.git] / iotjava / Makefile
index c3d55c473cad22d4ea3c58a1eefa2880f3aedd56..83ba1ba24a81244e8b41463eae568054d150b8bc 100644 (file)
@@ -2,10 +2,14 @@ BASE := ..
 
 include $(BASE)/common.mk
 
 
 include $(BASE)/common.mk
 
-all: tree parser compiler rmi runtime installer
+all: mkdir tree parser compiler rmi runtime installer
 
 infra: runtime installer
 
 
 infra: runtime installer
 
+PHONY += mkdir
+mkdir:
+       [ -d ../bin ] || mkdir ../bin
+
 # Parser compilation and run
 PHONY += tree
 tree:
 # Parser compilation and run
 PHONY += tree
 tree:
@@ -133,6 +137,12 @@ run-compiler-smart:
        cp ../localconfig/iotpolicy/SmartthingsSensor/*.req $(BIN_DIR)/iotpolicy/
        cd $(BIN_DIR)/iotpolicy; $(JAVA) -cp .:..:../$(PARSERJARS):../$(BIN_DIR) iotpolicy.IoTCompiler smartthingssensor.pol smartthingssensor.req smartthingssensorcallback.pol smartthingssensorcallback.req -java Java
 
        cp ../localconfig/iotpolicy/SmartthingsSensor/*.req $(BIN_DIR)/iotpolicy/
        cd $(BIN_DIR)/iotpolicy; $(JAVA) -cp .:..:../$(PARSERJARS):../$(BIN_DIR) iotpolicy.IoTCompiler smartthingssensor.pol smartthingssensor.req smartthingssensorcallback.pol smartthingssensorcallback.req -java Java
 
+PHONY += run-compiler-actuate
+run-compiler-actuate:
+       cp ../localconfig/iotpolicy/SmartthingsActuator/*.pol $(BIN_DIR)/iotpolicy/
+       cp ../localconfig/iotpolicy/SmartthingsActuator/*.req $(BIN_DIR)/iotpolicy/
+       cd $(BIN_DIR)/iotpolicy; $(JAVA) -cp .:..:../$(PARSERJARS):../$(BIN_DIR) iotpolicy.IoTCompiler smartthingsactuator.pol smartthingsactuator.req smartthingsactuatorcallback.pol smartthingsactuatorcallback.req -java Java
+
 # TODO: Can remove this later - just to test-compile the resulted files from the compiler
 PHONY += compile
 compile:
 # TODO: Can remove this later - just to test-compile the resulted files from the compiler
 PHONY += compile
 compile:
@@ -227,9 +237,10 @@ runtime:
        $(JAVAC) -classpath .:$(RUNTIMEJARS):$(PHONEJARS):$(ZIPJARS) iotruntime/*.java iotruntime/master/*.java iotruntime/slave/*.java iotruntime/messages/*.java iotruntime/stub/*.java iotruntime/zigbee/*.java -d $(BIN_DIR)
        cp ../localconfig/iotruntime/IoTMaster.config $(BIN_DIR)/iotruntime/
        cp ../localconfig/iotruntime/IoTSlave.config $(BIN_DIR)/iotruntime/
        $(JAVAC) -classpath .:$(RUNTIMEJARS):$(PHONEJARS):$(ZIPJARS) iotruntime/*.java iotruntime/master/*.java iotruntime/slave/*.java iotruntime/messages/*.java iotruntime/stub/*.java iotruntime/zigbee/*.java -d $(BIN_DIR)
        cp ../localconfig/iotruntime/IoTMaster.config $(BIN_DIR)/iotruntime/
        cp ../localconfig/iotruntime/IoTSlave.config $(BIN_DIR)/iotruntime/
-       cp ../others/sslkey/*.jks $(BIN_DIR)/iotruntime/
+       cp ../localconfig/iotruntime/*.bash $(BIN_DIR)/iotruntime/
        cp -r ../localconfig/mysql $(BIN_DIR)/iotruntime/
        cp -r ../localconfig/tomoyo $(BIN_DIR)/iotruntime/
        cp -r ../localconfig/mysql $(BIN_DIR)/iotruntime/
        cp -r ../localconfig/tomoyo $(BIN_DIR)/iotruntime/
+       [ -d $(BIN_DIR)/iotruntime/log ] || mkdir $(BIN_DIR)/iotruntime/log
 
 PHONY += doc
 doc: runtime installer rmi compiler
 
 PHONY += doc
 doc: runtime installer rmi compiler