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# 25355d6bb5Sswilcox# Copyright 2005 Sun Microsystems, Inc. All rights reserved. 26355d6bb5Sswilcox# 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 37355d6bb5SswilcoxFSCKOBJS= main.o dir.o dup_avl.o inode.o pass1.o pass1b.o \ 38*b9a41fd3Sswilcox pass2.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 45355d6bb5SswilcoxUFSSRCS= $(UFSOBJS:%.o=$(UFSDIR)/%.c) 467c478bd9Sstevel@tonic-gateROLLDIR= ../roll_log 477c478bd9Sstevel@tonic-gate 48355d6bb5SswilcoxAVLDIR= ../../../../common/avl 49355d6bb5SswilcoxAVLOBJS= avl.o 50355d6bb5SswilcoxAVLSRCS= $(AVLOBJS:%.o=$(AVLDIR)/%.c) 517c478bd9Sstevel@tonic-gate 52355d6bb5SswilcoxOBJS= $(FSCKOBJS) $(UFSOBJS) $(ROLLOBJS) $(AVLOBJS) $(FSLIB) 53355d6bb5SswilcoxSRCS= $(FSCKSRCS) $(UFSSRCS) $(ROLLSRCS) $(AVLSRCS) $(FSLIBSRC) 54355d6bb5Sswilcox 55355d6bb5SswilcoxCPPFLAGS += -D_LARGEFILE64_SOURCE -I../../ -I../../../../lib/libadm/inc 56355d6bb5SswilcoxLDLIBS += -lefi 57355d6bb5Sswilcox 587c478bd9Sstevel@tonic-gate$(LIBPROG): $(OBJS) 59355d6bb5Sswilcox $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(CTFMERGE_HOOK) 607c478bd9Sstevel@tonic-gate $(POST_PROCESS) 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gate%.o: $(UFSDIR)/%.c 63355d6bb5Sswilcox $(COMPILE.c) $< $(CTFCONVERT_HOOK) 64355d6bb5Sswilcox 65355d6bb5Sswilcox%.o: $(AVLDIR)/%.c 66355d6bb5Sswilcox $(COMPILE.c) $< $(CTFCONVERT_HOOK) 67355d6bb5Sswilcox 68355d6bb5Sswilcox# Use DEVLINTFLAGS and the definition of LINT.c below for development 69355d6bb5Sswilcox# checking. Prior to putback, increase Nlevel to 4 for extra sanity. 70355d6bb5Sswilcox# Nlevel=2 is the default applied by lint. 71355d6bb5Sswilcox# 72355d6bb5Sswilcox# Remember to comment LINT.c out before doing the putback, as we shouldn't 73355d6bb5Sswilcox# be overriding the top-level settings under normal circumstances. 74355d6bb5Sswilcox# 75355d6bb5Sswilcox# Note that you have to have a proto area with populated usr/include and 76355d6bb5Sswilcox# usr/include/sys (or the parent workspace needs it). Otherwise lint gets 77355d6bb5Sswilcox# very confused. Unfortunately, we also have to tell it where its own 78355d6bb5Sswilcox# include directory is, or it gets the wrong version of note.h. 79355d6bb5Sswilcox 80355d6bb5SswilcoxSECLEVEL=core 81355d6bb5SswilcoxDEVLINTFLAGS = -errtags=yes -U__PRAGMA_REDEFINE_EXTNAME \ 82355d6bb5Sswilcox $(C99LMODE) -errsecurity=$(SECLEVEL) \ 83355d6bb5Sswilcox -x -Nlevel=2 \ 84355d6bb5Sswilcox -I/net/tools-sparc/export/tools.sparc/on10-tools/SUNWspro/SOS8/prod/include/lint 85355d6bb5Sswilcox 86355d6bb5Sswilcox#LINT.c= $(LINT) $(DEVLINTFLAGS) $(CPPFLAGS) 877c478bd9Sstevel@tonic-gate 887c478bd9Sstevel@tonic-gatelint: lint_SRCS 897c478bd9Sstevel@tonic-gate 907c478bd9Sstevel@tonic-gateclean: 91355d6bb5Sswilcox $(RM) $(FSCKOBJS) $(UFSOBJS) $(AVLOBJS) 92355d6bb5Sswilcox 93355d6bb5Sswilcoxcscope.out tags: FRC 94355d6bb5Sswilcox $(XREF) -f -x $@ 95355d6bb5Sswilcox 96355d6bb5SswilcoxFRC: 97