xref: /illumos-gate/usr/src/cmd/sgs/link_audit/Makefile (revision 33c72b7598992897b94815b1f47b7b8077e53808)
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# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22# Use is subject to license terms.
23#
24# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
25#
26
27include		../../../Makefile.master
28
29ROOTDEMODIRBASE=	$(ROOT)/usr/demo/link_audit
30
31DEMOFILES= \
32		00README \
33		Makefile \
34		man/perfcnt.man \
35		man/symbindrep.man \
36		man/dumpbind.man \
37		src/bindings.c \
38		src/bindings.h \
39		src/dumpbind.c \
40		src/env.c \
41		src/env.h \
42		src/hash.c \
43		src/hash.h \
44		src/sotruss.ksh \
45		src/mach.h \
46		src/perfcnt.c \
47		src/perfcnt.ksh \
48		src/symbindrep.c \
49		src/symbindrep.ksh \
50		src/truss.c \
51		src/who.c \
52		src/who.h \
53		src/whocalls.ksh
54
55ROOTDEMODIRS=	$(ROOTDEMODIRBASE) .WAIT \
56		$(ROOTDEMODIRBASE)/man \
57		$(ROOTDEMODIRBASE)/src
58
59ROOTDEMOFILES=	$(DEMOFILES:%=$(ROOTDEMODIRBASE)/%)
60
61$(ROOTDEMODIRS) :=	DIRMODE =	755
62
63
64
65SUBDIRS=	$(MACH)
66
67all:=		TARGET=	all
68install:=	TARGET=	install
69package:=	TARGET=	package
70clean:=		TARGET=	clean
71clobber:=	TARGET=	clobber
72
73.PARALLEL: $(ROOTDEMOFILES)
74
75.KEEP_STATE:
76
77all clean clobber: \
78	$(SUBDIRS)
79
80package install : \
81	$(ROOTDEMODIRS) .WAIT $(SUBDIRS) $(ROOTDEMOFILES)
82
83$(SUBDIRS):	FRC
84		@cd $@; pwd; $(MAKE) $(TARGET)
85		@if [ -d $(MACH64) ]; then                      \
86			cd $(MACH64); pwd; $(MAKE) $(TARGET);   \
87		else /bin/true; fi
88
89$(ROOTDEMODIRS):
90	$(INS.dir)
91
92$(ROOTDEMODIRBASE)/man/%: man/%
93	$(INS.file)
94
95$(ROOTDEMODIRBASE)/src/%: common/%
96	$(INS.file)
97
98$(ROOTDEMODIRBASE)/%: common/%
99	$(INS.file)
100
101$(ROOTDEMODIRBASE)/%: common/%.demo
102	$(INS.rename)
103
104FRC:
105