mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-22 09:58:06 +00:00
- Rename hack/ to tools/ for formal naming - Update plugin development and deployment script references - Remove obsolete DESIGN/MILESTONE/PLAN docs now superseded by docs/ - Remove abandoned internal/onebot implementation - Ignore stray local qq binary artifact
22 lines
644 B
Cheetah
22 lines
644 B
Cheetah
# Build external Go plugin for HomeAgent
|
|
# Usage: make # build plugin.so
|
|
# make clean # remove plugin.so
|
|
# make package # build + create .hmap package
|
|
|
|
PLUGIN_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
|
PROJECT_ROOT := $(realpath $(PLUGIN_DIR)../..)
|
|
PLUGIN_NAME := $(notdir $(realpath $(PLUGIN_DIR)))
|
|
|
|
.PHONY: all clean package
|
|
|
|
all: plugin.so
|
|
|
|
plugin.so:
|
|
cd $(PROJECT_ROOT) && go build -buildmode=plugin -o $(PLUGIN_DIR)plugin.so $(PLUGIN_DIR)
|
|
|
|
clean:
|
|
rm -f $(PLUGIN_DIR)plugin.so $(PLUGIN_DIR)$(PLUGIN_NAME).hmap
|
|
|
|
package: plugin.so
|
|
cd $(PLUGIN_DIR) && zip -r $(PLUGIN_NAME).hmap plugin.json plugin.so
|