From 022f203b117fc55dce41575ec7026199199f9bb8 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Mon, 5 Nov 2012 17:13:28 +0100 Subject: [PATCH] makefile: add install target. Signed-off-by: Miroslav Lichvar --- makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/makefile b/makefile index 0ddc6fb..43a58b3 100644 --- a/makefile +++ b/makefile @@ -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)