Skip to content

Commit

Permalink
Add Makefile for building from CLI
Browse files Browse the repository at this point in the history
- This is a really basic Makefile to build from command line to make it easy for
  folks who just want to build and run
- Update README
- In ref to #21
  • Loading branch information
beltex committed Jan 15, 2015
1 parent e49b86e commit de97e8d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
build: clean
xcodebuild clean build
mkdir bin/
mv build/Release/dshb bin/
clean:
rm -rf bin build
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,33 @@ An OS X system monitor in Swift, inspired by

Make sure to use the recursive option on clone to auto init all submodules.

```bash
```sh
git clone --recursive https://github.com/beltex/dshb
```

Incase you have already cloned the repository.

```bash
```sh
# Inside the project directory
git submodule update --init --recursive
```


### Build

Besides building from inside of Xcode, you can compile dshb from the command
line like so

```sh
make
```

The resulting binary will be found inside the `bin/` directory. If you copy it
to either `/usr/bin/` (requires `sudo`) or `/usr/local/bin/` (assuming it's in
your `PATH` - Homebrew would have done this for you), you can then run `dshb`
from anywhere.


### Stack

- [ncurses](https://www.gnu.org/software/ncurses/ncurses.html)
Expand Down
4 changes: 4 additions & 0 deletions dshb/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,14 @@ draw_all()
//------------------------------------------------------------------------------

// TODO: Custom serial attr prop creation is new to 10.10
// dispatch_queue_attr_make_with_qos_class(DISPATCH_QUEUE_SERIAL,
// QOS_CLASS_USER_INITIATED, 0)

let source = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0,
dispatch_queue_create("com.beltex.dshb",
DISPATCH_QUEUE_SERIAL))

// TODO: What about dispatch_after?
dispatch_source_set_timer(source,
dispatch_time(DISPATCH_TIME_NOW, 0),
FREQ * NSEC_PER_SEC, 0)
Expand Down

0 comments on commit de97e8d

Please sign in to comment.