<commit_before>.DEFAULT_GOAL := help

##
## Global ENV vars
##

GIT_SHA ?= $(shell git rev-parse --short=8 HEAD)
GIT_TAG ?= $(shell git describe --tags --abbrev=0)

##
## Helpful Help
##

.PHONY: help
help:
	@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'


##
## Building
##

.PHONY: ios_framework
ios_framework: ## Build iOS Framework for mobile
	gomobile bind -target=ios github.com/OpenBazaar/openbazaar-go/mobile

.PHONY: android_framework
android_framework: ## Build Android Framework for mobile
	gomobile bind -target=android github.com/OpenBazaar/openbazaar-go/mobile

##
## Protobuf compilation
##
P_TIMESTAMP = Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp
P_ANY = Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any

PKGMAP = $(P_TIMESTAMP),$(P_ANY)

.PHONY: protos
protos: ## Build go files for proto definitions
	cd pb/protos && PATH=$(PATH):$(GOPATH)/bin protoc --go_out=$(PKGMAP):.. *.proto


##
## Testing
##
OPENBAZAARD_NAME ?= openbazaard-$(GIT_SHA)
BITCOIND_PATH ?= .

.PHONY: openbazaard
openbazaard: ## Build daemon<commit_msg>Fix: Remove debugging symbols from gomobile build instructions<commit_after>.DEFAULT_GOAL := help

##
## Global ENV vars
##

GIT_SHA ?= $(shell git rev-parse --short=8 HEAD)
GIT_TAG ?= $(shell git describe --tags --abbrev=0)

##
## Helpful Help
##

.PHONY: help
help:
	@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'


##
## Building
##

.PHONY: ios_framework
ios_framework: ## Build iOS Framework for mobile
	gomobile bind -target=ios -ldflags="-s -w" github.com/OpenBazaar/openbazaar-go/mobile

.PHONY: android_framework
android_framework: ## Build Android Framework for mobile
	gomobile bind -target=android github.com/OpenBazaar/openbazaar-go/mobile

##
## Protobuf compilation
##
P_TIMESTAMP = Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp
P_ANY = Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any

PKGMAP = $(P_TIMESTAMP),$(P_ANY)

.PHONY: protos
protos: ## Build go files for proto definitions
	cd pb/protos && PATH=$(PATH):$(GOPATH)/bin protoc --go_out=$(PKGMAP):.. *.proto


##
## Testing
##
OPENBAZAARD_NAME ?= openbazaard-$(GIT_SHA)
BITCOIND_PATH ?= .

.PHONY: openbazaard
openbazaard: ## Build daemon
{'fraction_non_alphanumeric': 0.1757201646090535, 'fraction_numerical': 0.012345679012345678, 'mean_word_length': 4.747044917257683, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2152186', 'n_tokens_mistral': 978, 'n_tokens_neox': 926, 'n_words': 192}