| PWD := $(shell pwd) |
| DISCOVERY_BUILD_DIR=$(PWD)/out |
| |
| include ../shared/mojo.mk |
| |
| # NOTE(nlacasse): Running Go Mojo services requires passing the |
| # --enable-multiprocess flag to mojo_shell. This is because the Go runtime is |
| # very large, and can interfere with C++ memory if they are in the same |
| # process. |
| MOJO_SHELL_FLAGS += \ |
| --config-alias DISCOVERY_BUILD_DIR=$(DISCOVERY_BUILD_DIR) |
| |
| echo-go-path: |
| echo $(GOPATH) |
| |
| run-advertiser-service: $(DISCOVERY_BUILD_DIR)/driver.mojo $(DISCOVERY_BUILD_DIR)/ble.mojo |
| sudo $(MOJO_DIR)/src/mojo/devtools/common/mojo_run --config-file $(PWD)/mojoconfig $(MOJO_SHELL_FLAGS) --args-for="https://mojo.v.io/ble.mojo test" https://mojo.v.io/driver.mojo |
| |
| run-scanner-service: $(DISCOVERY_BUILD_DIR)/scanner.mojo $(DISCOVERY_BUILD_DIR)/ble.mojo |
| sudo $(MOJO_DIR)/src/mojo/devtools/common/mojo_run --config-file $(PWD)/mojoconfig $(MOJO_SHELL_FLAGS) --args-for="https://mojo.v.io/ble.mojo test" https://mojo.v.io/scanner.mojo |
| |
| all_mojom: go/src/mojom/v.io/x/ref/services/discovery/ble/mojo/ble.mojom.go go/src/mojom/v.io/x/ref/services/discovery/mojo/discovery.mojom.go |
| go/src/mojom/v.io/x/ref/services/discovery/ble/mojo/ble.mojom.go: mojom/v.io/x/ref/services/discovery/ble/ble.mojom |
| $(call MOJOM_GEN,$<,.,go) |
| go/src/mojom/v.io/x/ref/services/discovery/mojo/discovery.mojom.go: mojom/v.io/x/ref/services/discovery/discovery.mojom |
| $(call MOJOM_GEN,$<,.,go) |
| $(DISCOVERY_BUILD_DIR)/ble.mojo: go/src/mojom/v.io/x/ref/services/discovery/ble/ble/ble.mojom.go go/src/v.io/x/ref/services/discovery/ble/neighborhood.go go/src/v.io/x/ref/services/discovery/ble/service.go $(MOJO_SHARED_LIB) |
| $(call MOGO_BUILD,v.io/x/ref/services/discovery/ble,$@) |
| |
| $(DISCOVERY_BUILD_DIR)/driver.mojo: go/src/mojom/v.io/x/ref/services/discovery/ble/ble/ble.mojom.go go/src/v.io/x/ref/services/discovery/driver/driver.go $(MOJO_SHARED_LIB) |
| $(call MOGO_BUILD,v.io/x/ref/services/discovery/driver,$@) |
| $(DISCOVERY_BUILD_DIR)/scanner.mojo: go/src/mojom/v.io/x/ref/services/discovery/ble/ble/ble.mojom.go go/src/v.io/x/ref/services/discovery/scanner/scanner.go $(MOJO_SHARED_LIB) |
| $(call MOGO_BUILD,v.io/x/ref/services/discovery/scanner,$@) |
| |