# # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # cmd/fs.d/Makefile.fstype # Definitions and targets common to "simple" file system types. # # FSTYPE is name of filesystem type subdirectory to build # PROG is a list of filesystem type programs to be installed BOTH in # ../etc/fs/$(FSTYPE) and ../usr/lib/fs/$(FSTYPE) # Those installed under etc/fs must be statically linked, while # those installed under usr/lib/fs must be dynamically linked. # ETCPROG is a list of filesystem type programs to be installed ONLY in # ../etc/fs/$(FSTYPE) # LIBPROG is a list of filesystem type programs to be installed ONLY in # ../usr/lib/fs/$(FSTYPE) # TYPEPROG is a list of filesystem type programs to be installed ONLY in # ../usr/lib/$(FSTYPE) [as with nfs daemons] # include global command definitions; SRC should be defined in the shell. # SRC is needed until RFE 1026993 is implemented. include $(SRC)/cmd/Makefile.cmd FSCOMMONDIR= $(SRC)/cmd/fs.d FSLIB= $(FSCOMMONDIR)/fslib.o FSLIBSRC= $(FSLIB:%.o=%.c) ROOTETCFS= $(ROOTETC)/fs ROOTLIBFS= $(ROOTLIB)/fs FSDIRS= $(ROOTETCFS) $(ROOTLIBFS) ROOTETCFSTYPE= $(ROOTETCFS)/$(FSTYPE) ROOTLIBFSTYPE= $(ROOTLIBFS)/$(FSTYPE) ROOTETCTYPE= $(ROOTETC)/$(FSTYPE) ROOTLIBTYPE= $(ROOTLIB)/$(FSTYPE) ROOTETCFSPROG= $(PROG:%=$(ROOTETCFSTYPE)/%) $(ETCPROG:%=$(ROOTETCFSTYPE)/%) ROOTLIBFSPROG= $(PROG:%=$(ROOTLIBFSTYPE)/%) $(LIBPROG:%=$(ROOTLIBFSTYPE)/%) ROOTTYPEPROG= $(TYPEPROG:%=$(ROOTLIBTYPE)/%) FSTYPEDIRS= $(FSDIRS:%=%/$(FSTYPE)) $(ROOTETCTYPE) $(ROOTLIBTYPE) FSTYPEPROG= $(ROOTETCFSPROG) $(ROOTLIBFSPROG) $(ROOTTYPEPROG) CLOBBERFILES += $(ETCPROG) $(LIBPROG) $(TYPEPROG) .KEEP_STATE: all: $(PROG) $(ETCPROG) $(LIBPROG) $(TYPEPROG) # FSDIRS are made by $(SRC)/Targetdirs via rootdirs in $(SRC)/Makefile # Some FSTYPE directories are made there also and should not be made here, # but it is easier to handle them as a class. "install" will not remake # a directory that already exists. $(FSTYPEDIRS): $(INS.dir) $(ROOTETCFSTYPE)/%: $(ROOTETCFSTYPE) % $(INS.file) $(ROOTLIBFSTYPE)/%: $(ROOTLIBFSTYPE) % $(INS.file) $(ROOTLIBTYPE)/%: $(ROOTLIBTYPE) % $(INS.file) $(ROOTETCTYPE)/%: $(ROOTETCTYPE) % $(INS.file) # Prevent fslib.o from being build in the sub makefiles. $(FSLIB): @: include $(SRC)/cmd/Makefile.targ install: all $(FSTYPEPROG) $(OTHERINSTALL) clean: