xref: /illumos-gate/usr/src/cmd/ptools/Makefile (revision 0ba72251)
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
5c6402783Sakolb# Common Development and Distribution License (the "License").
6c6402783Sakolb# 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#
21c6402783Sakolb
227c478bd9Sstevel@tonic-gate#
23186f7fbfSEdward Pilatowicz# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate# Use is subject to license terms.
257c478bd9Sstevel@tonic-gate#
26c6402783Sakolb
277c478bd9Sstevel@tonic-gate
287c478bd9Sstevel@tonic-gateinclude ../Makefile.cmd
297c478bd9Sstevel@tonic-gate
307c478bd9Sstevel@tonic-gate#
317c478bd9Sstevel@tonic-gate# Don't add new ptools here; these are legacy ptools which must be symlinked
327c478bd9Sstevel@tonic-gate# into /usr/proc/bin
337c478bd9Sstevel@tonic-gate#
347c478bd9Sstevel@tonic-gateLEGACY_SUBDIRS =\
357c478bd9Sstevel@tonic-gate	pcred	\
367c478bd9Sstevel@tonic-gate	pfiles	\
377c478bd9Sstevel@tonic-gate	pflags	\
387c478bd9Sstevel@tonic-gate	pldd	\
397c478bd9Sstevel@tonic-gate	pmap	\
407c478bd9Sstevel@tonic-gate	prun	\
417c478bd9Sstevel@tonic-gate	psig	\
427c478bd9Sstevel@tonic-gate	pstack	\
437c478bd9Sstevel@tonic-gate	pstop	\
447c478bd9Sstevel@tonic-gate	ptime	\
457c478bd9Sstevel@tonic-gate	ptree	\
467c478bd9Sstevel@tonic-gate	pwait	\
477c478bd9Sstevel@tonic-gate	pwdx
487c478bd9Sstevel@tonic-gate
497c478bd9Sstevel@tonic-gate#
507c478bd9Sstevel@tonic-gate# 'new' ptools are not symlinked into /usr/proc/bin
517c478bd9Sstevel@tonic-gate#
527c478bd9Sstevel@tonic-gateNEW_SUBDIRS =	\
537c478bd9Sstevel@tonic-gate	pargs	\
54c6402783Sakolb	plgrp	\
55c6402783Sakolb	pmadvise \
567c478bd9Sstevel@tonic-gate	ppriv	\
57d2a70789SRichard Lowe	preap	\
58d2a70789SRichard Lowe	psecflags
597c478bd9Sstevel@tonic-gate
607c478bd9Sstevel@tonic-gateSUBDIRS = $(LEGACY_SUBDIRS) $(NEW_SUBDIRS)
617c478bd9Sstevel@tonic-gate
627c478bd9Sstevel@tonic-gateall	:=	TARGET = all
637c478bd9Sstevel@tonic-gateinstall	:=	TARGET = install
647c478bd9Sstevel@tonic-gateclean	:=	TARGET = clean
657c478bd9Sstevel@tonic-gateclobber	:=	TARGET = clobber
66c6402783Sakolb_msg	:=	TARGET = _msg
67c6402783Sakolb
68186f7fbfSEdward Pilatowicz
69186f7fbfSEdward Pilatowicz# pmadvise depends on pmap components
70186f7fbfSEdward PilatowiczPMAP =			$(SRC)/cmd/ptools/pmap
71186f7fbfSEdward Pilatowiczpmadvise/pmadvise.po :=	CPPFLAGS +=	-I$(PMAP)
72186f7fbfSEdward Pilatowicz
73c6402783Sakolb#
74c6402783Sakolb# Commands with messages support
75c6402783Sakolb#
76d2a70789SRichard LowePOFILES = plgrp/plgrp.po pmadvise/pmadvise.po psecflags/psecflags.po
77c6402783SakolbPOFILE = ptools.po
787c478bd9Sstevel@tonic-gate
797c478bd9Sstevel@tonic-gate.KEEP_STATE:
807c478bd9Sstevel@tonic-gate
817c478bd9Sstevel@tonic-gate.PARALLEL: $(SUBDIRS)
827c478bd9Sstevel@tonic-gate
83*0ba72251SRichard Loweall install clean: $(SUBDIRS)
84*0ba72251SRichard Loweclobber: $(SUBDIRS)
857c478bd9Sstevel@tonic-gate
867c478bd9Sstevel@tonic-gate$(NEW_SUBDIRS): FRC
877c478bd9Sstevel@tonic-gate	@cd $@; pwd; $(MAKE) PTOOL_TYPE=NEW -f ../Makefile.ptool $(TARGET)
887c478bd9Sstevel@tonic-gate
897c478bd9Sstevel@tonic-gate$(LEGACY_SUBDIRS): FRC
907c478bd9Sstevel@tonic-gate	@cd $@; pwd; $(MAKE) PTOOL_TYPE=LEGACY -f ../Makefile.ptool $(TARGET)
91c6402783Sakolb
92c6402783Sakolb#
93c6402783Sakolb# Combine all messages files into a single file and copy it to
94c6402783Sakolb# MSGDOMAIN directory
95c6402783Sakolb#
963a51e5c0SRichard Lowe_msg: $(MSGDOMAIN) $(POFILES)
97c6402783Sakolb	$(RM) $(POFILE)
98c6402783Sakolb	$(CAT) $(POFILES) > $(POFILE)
99c6402783Sakolb	$(RM)  $(MSGDOMAIN)/$(POFILE)
100c6402783Sakolb	$(CP) $(POFILE) $(MSGDOMAIN)
101c6402783Sakolb
1027c478bd9Sstevel@tonic-gateFRC:
1033a51e5c0SRichard Lowe
1043a51e5c0SRichard Loweinclude $(SRC)/Makefile.msg.targ
105