Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel W. Crompton committed Oct 18, 2018
1 parent 00157f1 commit 01b7a80
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
modbustcp
modbustcp*
*.sw*
#
# Binaries for programs and plugins
Expand All @@ -15,4 +15,3 @@ modbustcp
*.out
modbus-demo-*.tar.bz2
modbus-demo-*
modbustcp
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@

PROGNAME="modbus-demo"
OS := "$(shell uname -s)"
TOOL="modbustcp"
OS := $(shell uname -s)

all: windows linux darwin
ifeq ($(OS),Darwin)
BINARY="ln -sf ${PROGNAME}-darwin ${PROGNAME}"
else
ifeq ($(OS),Linux)
BINARY="ln -sf ${PROGNAME}-linux ${PROGNAME}"
ln -sf ${TOOL}-darwin ${TOOL}
endif
ifeq ($(OS),Linux)
ln -sf ${TOOL}-linux ${TOOL}
endif

release: all git-tag
mkdir ${PROGNAME}-`cat VERSION`
cp modbustcp modbustcpd LICENSE README.md ${PROGNAME}-`cat VERSION`
cp ${TOOL} ${TOOL}d LICENSE README.md ${PROGNAME}-`cat VERSION`
tar jcf ${PROGNAME}-`cat VERSION`.tar.bz2 ${PROGNAME}-`cat VERSION`
rm -rf ${PROGNAME}-`cat VERSION`

Expand All @@ -33,10 +33,10 @@ upload:
scp ${PROGNAME}-`cat VERSION`.tar.bz2 oplerno:/var/lib/lxd/containers/ateps-updates/rootfs/var/www/portage/distfiles/

windows:
GOOS=windows GOARCH=386 go build
GOOS=windows GOARCH=386 go build -o ${TOOL}.exe

linux:
GOOS=linux GOARCH=amd64 go build -o ${PROGNAME}-linux
GOOS=linux GOARCH=amd64 go build -o ${TOOL}-linux

darwin:
GOOS=darwin GOARCH=amd64 go build -o ${PROGNAME}-darwin
GOOS=darwin GOARCH=amd64 go build -o ${TOOL}-darwin

0 comments on commit 01b7a80

Please sign in to comment.