include $(BASE)/common.mk
-all: tree parser compiler rmi runtime installer
+all: mkdir tree parser compiler rmi runtime installer
infra: runtime installer
+PHONY += mkdir
+mkdir:
+ [ -d ../bin ] || mkdir ../bin
+
# Parser compilation and run
PHONY += tree
tree:
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:
$(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/
+ [ -d $(BIN_DIR)/iotruntime/log ] || mkdir $(BIN_DIR)/iotruntime/log
PHONY += doc
doc: runtime installer rmi compiler