8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / mv / Makefile
blob2072612ffe98dd63d9555a1bb6f7c4463fad7986
1 # CDDL HEADER START
3 # The contents of this file are subject to the terms of the
4 # Common Development and Distribution License (the "License").
5 # You may not use this file except in compliance with the License.
7 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8 # or http://www.opensolaris.org/os/licensing.
9 # See the License for the specific language governing permissions
10 # and limitations under the License.
12 # When distributing Covered Code, include this CDDL HEADER in each
13 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14 # If applicable, add the following below this CDDL HEADER, with the
15 # fields enclosed by brackets "[]" replaced with your own identifying
16 # information: Portions Copyright [yyyy] [name of copyright owner]
18 # CDDL HEADER END
21 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
22 # Use is subject to license terms.
25 PROG= mv
26 XPG4PROG= mv
27 OBJS1= mv.o
28 OBJS= $(OBJS1) getresponse.o
29 CPFILE= cp
30 LNFILE= ln
31 XPG4OBJS= $(OBJS:%.o=xpg4_%.o)
32 SRCS= $(OBJS1:%.o=%.c) $(SRC)/common/util/getresponse.c
34 ROOTLINKS= $(ROOTBIN)/$(CPFILE) $(ROOTBIN)/$(LNFILE)
35 ROOTXPG4LINKS= $(ROOTXPG4BIN)/$(CPFILE) $(ROOTXPG4BIN)/$(LNFILE)
37 include ../Makefile.cmd
39 clean $(XPG4) := OBJS += values-xpg4.o
41 CLOBBERFILES += $(CPFILE) $(LNFILE)
42 CFLAGS += $(CCVERBOSE)
43 CERRWARN += -_gcc=-Wno-parentheses
44 CERRWARN += -_gcc=-Wno-unused-variable
45 CERRWARN += -_gcc=-Wno-uninitialized
46 $(XPG4) := CFLAGS += -DXPG4
47 LINTFLAGS += -DXPG4 -u
48 XGETFLAGS += -a -x mv.xcl
49 CPPFLAGS += -D_FILE_OFFSET_BITS=64 -I $(SRC)/common/util
51 lint := LDLIBS += -lcmdutils -lavl -lsec -lnvpair
52 $(PROG) := LDLIBS += -lcmdutils -lavl -lsec -lnvpair
53 $(XPG4) := LDLIBS += -lcmdutils -lavl -lsec -lnvpair
55 .KEEP_STATE:
57 all: $(PROG) $(CPFILE) $(LNFILE) $(XPG4)
59 $(PROG): $$(OBJS)
60 $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
61 $(POST_PROCESS)
63 $(XPG4): $$(XPG4OBJS)
64 $(LINK.c) -o $@ $(XPG4OBJS) $(LDLIBS)
65 $(POST_PROCESS)
67 %.o: $(SRC)/common/util/%.c
68 $(COMPILE.c) $(OUTPUT_OPTION) $<
69 $(POST_PROCESS_O)
71 xpg4_%.o: %.c
72 $(COMPILE.c) -o $@ $<
73 $(POST_PROCESS_O)
75 xpg4_%.o: $(SRC)/common/util/%.c
76 $(COMPILE.c) -o $@ $<
77 $(POST_PROCESS_O)
79 %values-xpg4.o: ../../lib/common/common/values-xpg4.c
80 $(COMPILE.c) -o $@ ../../lib/common/common/values-xpg4.c
82 $(CPFILE): $(PROG)
83 @$(RM) $(CPFILE); $(LN) $(PROG) $(CPFILE)
85 $(LNFILE): $(PROG)
86 @$(RM) $(LNFILE); $(LN) $(PROG) $(LNFILE)
88 install: all $(ROOTXPG4PROG) $(ROOTLINKS) $(ROOTXPG4LINKS)
90 $(ROOTLINKS): $(ROOTPROG)
91 $(RM) $@
92 $(LN) $(ROOTPROG) $@
94 $(ROOTXPG4LINKS): $(ROOTXPG4PROG)
95 $(RM) $@
96 $(LN) $(ROOTXPG4PROG) $@
98 clean:
99 $(RM) $(OBJS) $(XPG4OBJS)
101 lint: lint_SRCS
103 include ../Makefile.targ