added install target

This commit is contained in:
tater 2018-07-14 06:04:33 -04:00
parent 794a0264e1
commit e2a8669b2a

View File

@ -2,6 +2,7 @@ PROG := a2m
SRC := a2m.c SRC := a2m.c
CC := cc CC := cc
CFLAGS += -g -std=c99 -Wall CFLAGS += -g -std=c99 -Wall
PREFIX ?= /usr/local
UNAME := $(shell sh -c 'uname -s 2>/dev/null') UNAME := $(shell sh -c 'uname -s 2>/dev/null')
@ -14,5 +15,11 @@ endif
default: default:
$(CC) $(CFLAGS) $(LDFLAGS) $(SRC) -o $(PROG) $(CC) $(CFLAGS) $(LDFLAGS) $(SRC) -o $(PROG)
.PHONY: install clean
install:
install -d 0755 $(PREFIX)/bin/
install -m 0755 $(PROG) $(PREFIX)/bin/$(PROG)
clean: clean:
rm -rf $(PROG) $(PROG).dSYM rm -rf $(PROG) $(PROG).dSYM