xref: /titanic_50/usr/src/cmd/rm/Makefile (revision 63602c90af2802f2ab666ab39bb4aea7d02500c3)
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=		rm
29XPG4PROG=	rm
30RMOBJ1=		rm.o
31RMOBJ=		$(RMOBJ1) getresponse.o
32XPG4RMOBJ=	$(RMOBJ:%.o=xpg4_%.o)
33SRCS= 		$(RMOBJ1:%.o=%.c) $(SRC)/common/util/getresponse.c
34
35include ../Makefile.cmd
36
37CFLAGS += $(CCVERBOSE)
38$(XPG4) := CFLAGS += -DXPG4
39CPPFLAGS += -D_FILE_OFFSET_BITS=64  -I $(SRC)/common/util
40LINTFLAGS += -u
41.KEEP_STATE:
42
43all: $(PROG) $(XPG4)
44
45install: all $(ROOTPROG) $(ROOTXPG4PROG)
46
47$(PROG): $(RMOBJ)
48	$(LINK.c) $(RMOBJ) -o $@ $(LDLIBS)
49	$(POST_PROCESS)
50
51$(XPG4): $(XPG4RMOBJ)
52	$(LINK.c) $(XPG4RMOBJ) -o $@ $(LDLIBS)
53	$(POST_PROCESS)
54
55%.o:    $(SRC)/common/util/%.c
56	$(COMPILE.c) $(OUTPUT_OPTION) $<
57	$(POST_PROCESS_O)
58
59xpg4_%.o:	%.c
60	$(COMPILE.c) -o $@ $<
61	$(POST_PROCESS_O)
62
63xpg4_%.o:	$(SRC)/common/util/%.c
64	$(COMPILE.c) -o $@ $<
65	$(POST_PROCESS_O)
66
67clean:
68	$(RM) $(RMOBJ) $(XPG4RMOBJ)
69
70lint:	lint_SRCS
71
72include ../Makefile.targ
73