Skip to content

Commit

Permalink
Merge pull request #17 from i0ntempest/master
Browse files Browse the repository at this point in the history
Makefile rewrite
  • Loading branch information
kerma authored Jul 23, 2020
2 parents dba87e7 + 845043f commit d2860c0
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@ BIN ?= defaultbrowser
PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin

CC = gcc
CFLAGS = -O2
CC ?= gcc
CFLAGS ?= -O2

.PHONY: all install uninstall clean

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

install: all
install -d $(BINDIR)
install -m 755 $(BIN) $(BINDIR)
$(BIN):
$(CC) -o $(BIN) $(CFLAGS) -framework Foundation -framework ApplicationServices src/main.m

install: $(BIN)
install -d $(DESTDIR)$(BINDIR)
install -m 755 $(BIN) $(DESTDIR)$(BINDIR)

uninstall:
rm -f $(BINDIR)/$(BIN)
rm -f $(DESTDIR)$(BINDIR)/$(BIN)

clean:
rm -f $(BIN)
rm -f $(BIN)

0 comments on commit d2860c0

Please sign in to comment.