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