xref: /illumos-gate/usr/src/cmd/tail/Makefile (revision 1e8d79d21400b4e47d64ce367181e7e5ce992649)
1209e49b2SChris Love#
2209e49b2SChris Love# This file and its contents are supplied under the terms of the
3209e49b2SChris Love# Common Development and Distribution License ("CDDL"), version 1.0.
4209e49b2SChris Love# You may only use this file in accordance with the terms version
5209e49b2SChris Love# 1.0 of the CDDL.
6209e49b2SChris Love#
7209e49b2SChris Love# A full copy of the text of the CDDL should have accompanied this
8209e49b2SChris Love# source.  A copy is of the CDDL is also available via the Internet
9209e49b2SChris Love# at http://www.illumos.org/license/CDDL.
10209e49b2SChris Love#
11209e49b2SChris Love
12209e49b2SChris Love#
13209e49b2SChris Love# Copyright 2010 Chris Love.  All rights reserved.
14*5661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc.
15209e49b2SChris Love#
16209e49b2SChris Love
17209e49b2SChris Love
18209e49b2SChris LovePROG=		tail
19209e49b2SChris LoveXPG4PROG=	$(PROG)
20209e49b2SChris Love
21209e49b2SChris LoveOBJS=		forward.o misc.o read.o reverse.o tail.o
22209e49b2SChris LoveSRCS=	 	$(OBJS:%.o=%.c)
23209e49b2SChris Love
24209e49b2SChris Loveinclude ../Makefile.cmd
25209e49b2SChris Love
26209e49b2SChris LoveCLOBBERFILES=	$(PROG)
27979bfc6bSRichard LoweCPPFLAGS +=        -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
28209e49b2SChris Love
29bd0ce624SYuri PankovCSTD=	$(CSTD_GNU99)
30209e49b2SChris Love
31*5661bb76SJohn LevonSMOFF += leaks
32*5661bb76SJohn Levon
33209e49b2SChris Love# install rules
34209e49b2SChris Love$(ROOTINC)/% : %
35209e49b2SChris Love	$(INS.file)
36209e49b2SChris Love
37209e49b2SChris Love.KEEP_STATE:
38209e49b2SChris Love
39209e49b2SChris Love.PARALLEL: $(OBJS)
40209e49b2SChris Love
41209e49b2SChris Loveall:		$(PROG)
42209e49b2SChris Love
43209e49b2SChris Love$(PROG):	$(OBJS)
44209e49b2SChris Love	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
45209e49b2SChris Love	$(POST_PROCESS)
46209e49b2SChris Love
47209e49b2SChris Loveinstall: all .WAIT $(ROOTPROG) $(ROOTXPG4PROG)
48209e49b2SChris Love
49209e49b2SChris Love$(ROOTXPG4PROG):
50209e49b2SChris Love	-$(RM) $@
51209e49b2SChris Love	-$(LN) -s ../../bin/$(PROG) $@
52209e49b2SChris Love
53209e49b2SChris Loveclean:
54209e49b2SChris Love	$(RM) $(OBJS)
55209e49b2SChris Love
56209e49b2SChris Loveinclude ../Makefile.targ
57