makefile: add install target.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
master
Miroslav Lichvar 2012-11-05 17:13:28 +01:00 committed by Richard Cochran
parent 23ebe82816
commit 022f203b11
1 changed files with 10 additions and 0 deletions

View File

@ -37,6 +37,11 @@ DEPEND = $(OBJECTS:.o=.d)
srcdir := $(dir $(lastword $(MAKEFILE_LIST)))
VPATH = $(srcdir)
prefix = /usr/local
sbindir = $(prefix)/sbin
mandir = $(prefix)/man
man8dir = $(mandir)/man8
all: $(PRG)
ptp4l: $(OBJ)
@ -47,6 +52,11 @@ phc2sys: phc2sys.o sk.o print.o
hwstamp_ctl: hwstamp_ctl.o
install: $(PRG)
mkdir -p $(sbindir) $(man8dir)
install $(PRG) $(sbindir)
install -p -m 644 -t $(man8dir) $(PRG:%=%.8)
clean:
rm -f $(OBJECTS) $(DEPEND)