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