APP_NAME = gmplugin_hello GAJUMARU_LIB = lib/gajumaru BUILD_DIR = $(GAJUMARU_LIB)/_build/prod/rel/gajumaru TARGET_NETWORK = localnet # steps are # 1. call rebar3 gm_plugin to build the plugin # 2. build the node # 3. start the node with a configuration where it knows it needs to load our plugin # 4. run a shell in the node context all: compile init: submodules submodules: git submodule init git submodule update compile: rebar3 compile build-my-plugin: compile rebar3 gm_plugin # adapted from gmp_ix build-gm-with-my-plugin: build-my-plugin cp _build/default/$(APP_NAME).ez $(GAJUMARU_LIB)/plugins cd $(GAJUMARU_LIB) && make prod-build cp -rvf gmconfig/$(TARGET_NETWORK)/gajumaru/* $(BUILD_DIR) fresh-console: build-gm-with-my-plugin console console: $(BUILD_DIR)/bin/gajumaru console clean: rebar3 clean cd $(GAJUMARU_LIB) && make prod-clean rm -f $(GAJUMARU_LIB)/plugins/$(APP_NAME).ez