xref: /illumos-gate/usr/src/cmd/tail/Makefile (revision 0153d828c132fdb1a17c11b99386a3d1b87994cf)
1#
2# This file and its contents are supplied under the terms of the
3# Common Development and Distribution License ("CDDL"), version 1.0.
4# You may only use this file in accordance with the terms version
5# 1.0 of the CDDL.
6#
7# A full copy of the text of the CDDL should have accompanied this
8# source.  A copy is of the CDDL is also available via the Internet
9# at http://www.illumos.org/license/CDDL.
10#
11
12#
13# Copyright 2010 Chris Love.  All rights reserved.
14# Copyright (c) 2018, Joyent, Inc.
15#
16
17
18PROG=		tail
19XPG4PROG=	$(PROG)
20
21OBJS=		forward.o misc.o read.o reverse.o tail.o
22SRCS=	 	$(OBJS:%.o=%.c)
23
24include ../Makefile.cmd
25
26CLOBBERFILES=	$(PROG)
27CPPFLAGS +=        -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
28
29CSTD=	$(CSTD_GNU99)
30
31SMOFF += leaks
32
33# install rules
34$(ROOTINC)/% : %
35	$(INS.file)
36
37.KEEP_STATE:
38
39.PARALLEL: $(OBJS)
40
41all:		$(PROG)
42
43$(PROG):	$(OBJS)
44	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
45	$(POST_PROCESS)
46
47install: all .WAIT $(ROOTPROG) $(ROOTXPG4PROG)
48
49$(ROOTXPG4PROG):
50	-$(RM) $@
51	-$(LN) -s ../../bin/$(PROG) $@
52
53clean:
54	$(RM) $(OBJS)
55
56include ../Makefile.targ
57