Skip to content

Commit

Permalink
Add Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
specious committed Dec 20, 2017
1 parent d6c9f04 commit 39da6b0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
BIN ?= defaultbrowser
PREFIX ?= /usr/local

CC = gcc
CFLAGS = -O2

all:
gcc -o $(BIN) $(CFLAGS) -framework Foundation -framework ApplicationServices src/main.m

install:
cp $(BIN) $(PREFIX)/bin/

uninstall:
rm -f $(PREFIX)/bin/$(BIN)

clean:
rm -f $(BIN)
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ Install
Build it:

```
gcc -o defaultbrowser -O2 -framework Foundation -framework ApplicationServices src/main.m
make
```

Move it into your executable path:
Install it into your executable path:

```
cp defaultbrowser /usr/local/bin/
make install
```

Usage
Expand Down

0 comments on commit 39da6b0

Please sign in to comment.