xref: /illumos-gate/usr/src/cmd/sgs/link_audit/Makefile (revision 275c9da86e89f8abf71135cf63d9fc23671b2e60)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22#ident	"%Z%%M%	%I%	%E% SMI"
23#
24# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27
28include		../../../Makefile.master
29
30ROOTDEMODIRBASE=	$(ROOT)/usr/demo/link_audit
31
32DEMOFILES= \
33		00README \
34		Makefile \
35		man/perfcnt.man \
36		man/symbindrep.man \
37		man/dumpbind.man \
38		src/bindings.c \
39		src/bindings.h \
40		src/dumpbind.c \
41		src/env.c \
42		src/env.h \
43		src/hash.c \
44		src/hash.h \
45		src/sotruss.ksh \
46		src/mach.h \
47		src/perfcnt.c \
48		src/perfcnt.ksh \
49		src/symbindrep.c \
50		src/symbindrep.ksh \
51		src/truss.c \
52		src/who.c \
53		src/who.h \
54		src/whocalls.ksh
55
56ROOTDEMODIRS=	$(ROOTDEMODIRBASE) .WAIT \
57		$(ROOTDEMODIRBASE)/man \
58		$(ROOTDEMODIRBASE)/src
59
60ROOTDEMOFILES=	$(DEMOFILES:%=$(ROOTDEMODIRBASE)/%)
61
62$(ROOTDEMODIRS) :=	OWNER =		root
63$(ROOTDEMODIRS) :=	GROUP =		bin
64$(ROOTDEMODIRS) :=	DIRMODE =	755
65
66
67
68SUBDIRS=	$(MACH)
69
70all:=		TARGET=	all
71install:=	TARGET=	install
72package:=	TARGET=	package
73clean:=		TARGET=	clean
74clobber:=	TARGET=	clobber
75lint:=		TARGET=	lint
76
77.PARALLEL: $(ROOTDEMOFILES)
78
79.KEEP_STATE:
80
81all clean clobber lint : \
82	$(SUBDIRS)
83
84package install : \
85	$(ROOTDEMODIRS) .WAIT $(SUBDIRS) $(ROOTDEMOFILES)
86
87$(SUBDIRS):	FRC
88		@cd $@; pwd; $(MAKE) $(TARGET)
89		@if [ -d $(MACH64) ]; then                      \
90			cd $(MACH64); pwd; $(MAKE) $(TARGET);   \
91		else /bin/true; fi
92
93$(ROOTDEMODIRS):
94	$(INS.dir)
95
96$(ROOTDEMODIRBASE)/man/%: man/%
97	$(INS.file)
98
99$(ROOTDEMODIRBASE)/src/%: common/%
100	$(INS.file)
101
102$(ROOTDEMODIRBASE)/%: common/%
103	$(INS.file)
104
105$(ROOTDEMODIRBASE)/%: common/%.demo
106	$(INS.rename)
107
108FRC:
109