xref: /illumos-gate/usr/src/cmd/fs.d/ufs/fsck/Makefile (revision 355d6bb5e62a215a9bcf820ac85c1fc62bed2f3f)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
57c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only
67c478bd9Sstevel@tonic-gate# (the "License").  You may not use this file except in compliance
77c478bd9Sstevel@tonic-gate# with the License.
87c478bd9Sstevel@tonic-gate#
97c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
107c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
117c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
127c478bd9Sstevel@tonic-gate# and limitations under the License.
137c478bd9Sstevel@tonic-gate#
147c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
157c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
167c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
177c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
187c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
197c478bd9Sstevel@tonic-gate#
207c478bd9Sstevel@tonic-gate# CDDL HEADER END
217c478bd9Sstevel@tonic-gate#
227c478bd9Sstevel@tonic-gate#
237c478bd9Sstevel@tonic-gate#ident	"%Z%%M%	%I%	%E% SMI"
247c478bd9Sstevel@tonic-gate#
25*355d6bb5Sswilcox# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
26*355d6bb5Sswilcox# Use is subject to license terms.
277c478bd9Sstevel@tonic-gate#
287c478bd9Sstevel@tonic-gate# cmd/fs.d/ufs/fsck/Makefile
297c478bd9Sstevel@tonic-gate
307c478bd9Sstevel@tonic-gateFSTYPE=		ufs
317c478bd9Sstevel@tonic-gateLIBPROG=	fsck
327c478bd9Sstevel@tonic-gateATTMK=		$(LIBPROG)
337c478bd9Sstevel@tonic-gate
347c478bd9Sstevel@tonic-gateinclude		../../Makefile.fstype
357c478bd9Sstevel@tonic-gateinclude		../Makefile.roll
367c478bd9Sstevel@tonic-gate
37*355d6bb5SswilcoxFSCKOBJS=	main.o dir.o dup_avl.o inode.o pass1.o pass1b.o \
38*355d6bb5Sswilcox		pass2b.o \
397c478bd9Sstevel@tonic-gate		pass3.o pass3b.o pass4.o pass5.o setup.o \
407c478bd9Sstevel@tonic-gate		utilities.o
417c478bd9Sstevel@tonic-gateFSCKSRCS=	$(FSCKOBJS:%.o=%.c)
427c478bd9Sstevel@tonic-gate
437c478bd9Sstevel@tonic-gateUFSDIR=		../../../../uts/common/fs/ufs
447c478bd9Sstevel@tonic-gateUFSOBJS=	ufs_subr.o ufs_tables.o
45*355d6bb5SswilcoxUFSSRCS=	$(UFSOBJS:%.o=$(UFSDIR)/%.c)
467c478bd9Sstevel@tonic-gateROLLDIR=	../roll_log
477c478bd9Sstevel@tonic-gate
48*355d6bb5SswilcoxAVLDIR=		../../../../common/avl
49*355d6bb5SswilcoxAVLOBJS=	avl.o
50*355d6bb5SswilcoxAVLSRCS=	$(AVLOBJS:%.o=$(AVLDIR)/%.c)
517c478bd9Sstevel@tonic-gate
52*355d6bb5SswilcoxOBJS=		$(FSCKOBJS) $(UFSOBJS) $(ROLLOBJS) $(AVLOBJS) $(FSLIB)
53*355d6bb5SswilcoxSRCS=		$(FSCKSRCS) $(UFSSRCS) $(ROLLSRCS) $(AVLSRCS) $(FSLIBSRC)
54*355d6bb5Sswilcox
55*355d6bb5SswilcoxCPPFLAGS +=	-D_LARGEFILE64_SOURCE -I../../ -I../../../../lib/libadm/inc
56*355d6bb5SswilcoxLDLIBS +=	-lefi
57*355d6bb5Sswilcox
587c478bd9Sstevel@tonic-gate$(LIBPROG):	$(OBJS)
59*355d6bb5Sswilcox		$(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(CTFMERGE_HOOK)
607c478bd9Sstevel@tonic-gate		$(POST_PROCESS)
617c478bd9Sstevel@tonic-gate
627c478bd9Sstevel@tonic-gate%.o:	$(UFSDIR)/%.c
63*355d6bb5Sswilcox	$(COMPILE.c) $< $(CTFCONVERT_HOOK)
64*355d6bb5Sswilcox
65*355d6bb5Sswilcox%.o:	$(AVLDIR)/%.c
66*355d6bb5Sswilcox	$(COMPILE.c) $< $(CTFCONVERT_HOOK)
67*355d6bb5Sswilcox
68*355d6bb5Sswilcox# Use DEVLINTFLAGS and the definition of LINT.c below for development
69*355d6bb5Sswilcox# checking.  Prior to putback, increase Nlevel to 4 for extra sanity.
70*355d6bb5Sswilcox# Nlevel=2 is the default applied by lint.
71*355d6bb5Sswilcox#
72*355d6bb5Sswilcox# Remember to comment LINT.c out before doing the putback, as we shouldn't
73*355d6bb5Sswilcox# be overriding the top-level settings under normal circumstances.
74*355d6bb5Sswilcox#
75*355d6bb5Sswilcox# Note that you have to have a proto area with populated usr/include and
76*355d6bb5Sswilcox# usr/include/sys (or the parent workspace needs it).  Otherwise lint gets
77*355d6bb5Sswilcox# very confused.  Unfortunately, we also have to tell it where its own
78*355d6bb5Sswilcox# include directory is, or it gets the wrong version of note.h.
79*355d6bb5Sswilcox
80*355d6bb5SswilcoxSECLEVEL=core
81*355d6bb5SswilcoxDEVLINTFLAGS =	-errtags=yes -U__PRAGMA_REDEFINE_EXTNAME \
82*355d6bb5Sswilcox		$(C99LMODE) -errsecurity=$(SECLEVEL) \
83*355d6bb5Sswilcox		-x -Nlevel=2 \
84*355d6bb5Sswilcox		-I/net/tools-sparc/export/tools.sparc/on10-tools/SUNWspro/SOS8/prod/include/lint
85*355d6bb5Sswilcox
86*355d6bb5Sswilcox#LINT.c=		$(LINT) $(DEVLINTFLAGS) $(CPPFLAGS)
877c478bd9Sstevel@tonic-gate
887c478bd9Sstevel@tonic-gatelint:	lint_SRCS
897c478bd9Sstevel@tonic-gate
907c478bd9Sstevel@tonic-gateclean:
91*355d6bb5Sswilcox	$(RM) $(FSCKOBJS) $(UFSOBJS) $(AVLOBJS)
92*355d6bb5Sswilcox
93*355d6bb5Sswilcoxcscope.out tags: FRC
94*355d6bb5Sswilcox	$(XREF) -f -x $@
95*355d6bb5Sswilcox
96*355d6bb5SswilcoxFRC:
97