代码拉取完成,页面将自动刷新
#
# Makefile
#
# Global Makefile for macchina.io
#
.PHONY: clean all clean_bundles install_sdk install_runtime install docs
PRODUCT ?= sdk
DESTDIR ?= /usr/local/macchina
INSTALLDIR ?= $(DESTDIR)
RUNTIME_LIBS = PocoFoundation PocoXML PocoJSON PocoUtil PocoZip PocoOSP PocoRemotingNG PocoGeo
MACCHINA_BASE = $(shell pwd)
POCO_BASE = $(MACCHINA_BASE)/platform
PROJECT_BASE = $(MACCHINA_BASE)
export MACCHINA_BASE
export POCO_BASE
export PROJECT_BASE
ifeq ($(PRODUCT),sdk)
INSTALL_TARGET = install_sdk
else ifeq ($(PRODUCT),runtime)
INSTALL_TARGET = install_runtime
MAKEARGS = DEFAULT_TARGET=shared_release
else
$(error Invalid PRODUCT specified: $(PRODUCT))
endif
POCO_HOST_OSNAME = $(shell uname)
POCO_HOST_OSARCH ?= $(subst /,-,$(shell uname -m | tr ' ' _))
ifeq ($(POCO_HOST_OSNAME),Darwin)
VLIBEXT = .*.dylib
LIBEXT = .dylib
else
VLIBEXT = .so.*
LIBEXT = .so
endif
#
# If POCO_CONFIG is not set, use the OS name as configuration name
#
ifndef POCO_CONFIG
POCO_CONFIG = $(POCO_HOST_OSNAME)
endif
#
# Include System Specific Settings
#
include $(POCO_BASE)/build/config/$(POCO_CONFIG)
#
# Determine operating system
#
ifndef POCO_TARGET_OSNAME
OSNAME := $(POCO_HOST_OSNAME)
else
OSNAME := $(POCO_TARGET_OSNAME)
endif
ifndef POCO_TARGET_OSARCH
OSARCH := $(subst /,-,$(shell uname -m | tr ' ' _))
else
OSARCH := $(POCO_TARGET_OSARCH)
endif
#
# Make Targets
#
# All macchina.io
clean all:
$(MAKE) -C platform $(MAKECMDGOALS) $(MAKEARGS)
$(MAKE) -C server $(MAKECMDGOALS) $(MAKEARGS)
$(MAKE) -C devices/Devices $(MAKECMDGOALS) $(MAKEARGS)
$(MAKE) -C devices/Serial $(MAKECMDGOALS) $(MAKEARGS)
$(MAKE) -C protocols $(MAKECMDGOALS) $(MAKEARGS)
$(MAKE) -C devices $(MAKECMDGOALS) $(MAKEARGS)
$(MAKE) -C services $(MAKECMDGOALS) $(MAKEARGS)
$(MAKE) -C webui $(MAKECMDGOALS) $(MAKEARGS)
$(MAKE) -C samples $(MAKECMDGOALS) $(MAKEARGS)
clean_bundles:
rm platform/OSP/bundles/*.bndl
rm */bundles/*.bndl
# Host tools only
hosttools:
$(MAKE) -C platform/Foundation
$(MAKE) -C platform/XML
$(MAKE) -C platform/JSON
$(MAKE) -C platform/Util
$(MAKE) -C platform/Net
$(MAKE) -C platform/Zip
$(MAKE) -C platform/OSP
$(MAKE) -C platform/OSP/BundleCreator
$(MAKE) -C platform/OSP/CodeCacheUtility
$(MAKE) -C platform/OSP/StripBundle
$(MAKE) -C platform/CppParser
$(MAKE) -C platform/CodeGeneration
$(MAKE) -C platform/RemotingNG
$(MAKE) -C platform/RemotingNG/RemoteGen
$(MAKE) -C platform/PageCompiler
$(MAKE) -C platform/PageCompiler/File2Page
install: $(INSTALL_TARGET)
install_sdk:
mkdir -p $(INSTALLDIR)
mkdir -p $(INSTALLDIR)/include
mkdir -p $(INSTALLDIR)/lib
mkdir -p $(INSTALLDIR)/lib/bundles
mkdir -p $(INSTALLDIR)/bin
mkdir -p $(INSTALLDIR)/etc
$(MAKE) -C platform install INSTALLDIR=$(INSTALLDIR)
cp -Rf devices/*/include/* $(INSTALLDIR)/include
cp -Rf protocols/*/include/* $(INSTALLDIR)/include
cp -Rf services/*/include/* $(INSTALLDIR)/include
find $(MACCHINA_BASE)/lib/$(OSNAME)/$(OSARCH) -name "libIoT*" -type f -exec cp -f {} $(INSTALLDIR)/lib \;
find $(MACCHINA_BASE)/lib/$(OSNAME)/$(OSARCH) -name "libIoT*" -type l -exec cp -Rf {} $(INSTALLDIR)/lib \;
find $(MACCHINA_BASE)/server/bin/$(OSNAME)/$(OSARCH) -perm -700 -type f -name 'macchina*' -exec cp -f {} $(INSTALLDIR)/bin \;
cp -f $(POCO_BASE)/OSP/bundles/*.bndl $(INSTALLDIR)/lib/bundles
cp -f $(MACCHINA_BASE)/*/bundles/*.bndl $(INSTALLDIR)/lib/bundles
rm -f $(INSTALLDIR)/bin/*$(LIBEXT)
cp $(MACCHINA_BASE)/server/macchina.properties.install $(INSTALLDIR)/etc/macchina.properties
cp $(MACCHINA_BASE)/server/rootcert.pem $(INSTALLDIR)/etc
cp $(MACCHINA_BASE)/server/macchina.pem $(INSTALLDIR)/etc
install_runtime:
mkdir -p $(INSTALLDIR)
mkdir -p $(INSTALLDIR)/lib
mkdir -p $(INSTALLDIR)/lib/bundles
mkdir -p $(INSTALLDIR)/bin
mkdir -p $(INSTALLDIR)/etc
find $(MACCHINA_BASE)/server/bin/$(OSNAME)/$(OSARCH) -perm -700 -type f -name macchina -exec cp -f {} $(INSTALLDIR)/bin \;
for lib in $(RUNTIME_LIBS) ; do \
find $(POCO_BASE)/lib/$(OSNAME)/$(OSARCH) -name "lib$$lib$(VLIBEXT)" -type f -exec cp -f {} $(INSTALLDIR)/lib \; ; \
done
cp -f $(POCO_BASE)/OSP/bundles/*.bndl $(INSTALLDIR)/lib/bundles
cp -f $(MACCHINA_BASE)/*/bundles/*.bndl $(INSTALLDIR)/lib/bundles
cp $(MACCHINA_BASE)/server/macchina.properties.install $(INSTALLDIR)/etc/macchina.properties
cp $(MACCHINA_BASE)/server/rootcert.pem $(INSTALLDIR)/etc
cp $(MACCHINA_BASE)/server/macchina.pem $(INSTALLDIR)/etc
docs: hosttools
$(MAKE) -C tools/PocoDoc
tools/PocoDoc/bin/$(POCO_HOST_OSNAME)/$(POCO_HOST_OSARCH)/PocoDoc --config=tools/PocoDoc/cfg/macchina.xml
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。