Skip to content

Commit

Permalink
Cross compile and README update
Browse files Browse the repository at this point in the history
  • Loading branch information
dhogborg committed Jul 17, 2015
1 parent bfcc7c7 commit 933483a
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ _testmain.go
*.prof

/gopow
/build
resources.go
29 changes: 25 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,42 @@
VERSION = $(shell git describe --always --dirty)
TIMESTAMP = $(shell git show -s --format=%ct)

default: build
default: build_darwin

setup:
go get -u github.com/jteeuwen/go-bindata/...

resources:
go-bindata -pkg resources -o internal/resources/resources.go resources/...

build: resources
go build -o ./gopow *.go
build_darwin: resources
GOOS=darwin GOARCH=amd64 go build -a -o ./build/gopow *.go
zip ./build/gopow_darwin64.zip ./build/gopow

build_linux: resources
GOOS=linux GOARCH=amd64 go build -a -o ./build/gopow *.go
zip ./build/gopow_linux64.zip ./build/gopow

build_arm5: resources
GOOS=linux GOARM=5 GOARCH=arm go build -a -o ./build/gopow *.go
zip ./build/gopow_linux_arm5.zip ./build/gopow

build_arm7: resources
GOOS=linux GOARM=7 GOARCH=arm go build -a -o ./build/gopow *.go
zip ./build/gopow_linux_arm7.zip ./build/gopow

build_win: resources
GOOS=windows GOARCH=amd64 go build -a -o ./build/gopow.exe *.go
zip ./build/gopow_win64.zip ./build/gopow.exe

all: build_darwin build_linux build_arm5 build_arm7 build_win
rm ./build/gopow
rm ./build/gopow.exe

lint:
golint .

clean:
rm -f gopow
rm -f build
rm -rf internal/resources

26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,28 @@
# rtl-gopow
Render tables from rtl_power to a nice heat map
Here is an render of rtl_power tool scanning 80-90 MHz during 2.5 hours moving in a car. ![80-90 MHz](http://i.imgur.com/knkzLXO.jpg).

# Availability
Since Go is easy to cross compile, this tool can be easily distributed as a binary without any dependencies. You'll find it under Releases here on github. The following platforms are avalible as a ready to run binary file:

* OS X (x64)
* Linux (x64)
* Linux (arm5)
* Linux (arm7)
* Windows (x64)

## Performance
A render of a 600 MB csv file takes about 2 minutes on a 2,4 GHz Intel Core i5. There is still lots of room for improvement on that though. Memory usage is quite horrid.

## Options
```
GLOBAL OPTIONS:
--input, -i CSV input file generated by rtl_power [required]
--output, -o Output file, default same as input file with new extension
--format, -f 'png' Output file format, default png [png,jpeg]
--verbose Enable more verbose output
--no-annotations Disabled annotations such as time and frequency scales
--help, -h show help
--version, -v print the version
```

0 comments on commit 933483a

Please sign in to comment.