xref: /illumos-gate/usr/src/cmd/devfsadm/Makefile (revision 66582b606a8194f7f3ba5b3a3a6dca5b0d346361)
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# Copyright 2016 Joyent, Inc.
24#
25# cmd/devfsadm/Makefile
26#
27
28DEFAULTFILES = devfsadm.dfl
29
30ETCDEVFILES=reserved_devnames
31
32include ../Makefile.cmd
33
34#
35# One for each ISA.
36#
37SUBDIRS =	$(MACH)
38
39all	:=	TARGET= all
40install	:=	TARGET= install
41clean	:=	TARGET= clean
42clobber	:=	TARGET= clobber
43_msg	:=	TARGET= _msg
44lint	:=	TARGET= lint
45
46ROOTETCDEV=	$(ROOTETC)/dev
47ROOTETCDEVFILES=$(ETCDEVFILES:%=$(ROOTETCDEV)/%)
48$(ROOTETCDEV) :=	DIRMODE=	755
49$(ROOTETCDEVFILES) :=	FILEMODE = 0644
50
51USRINCLUDEFILES=devfsadm.h
52ROOTUSRINCLUDE= $(ROOT)/usr/include
53ROOTUSRINCLUDEFILES=$(USRINCLUDEFILES:%=$(ROOTUSRINCLUDE)/%)
54$(ROOTUSRINCLUDEFILES) :=	FILEMODE = 0644
55
56.KEEP_STATE:
57
58all:	$(SUBDIRS) $(ETCDEVFILES)
59
60clean lint _msg:	$(SUBDIRS)
61
62clobber: $(SUBDIRS)
63	$(RM) $(ROOTETCDEVFILES)
64
65install_h: $(ROOTUSRINCLUDEFILES)
66
67install: $(SUBDIRS) install_h $(ROOTETCDEFAULTFILES) $(ROOTETCDEVFILES)
68
69
70$(ROOTETCDEV):
71	$(INS.dir)
72
73$(ROOTETCDEV)/% : % $(ROOTETCDEV)
74	$(INS.file)
75
76$(ROOTUSRINCLUDE)/% : %
77	$(INS.file)
78
79$(SUBDIRS):	FRC
80	@cd $@; pwd; $(MAKE) $(TARGET)
81
82FRC:
83