<commit_before>GOM=gom
.PHONY: all clean

all: wb-mqtt-smartbus
clean:

prepare:
	go get -u github.com/mattn/gom
	PATH=$(HOME)/progs/go/bin:$(PATH) GOARM=5 GOARCH=arm GOOS=linux \
	  CC_FOR_TARGET=arm-linux-gnueabi-gcc CGO_ENABLED=1 $(GOM) install

clean:
	rm -f wb-mqtt-smartbus

wb-mqtt-smartbus: smartbus_driver.go smartbus/*.go
	PATH=$(HOME)/progs/go/bin:$(PATH) GOARM=5 GOARCH=arm GOOS=linux \
	  CC_FOR_TARGET=arm-linux-gnueabi-gcc CGO_ENABLED=1 $(GOM) build

install:
	mkdir -p $(DESTDIR)/usr/bin/ $(DESTDIR)/etc/init.d/
	install -m 0755 wb-mqtt-smartbus $(DESTDIR)/usr/bin/
	install -m 0755  initscripts/wb-mqtt-smartbus $(DESTDIR)/etc/init.d/wb-mqtt-smartbus<commit_msg>Allow building for i386 and amd64 in Makefile<commit_after>GOM=gom
.PHONY: all prepare clean

GOPATH := $(HOME)/go
PATH := $(HOME)/progs/go/bin:$(GOPATH)/bin:$(PATH)

DEB_TARGET_ARCH ?= armel

ifeq ($(DEB_TARGET_ARCH),armel)
GO_ENV := GOARCH=arm GOARM=5 CC_FOR_TARGET=arm-linux-gnueabi-gcc CGO_ENABLED=1
endif
ifeq ($(DEB_TARGET_ARCH),amd64)
GO_ENV := GOARCH=amd64 CC=x86_64-linux-gnu-gcc
endif
ifeq ($(DEB_TARGET_ARCH),i386)
GO_ENV := GOARCH=386 CC=i586-linux-gnu-gcc
endif

all: wb-mqtt-smartbus

prepare:
	go get -u github.com/mattn/gom

clean:
	rm -f wb-mqtt-smartbus

wb-mqtt-smartbus: smartbus_driver.go smartbus/*.go
	$(GO_ENV) $(GOM) install
	$(GO_ENV) $(GOM) build

install:
	mkdir -p $(DESTDIR)/usr/bin/ $(DESTDIR)/etc/init.d/
	install -m 0755 wb-mqtt-smartbus $(DESTDIR)/usr/bin/
	install -m 0755  initscripts/wb-mqtt-smartbus $(DESTDIR)/etc/init.d/wb-mqtt-smartbus
{'fraction_non_alphanumeric': 0.16012861736334405, 'fraction_numerical': 0.02829581993569132, 'mean_word_length': 4.74169741697417, 'pattern_counts': {'":': 0, '<': 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': '6210100', 'n_tokens_mistral': 718, 'n_tokens_neox': 688, 'n_words': 122}