Makefile revision 4bff34e37def8a90f9194d81bc345c52ba20086a
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# CDDL HEADER START
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# The contents of this file are subject to the terms of the
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Common Development and Distribution License (the "License").
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# You may not use this file except in compliance with the License.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# See the License for the specific language governing permissions
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# and limitations under the License.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# When distributing Covered Code, include this CDDL HEADER in each
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# If applicable, add the following below this CDDL HEADER, with the
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# CDDL HEADER END
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Use is subject to license terms.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# ident "%Z%%M% %I% %E% SMI"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# The filesystem independent utilities clri, fsdb, dcopy, labelit, and mkfs
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# are all built from the source file switchout.c. They are all then links
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# to the same object. This is accomplished by:
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# 1) building clri from switchout.c (had to choose one)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# 2) installing it in the target directory
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# 3) linking the others to clri.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# In a similar manner, ncheck is linked to ff.
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsSUBDIR2= dev fd pcfs nfs hsfs proc ctfs udfs ufs tmpfs cachefs \
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsETC2USRSBIN= clri fsdb mkfs fsck labelit dcopy volcopy ff ncheck
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsROOTUSRSBINLINKS = $(ROOTFS_PROG:%=$(ROOTUSRSBIN)/%)
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsROOTUSRSBINCLRI= $(USRSBINCLRI:%=$(ROOTUSRSBIN)/%)
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsSYMUSRBIN2USRSBIN= $(USRBIN2USRSBIN:%=$(ROOTBIN)/%)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# This flag is being added only for SCO (x86) compatibility
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# for messaging catalog
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsPOFILES1= $(PROG:%=%.po) $(ROOTFS_PROG:%=%.po) switchout.po fssnapsup.po
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsPOFILES= $(POFILES1) $(POFILES2) $(POFILES_XPG4)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# build rule for xpg4 objects
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# This is too intense when building the whole world.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# .PARALLEL: $(SUBDIRS)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsall_local: $(PROG) $(ROOTFS_PROG) $(XPG4PROG) $(SPPROG) $(MNTTAB) \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews $(LINK.c) -o $@ $@.o deffs.o $(FSLIB) $(LDLIBS)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews $(LINK.c) -o $@ fsck.o deffs.o preenlib.o $(LDLIBS)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews $(LINK.c) -o $@ mount.o deffs.o $(FSLIB) $(LDLIBS)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews $(LINK.c) -o $@ switchout.o deffs.o fssnapsup.o $(LDLIBS) -ldiskmgt
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsinstall: $(FSLIB) .WAIT $(SUBDIRS) .WAIT install_local
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsinstall_local: all_local $(ROOTSBINPROG) $(ROOTUSRSBINF) $(ROOTUSRSBINCLRI) \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews $(ROOTUSRSBINFF) $(ROOTETCMNTTAB) $(ROOTETCDEFAULTFILES) \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews $(ROOTXPG4PROG) $(SYMETC2SBIN) $(SYMETC2USRSBIN) \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews $(SYMUSRBIN2USRSBIN) $(SYMDEVNM) $(ROOTUSRSBINLINKS)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Links from /etc to /sbin such as /etc/mount -> ../sbin/mount
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Links from /etc to /usr/sbin such as /etc/clri -> ../usr/sbin/clri
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Links from /usr/bin to /usr/sbin such as /usr/bin/df -> ../sbin/df
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Links from /usr/sbin to /sbin such as /usr/sbin/mount -> ../../sbin/mount
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Symlink from devnm to df in /usr/sbin
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Multiple names for switchout (clri, dcopy, fsdb, labelit, mkfs)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Multiple names for ff (ncheck)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews $(RM) $(PROG) $(ROOTFS_PROG) $(SPPROG) $(MNTTAB) $(DEFAULTFILES) \