xref: /titanic_52/usr/src/cmd/fs.d/pcfs/fsck/Makefile (revision fa9e4066f08beec538e775443c5be79dd423fcab)
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 (c) 1999,2001 by Sun Microsystems, Inc.
26# All rights reserved.
27#
28# cmd/fs.d/pcfs/fsck/Makefile
29
30FSTYPE=		pcfs
31LIBPROG=	fsck
32ATTMK=		$(LIBPROG)
33
34include		../../Makefile.fstype
35
36FSCKOBJS=	fsck.o bpb.o clusters.o fat.o dir.o pcfs_common.o
37FSCKSRCS=	$(FSCKOBJS:%.o=%.c)
38
39#
40#  Error injection module for debugging purposes
41#
42#DEBUGOBJS=	inject.o
43#DEBUGSRCS=	$(DEBUGOBJS:%.o=%.c)
44
45#
46# We grab one file from the kernel.  It has a relatively complex routine
47# for manipulating time values into the format expected within directory
48# entries in the FAT file system [pc_tvtopct()].  It seemed better not to
49# duplicate this code.
50#
51PCFSDIR=	../../../../uts/common/fs/pcfs
52PCFSOBJS=	pc_subr.o
53PCFSSRCS=	$(PCFSOBJS:%.o=%.c)
54
55OBJS=		$(FSCKOBJS) $(PCFSOBJS) $(DEBUGOBJS)
56SRCS=		$(FSCKSRCS) $(PCFSDIR)/$(PCFSSRCS) $(DEBUGSRCS)
57LSRCS=		$(FSCKSRCS) $(DEBUGSRCS)
58
59# for messaging catalog
60#
61POFILE= fsck.po
62
63catalog:        $(POFILE)
64
65#
66# Uncomment the following two lines to build for dbx debugging
67#COPTFLAG = -g
68#COPTFLAG64 = -g
69#
70CPPFLAGS +=	-D_LARGEFILE64_SOURCE
71
72#
73# We need to tell lint not to complain about the routines
74# we are grabbing from the kernel as being undefined.
75#
76LINTFLAGS += -u
77
78$(LIBPROG):	$(OBJS)
79		$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
80		$(POST_PROCESS)
81
82%.o:	$(PCFSDIR)/%.c
83	$(COMPILE.c) -D_KERNEL $<
84
85lint_LSRCS:
86	$(LINT.c) $(LSRCS) $(LDLIBS)
87
88lint:	lint_LSRCS
89
90clean:
91	$(RM) $(FSCKOBJS) $(PCFSOBJS) $(DEBUGOBJS)
92