xref: /titanic_44/usr/src/cmd/find/Makefile (revision 4a634bb80136cc001d14ab96addd9915105e5223)
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 (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22#ident	"%Z%%M%	%I%	%E% SMI"
23#
24# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27
28PROG=		find
29XPG4PROG=	find
30FINDOBJS1=	find.o
31FINDOBJS=	$(FINDOBJS1) getresponse.o
32XPG4FINDOBJS=	$(FINDOBJS:%.o=xpg4_%.o)
33SRCS=		$(FINDOBJS1:%.o=%.c) $(SRC)/common/util/getresponse.c
34
35include ../Makefile.cmd
36
37$(XPG4)	:= CFLAGS += -DXPG4
38CPPFLAGS += -D_FILE_OFFSET_BITS=64 -I $(SRC)/common/util
39
40LINTFLAGS += -u
41LDLIBS += -lsec
42
43.KEEP_STATE:
44
45all: $(PROG) $(XPG4)
46
47install: all $(ROOTPROG) $(ROOTXPG4PROG)
48
49$(PROG):	$(FINDOBJS)
50	$(LINK.c) -o $@ $(FINDOBJS) $(LDLIBS)
51	$(POST_PROCESS)
52
53$(XPG4):	$(XPG4FINDOBJS)
54	$(LINK.c) -o $@ $(XPG4FINDOBJS) $(LDLIBS)
55	$(POST_PROCESS)
56
57%.o:	$(SRC)/common/util/%.c
58	$(COMPILE.c) $(OUTPUT_OPTION) $<
59	$(POST_PROCESS_O)
60
61xpg4_%.o:	%.c
62	$(COMPILE.c) -o $@ $<
63	$(POST_PROCESS_O)
64
65xpg4_%.o:	$(SRC)/common/util/%.c
66	$(COMPILE.c) -o $@ $<
67	$(POST_PROCESS_O)
68
69clean:
70	$(RM) $(FINDOBJS)
71
72lint:	lint_SRCS
73
74include ../Makefile.targ
75