xref: /illumos-gate/usr/src/cmd/netadm/Makefile (revision b7d3956b92a285d8dac2c7f5f7e28d2ef5347ef8)
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 2007 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27
28PROG= _sactab _pmtab _sysconfig iu.ap ttydefs
29
30SRCS= $(PROG:%=%.sh)
31
32include ../Makefile.cmd
33
34SUBDIRS= etc
35
36DEFPM=   zsmon
37
38ETCSAFD= $(ROOTETC)/saf
39ETCPMD=  $(ETCSAFD)/$(DEFPM)
40VARPMD=  $(ROOT)/var/saf/$(DEFPM)
41
42# Don't re-install /etc/saf which is installed by Targetdirs
43#DIRS= $(ETCSAFD) $(ETCPMD) $(VARPMD)
44DIRS= $(ETCPMD) $(VARPMD)
45
46ETCSAF= _sactab _sysconfig
47ETCF=   ttydefs iu.ap
48ETCPM=  _pmtab
49PMLOG=  log
50
51ROOTETCSAF= $(ETCSAF:%=$(ETCSAFD)/%)
52ROOTETCF= $(ETCF:%=$(ROOTETC)/%)
53ROOTETCPM = $(ETCPM:%=$(ETCPMD)/%)
54ROOTVARPM = $(PMLOG:%=$(VARPMD)/%)
55
56FILEMODE= 0644
57OWNER= root
58GROUP= sys
59
60$(ETCSAFD)/% : %
61	$(INS.file)
62
63$(VARPMD)/% : %
64	$(INS.file)
65
66$(ETCPMD)/% : %
67	$(INS.file)
68
69all :=		TARGET= all
70install :=	TARGET= install
71clean :=	TARGET= clean
72clobber :=	TARGET= clean
73lint :=		TARGET= lint
74
75.KEEP_STATE:
76
77all: $(PROG) $(PMLOG) $(SUBDIRS)
78
79_sysconfig: _sysconf.sh
80	$(SH) _sysconf.sh
81
82_sactab _pmtab iu.ap ttydefs:
83	$(SH) $@.sh
84
85$(PMLOG):
86	$(TOUCH) $@
87
88install: all $(DIRS) $(SUBDIRS) $(ROOTETCSAF) $(ROOTETCF) $(ROOTETCPM) $(ROOTVARPM)
89
90$(DIRS):
91	$(INS.dir)
92
93$(SUBDIRS): FRC
94	@cd $@; pwd; $(MAKE) $(TARGET)
95
96clean: $(SUBDIRS)
97
98lint: $(SUBDIRS)
99
100FRC:
101
102include ../Makefile.targ
103