xref: /titanic_50/usr/src/cmd/fs.d/Makefile.fstype (revision 24fe0b3bf671e123467ce1df0b67cadd3614c8e4)
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# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25#	cmd/fs.d/Makefile.fstype
26#	Definitions and targets common to "simple" file system types.
27#
28
29# FSTYPE is name of filesystem type subdirectory to build
30# PROG is a list of filesystem type programs to be installed BOTH in
31#	../etc/fs/$(FSTYPE) and ../usr/lib/fs/$(FSTYPE)
32#	Those installed under etc/fs must be statically linked, while
33#	those installed under usr/lib/fs must be dynamically linked.
34# ETCPROG is a list of filesystem type programs to be installed ONLY in
35#	../etc/fs/$(FSTYPE)
36# LIBPROG is a list of filesystem type programs to be installed ONLY in
37#	../usr/lib/fs/$(FSTYPE)
38# TYPEPROG is a list of filesystem type programs to be installed ONLY in
39#	../usr/lib/$(FSTYPE)	[as with nfs daemons]
40
41# include global command definitions; SRC should be defined in the shell.
42# SRC is needed until RFE 1026993 is implemented.
43include		$(SRC)/cmd/Makefile.cmd
44
45FSCOMMONDIR=	$(SRC)/cmd/fs.d
46FSLIB=		$(FSCOMMONDIR)/fslib.o
47FSLIBSRC=	$(FSLIB:%.o=%.c)
48
49ROOTETCFS=	$(ROOTETC)/fs
50ROOTLIBFS=	$(ROOTLIB)/fs
51FSDIRS=		$(ROOTETCFS) $(ROOTLIBFS)
52ROOTETCFSTYPE=	$(ROOTETCFS)/$(FSTYPE)
53ROOTLIBFSTYPE=	$(ROOTLIBFS)/$(FSTYPE)
54ROOTETCTYPE=	$(ROOTETC)/$(FSTYPE)
55ROOTLIBTYPE=	$(ROOTLIB)/$(FSTYPE)
56ROOTETCFSPROG=	$(PROG:%=$(ROOTETCFSTYPE)/%) $(ETCPROG:%=$(ROOTETCFSTYPE)/%)
57ROOTLIBFSPROG=	$(PROG:%=$(ROOTLIBFSTYPE)/%) $(LIBPROG:%=$(ROOTLIBFSTYPE)/%)
58ROOTTYPEPROG=	$(TYPEPROG:%=$(ROOTLIBTYPE)/%)
59FSTYPEDIRS=	$(FSDIRS:%=%/$(FSTYPE)) $(ROOTETCTYPE) $(ROOTLIBTYPE)
60FSTYPEPROG=	$(ROOTETCFSPROG) $(ROOTLIBFSPROG) $(ROOTTYPEPROG)
61
62CLOBBERFILES +=	$(ETCPROG) $(LIBPROG) $(TYPEPROG)
63
64.KEEP_STATE:
65
66all:		$(PROG) $(ETCPROG) $(LIBPROG) $(TYPEPROG)
67
68# FSDIRS are made by $(SRC)/Targetdirs via rootdirs in $(SRC)/Makefile
69# Some FSTYPE directories are made there also and should not be made here,
70# but it is easier to handle them as a class.  "install" will not remake
71# a directory that already exists.
72
73$(FSTYPEDIRS):
74		$(INS.dir)
75
76$(ROOTETCFSTYPE)/%:	$(ROOTETCFSTYPE) %
77		$(INS.file)
78
79$(ROOTLIBFSTYPE)/%:	$(ROOTLIBFSTYPE) %
80		$(INS.file)
81
82$(ROOTLIBTYPE)/%:	$(ROOTLIBTYPE) %
83		$(INS.file)
84
85$(ROOTETCTYPE)/%:	$(ROOTETCTYPE) %
86		$(INS.file)
87
88# Prevent fslib.o from being build in the sub makefiles.
89$(FSLIB):
90	@:
91
92include		$(SRC)/cmd/Makefile.targ
93
94install:	all $(FSTYPEPROG) $(OTHERINSTALL)
95
96clean:
97
98