xref: /titanic_41/usr/src/cmd/fs.d/ufs/fsck/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
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
5948f2876Sss150715# Common Development and Distribution License (the "License").
6948f2876Sss150715# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate#
22948f2876Sss150715# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23355d6bb5Sswilcox# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate
267c478bd9Sstevel@tonic-gateFSTYPE=		ufs
277c478bd9Sstevel@tonic-gateLIBPROG=	fsck
287c478bd9Sstevel@tonic-gateATTMK=		$(LIBPROG)
297c478bd9Sstevel@tonic-gate
307c478bd9Sstevel@tonic-gateinclude		../../Makefile.fstype
317c478bd9Sstevel@tonic-gateinclude		../Makefile.roll
327c478bd9Sstevel@tonic-gate
33355d6bb5SswilcoxFSCKOBJS=	main.o dir.o dup_avl.o inode.o pass1.o pass1b.o \
34b9a41fd3Sswilcox		pass2.o \
357c478bd9Sstevel@tonic-gate		pass3.o pass3b.o pass4.o pass5.o setup.o \
367c478bd9Sstevel@tonic-gate		utilities.o
377c478bd9Sstevel@tonic-gateFSCKSRCS=	$(FSCKOBJS:%.o=%.c)
387c478bd9Sstevel@tonic-gate
397c478bd9Sstevel@tonic-gateUFSDIR=		../../../../uts/common/fs/ufs
407c478bd9Sstevel@tonic-gateUFSOBJS=	ufs_subr.o ufs_tables.o
41355d6bb5SswilcoxUFSSRCS=	$(UFSOBJS:%.o=$(UFSDIR)/%.c)
427c478bd9Sstevel@tonic-gateROLLDIR=	../roll_log
437c478bd9Sstevel@tonic-gate
44948f2876Sss150715OBJS=		$(FSCKOBJS) $(UFSOBJS) $(ROLLOBJS) $(FSLIB)
45948f2876Sss150715SRCS=		$(FSCKSRCS) $(UFSSRCS) $(ROLLSRCS) $(FSLIBSRC)
46355d6bb5Sswilcox
47355d6bb5SswilcoxCPPFLAGS +=	-D_LARGEFILE64_SOURCE -I../../ -I../../../../lib/libadm/inc
48948f2876Sss150715LDLIBS +=	-lefi -lavl
49355d6bb5Sswilcox
50*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-parentheses
51*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-implicit-function-declaration
52*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-uninitialized
53*7014882cSRichard Lowe
547c478bd9Sstevel@tonic-gate$(LIBPROG):	$(OBJS)
55355d6bb5Sswilcox		$(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(CTFMERGE_HOOK)
567c478bd9Sstevel@tonic-gate		$(POST_PROCESS)
577c478bd9Sstevel@tonic-gate
587c478bd9Sstevel@tonic-gate%.o:	$(UFSDIR)/%.c
59355d6bb5Sswilcox	$(COMPILE.c) $< $(CTFCONVERT_HOOK)
60355d6bb5Sswilcox
61355d6bb5Sswilcox# Use DEVLINTFLAGS and the definition of LINT.c below for development
62355d6bb5Sswilcox# checking.  Prior to putback, increase Nlevel to 4 for extra sanity.
63355d6bb5Sswilcox# Nlevel=2 is the default applied by lint.
64355d6bb5Sswilcox#
65355d6bb5Sswilcox# Remember to comment LINT.c out before doing the putback, as we shouldn't
66355d6bb5Sswilcox# be overriding the top-level settings under normal circumstances.
67355d6bb5Sswilcox#
68355d6bb5Sswilcox# Note that you have to have a proto area with populated usr/include and
69355d6bb5Sswilcox# usr/include/sys (or the parent workspace needs it).  Otherwise lint gets
70355d6bb5Sswilcox# very confused.  Unfortunately, we also have to tell it where its own
71355d6bb5Sswilcox# include directory is, or it gets the wrong version of note.h.
72355d6bb5Sswilcox
73355d6bb5SswilcoxSECLEVEL=core
74355d6bb5SswilcoxDEVLINTFLAGS =	-errtags=yes -U__PRAGMA_REDEFINE_EXTNAME \
75355d6bb5Sswilcox		$(C99LMODE) -errsecurity=$(SECLEVEL) \
76355d6bb5Sswilcox		-x -Nlevel=2 \
77355d6bb5Sswilcox		-I/net/tools-sparc/export/tools.sparc/on10-tools/SUNWspro/SOS8/prod/include/lint
78355d6bb5Sswilcox
79355d6bb5Sswilcox#LINT.c=		$(LINT) $(DEVLINTFLAGS) $(CPPFLAGS)
807c478bd9Sstevel@tonic-gate
817c478bd9Sstevel@tonic-gatelint:	lint_SRCS
827c478bd9Sstevel@tonic-gate
837c478bd9Sstevel@tonic-gateclean:
84948f2876Sss150715	$(RM) $(FSCKOBJS) $(UFSOBJS)
85355d6bb5Sswilcox
86355d6bb5Sswilcoxcscope.out tags: FRC
87355d6bb5Sswilcox	$(XREF) -f -x $@
88355d6bb5Sswilcox
89355d6bb5SswilcoxFRC:
90