xref: /illumos-gate/usr/src/cmd/cpc/cputrack/Makefile (revision 12fb9219923f41528f673d4f31667db2c3f103ff)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5*12fb9219SRichard Lowe# Common Development and Distribution License (the "License").
6*12fb9219SRichard Lowe# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
21*12fb9219SRichard Lowe
227c478bd9Sstevel@tonic-gate#
23*12fb9219SRichard Lowe# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate# Use is subject to license terms.
257c478bd9Sstevel@tonic-gate#
26*12fb9219SRichard Lowe# Copyright (c) 2018, Joyent, Inc.
277c478bd9Sstevel@tonic-gate#
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gateinclude	../../Makefile.cmd
30*12fb9219SRichard Loweinclude	../../Makefile.cmd.64
31*12fb9219SRichard Loweinclude	../../Makefile.ctf
327c478bd9Sstevel@tonic-gate
33*12fb9219SRichard LowePROG =		cputrack
34*12fb9219SRichard LoweOBJS =		$(PROG).o caps.o time.o setgrp.o strtoset.o
35*12fb9219SRichard LoweLDLIBS +=	-lcpc -lpctx
367c478bd9Sstevel@tonic-gate
37*12fb9219SRichard LoweCFLAGS +=	$(CCVERBOSE)
38*12fb9219SRichard LoweCPPFLAGS +=	-I$(SRC)/lib/libcpc/common
39*12fb9219SRichard Lowe
40*12fb9219SRichard LowePOFILES =	../common/$(PROG).po ../common/caps.po
41*12fb9219SRichard LowePOFILE =	$(PROG)_cmd.po
42*12fb9219SRichard Lowe
43*12fb9219SRichard Lowe# not linted
44*12fb9219SRichard LoweSMATCH=off
45*12fb9219SRichard Lowe
46*12fb9219SRichard LoweROOTLINK = $(PROG:%=$(ROOTBIN64)/%)
477c478bd9Sstevel@tonic-gate
487c478bd9Sstevel@tonic-gate.KEEP_STATE:
497c478bd9Sstevel@tonic-gate
50*12fb9219SRichard Loweall: $(PROG)
517c478bd9Sstevel@tonic-gate
52*12fb9219SRichard Loweinstall: all $(ROOTPROG) $(ROOTLINK)
537c478bd9Sstevel@tonic-gate
54*12fb9219SRichard Lowe$(PROG): $(OBJS)
55*12fb9219SRichard Lowe	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
56*12fb9219SRichard Lowe	$(POST_PROCESS)
577c478bd9Sstevel@tonic-gate
58*12fb9219SRichard Lowe$(ROOTLINK):
59*12fb9219SRichard Lowe	$(RM) $@; $(SYMLINK) ../../bin/cputrack $@
60*12fb9219SRichard Lowe
61*12fb9219SRichard Loweclean:
62*12fb9219SRichard Lowe	$(RM) $(OBJS)
63*12fb9219SRichard Lowe
64*12fb9219SRichard Lowe%.o:	../common/%.c
65*12fb9219SRichard Lowe	$(COMPILE.c) $<
66*12fb9219SRichard Lowe	$(CTFCONVERT_O)
677c478bd9Sstevel@tonic-gate
687c478bd9Sstevel@tonic-gate$(POFILE): $(POFILES)
697c478bd9Sstevel@tonic-gate	$(RM) $@
707c478bd9Sstevel@tonic-gate	cat $(POFILES) > $@
717c478bd9Sstevel@tonic-gate
727c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ
73