1# 2# CDDL HEADER START 3# 4# The contents of this file are subject to the terms of the 5# Common Development and Distribution License, Version 1.0 only 6# (the "License"). You may not use this file except in compliance 7# with the License. 8# 9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10# or http://www.opensolaris.org/os/licensing. 11# See the License for the specific language governing permissions 12# and limitations under the License. 13# 14# When distributing Covered Code, include this CDDL HEADER in each 15# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16# If applicable, add the following below this CDDL HEADER, with the 17# fields enclosed by brackets "[]" replaced with your own identifying 18# information: Portions Copyright [yyyy] [name of copyright owner] 19# 20# CDDL HEADER END 21# 22# 23#ident "%Z%%M% %I% %E% SMI" 24# 25# Copyright 2005 Sun Microsystems, Inc. All rights reserved. 26# Use is subject to license terms. 27# 28# cmd/fs.d/ufs/fsck/Makefile 29 30FSTYPE= ufs 31LIBPROG= fsck 32ATTMK= $(LIBPROG) 33 34include ../../Makefile.fstype 35include ../Makefile.roll 36 37FSCKOBJS= main.o dir.o dup_avl.o inode.o pass1.o pass1b.o \ 38 pass2.o \ 39 pass3.o pass3b.o pass4.o pass5.o setup.o \ 40 utilities.o 41FSCKSRCS= $(FSCKOBJS:%.o=%.c) 42 43UFSDIR= ../../../../uts/common/fs/ufs 44UFSOBJS= ufs_subr.o ufs_tables.o 45UFSSRCS= $(UFSOBJS:%.o=$(UFSDIR)/%.c) 46ROLLDIR= ../roll_log 47 48AVLDIR= ../../../../common/avl 49AVLOBJS= avl.o 50AVLSRCS= $(AVLOBJS:%.o=$(AVLDIR)/%.c) 51 52OBJS= $(FSCKOBJS) $(UFSOBJS) $(ROLLOBJS) $(AVLOBJS) $(FSLIB) 53SRCS= $(FSCKSRCS) $(UFSSRCS) $(ROLLSRCS) $(AVLSRCS) $(FSLIBSRC) 54 55CPPFLAGS += -D_LARGEFILE64_SOURCE -I../../ -I../../../../lib/libadm/inc 56LDLIBS += -lefi 57 58$(LIBPROG): $(OBJS) 59 $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(CTFMERGE_HOOK) 60 $(POST_PROCESS) 61 62%.o: $(UFSDIR)/%.c 63 $(COMPILE.c) $< $(CTFCONVERT_HOOK) 64 65%.o: $(AVLDIR)/%.c 66 $(COMPILE.c) $< $(CTFCONVERT_HOOK) 67 68# Use DEVLINTFLAGS and the definition of LINT.c below for development 69# checking. Prior to putback, increase Nlevel to 4 for extra sanity. 70# Nlevel=2 is the default applied by lint. 71# 72# Remember to comment LINT.c out before doing the putback, as we shouldn't 73# be overriding the top-level settings under normal circumstances. 74# 75# Note that you have to have a proto area with populated usr/include and 76# usr/include/sys (or the parent workspace needs it). Otherwise lint gets 77# very confused. Unfortunately, we also have to tell it where its own 78# include directory is, or it gets the wrong version of note.h. 79 80SECLEVEL=core 81DEVLINTFLAGS = -errtags=yes -U__PRAGMA_REDEFINE_EXTNAME \ 82 $(C99LMODE) -errsecurity=$(SECLEVEL) \ 83 -x -Nlevel=2 \ 84 -I/net/tools-sparc/export/tools.sparc/on10-tools/SUNWspro/SOS8/prod/include/lint 85 86#LINT.c= $(LINT) $(DEVLINTFLAGS) $(CPPFLAGS) 87 88lint: lint_SRCS 89 90clean: 91 $(RM) $(FSCKOBJS) $(UFSOBJS) $(AVLOBJS) 92 93cscope.out tags: FRC 94 $(XREF) -f -x $@ 95 96FRC: 97