xref: /illumos-gate/usr/src/cmd/fs.d/ufs/fsck/Makefile (revision 0fb96ba1f1ce26ff8b286f8f928769a6afcb00a6)
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#
255661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc.
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gateFSTYPE=		ufs
287c478bd9Sstevel@tonic-gateLIBPROG=	fsck
297c478bd9Sstevel@tonic-gateATTMK=		$(LIBPROG)
307c478bd9Sstevel@tonic-gate
317c478bd9Sstevel@tonic-gateinclude		../../Makefile.fstype
327c478bd9Sstevel@tonic-gateinclude		../Makefile.roll
337c478bd9Sstevel@tonic-gate
34355d6bb5SswilcoxFSCKOBJS=	main.o dir.o dup_avl.o inode.o pass1.o pass1b.o \
35b9a41fd3Sswilcox		pass2.o \
367c478bd9Sstevel@tonic-gate		pass3.o pass3b.o pass4.o pass5.o setup.o \
377c478bd9Sstevel@tonic-gate		utilities.o
387c478bd9Sstevel@tonic-gateFSCKSRCS=	$(FSCKOBJS:%.o=%.c)
397c478bd9Sstevel@tonic-gate
407c478bd9Sstevel@tonic-gateUFSDIR=		../../../../uts/common/fs/ufs
417c478bd9Sstevel@tonic-gateUFSOBJS=	ufs_subr.o ufs_tables.o
42355d6bb5SswilcoxUFSSRCS=	$(UFSOBJS:%.o=$(UFSDIR)/%.c)
437c478bd9Sstevel@tonic-gateROLLDIR=	../roll_log
447c478bd9Sstevel@tonic-gate
45948f2876Sss150715OBJS=		$(FSCKOBJS) $(UFSOBJS) $(ROLLOBJS) $(FSLIB)
46948f2876Sss150715SRCS=		$(FSCKSRCS) $(UFSSRCS) $(ROLLSRCS) $(FSLIBSRC)
47355d6bb5Sswilcox
48355d6bb5SswilcoxCPPFLAGS +=	-D_LARGEFILE64_SOURCE -I../../ -I../../../../lib/libadm/inc
49948f2876Sss150715LDLIBS +=	-lefi -lavl
50355d6bb5Sswilcox
517014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-parentheses
527014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-implicit-function-declaration
53d3b5f563SJohn LevonCERRWARN +=	$(CNOWARN_UNINIT)
547014882cSRichard Lowe
555661bb76SJohn Levon# not linted
565661bb76SJohn LevonSMATCH=off
575661bb76SJohn Levon
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
657c478bd9Sstevel@tonic-gateclean:
66948f2876Sss150715	$(RM) $(FSCKOBJS) $(UFSOBJS)
67355d6bb5Sswilcox
68*0fb96ba1SBill Sommerfeldinclude ../../../../Makefile.xref
69355d6bb5Sswilcox
70*0fb96ba1SBill SommerfeldXREFFLAGS=	-f -x
71*0fb96ba1SBill Sommerfeld
72