17c478bd9Sstevel@tonic-gate# CDDL HEADER START 27c478bd9Sstevel@tonic-gate# 37c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 43d63ea05Sas145665# Common Development and Distribution License (the "License"). 53d63ea05Sas145665# You may not use this file except in compliance with the License. 67c478bd9Sstevel@tonic-gate# 77c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 87c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 97c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 107c478bd9Sstevel@tonic-gate# and limitations under the License. 117c478bd9Sstevel@tonic-gate# 127c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 137c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 147c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 157c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 167c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 177c478bd9Sstevel@tonic-gate# 187c478bd9Sstevel@tonic-gate# CDDL HEADER END 197c478bd9Sstevel@tonic-gate# 207c478bd9Sstevel@tonic-gate# 2167e3a03eSrie# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 223d63ea05Sas145665# Use is subject to license terms. 237c478bd9Sstevel@tonic-gate# 247c478bd9Sstevel@tonic-gate 257c478bd9Sstevel@tonic-gatePROG= mv 267c478bd9Sstevel@tonic-gateXPG4PROG= mv 273d63ea05Sas145665OBJS1= mv.o 283d63ea05Sas145665OBJS= $(OBJS1) getresponse.o 297c478bd9Sstevel@tonic-gateCPFILE= cp 307c478bd9Sstevel@tonic-gateLNFILE= ln 317c478bd9Sstevel@tonic-gateXPG4OBJS= $(OBJS:%.o=xpg4_%.o) 323d63ea05Sas145665SRCS= $(OBJS1:%.o=%.c) $(SRC)/common/util/getresponse.c 333d63ea05Sas145665 347c478bd9Sstevel@tonic-gateROOTLINKS= $(ROOTBIN)/$(CPFILE) $(ROOTBIN)/$(LNFILE) 357c478bd9Sstevel@tonic-gateROOTXPG4LINKS= $(ROOTXPG4BIN)/$(CPFILE) $(ROOTXPG4BIN)/$(LNFILE) 367c478bd9Sstevel@tonic-gate 377c478bd9Sstevel@tonic-gateinclude ../Makefile.cmd 387c478bd9Sstevel@tonic-gate 397c478bd9Sstevel@tonic-gateclean $(XPG4) := OBJS += values-xpg4.o 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gateCLOBBERFILES += $(CPFILE) $(LNFILE) 427c478bd9Sstevel@tonic-gateCFLAGS += $(CCVERBOSE) 437014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses 447014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable 457014882cSRichard LoweCERRWARN += -_gcc=-Wno-uninitialized 467c478bd9Sstevel@tonic-gate$(XPG4) := CFLAGS += -DXPG4 473d63ea05Sas145665LINTFLAGS += -DXPG4 -u 487c478bd9Sstevel@tonic-gateXGETFLAGS += -a -x mv.xcl 493d63ea05Sas145665CPPFLAGS += -D_FILE_OFFSET_BITS=64 -I $(SRC)/common/util 507c478bd9Sstevel@tonic-gate 51da6c28aaSamwlint := LDLIBS += -lcmdutils -lavl -lsec -lnvpair 5267e3a03eSrie$(PROG) := LDLIBS += -lcmdutils -lavl -lsec -lnvpair 5367e3a03eSrie$(XPG4) := LDLIBS += -lcmdutils -lavl -lsec -lnvpair 547c478bd9Sstevel@tonic-gate 557c478bd9Sstevel@tonic-gate.KEEP_STATE: 567c478bd9Sstevel@tonic-gate 577c478bd9Sstevel@tonic-gateall: $(PROG) $(CPFILE) $(LNFILE) $(XPG4) 587c478bd9Sstevel@tonic-gate 597c478bd9Sstevel@tonic-gate$(PROG): $$(OBJS) 607c478bd9Sstevel@tonic-gate $(LINK.c) -o $@ $(OBJS) $(LDLIBS) 617c478bd9Sstevel@tonic-gate $(POST_PROCESS) 627c478bd9Sstevel@tonic-gate 637c478bd9Sstevel@tonic-gate$(XPG4): $$(XPG4OBJS) 647c478bd9Sstevel@tonic-gate $(LINK.c) -o $@ $(XPG4OBJS) $(LDLIBS) 657c478bd9Sstevel@tonic-gate $(POST_PROCESS) 667c478bd9Sstevel@tonic-gate 673d63ea05Sas145665%.o: $(SRC)/common/util/%.c 683d63ea05Sas145665 $(COMPILE.c) $(OUTPUT_OPTION) $< 693d63ea05Sas145665 $(POST_PROCESS_O) 703d63ea05Sas145665 717c478bd9Sstevel@tonic-gatexpg4_%.o: %.c 727c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 733d63ea05Sas145665 $(POST_PROCESS_O) 743d63ea05Sas145665 753d63ea05Sas145665xpg4_%.o: $(SRC)/common/util/%.c 763d63ea05Sas145665 $(COMPILE.c) -o $@ $< 773d63ea05Sas145665 $(POST_PROCESS_O) 787c478bd9Sstevel@tonic-gate 79*cc31cba9SRichard Lowe%values-xpg4.o: ../../lib/crt/common/values-xpg4.c 80*cc31cba9SRichard Lowe $(COMPILE.c) -o $@ ../../lib/crt/common/values-xpg4.c 817c478bd9Sstevel@tonic-gate 827c478bd9Sstevel@tonic-gate$(CPFILE): $(PROG) 837c478bd9Sstevel@tonic-gate @$(RM) $(CPFILE); $(LN) $(PROG) $(CPFILE) 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gate$(LNFILE): $(PROG) 867c478bd9Sstevel@tonic-gate @$(RM) $(LNFILE); $(LN) $(PROG) $(LNFILE) 877c478bd9Sstevel@tonic-gate 887c478bd9Sstevel@tonic-gateinstall: all $(ROOTXPG4PROG) $(ROOTLINKS) $(ROOTXPG4LINKS) 897c478bd9Sstevel@tonic-gate 907c478bd9Sstevel@tonic-gate$(ROOTLINKS): $(ROOTPROG) 917c478bd9Sstevel@tonic-gate $(RM) $@ 927c478bd9Sstevel@tonic-gate $(LN) $(ROOTPROG) $@ 937c478bd9Sstevel@tonic-gate 947c478bd9Sstevel@tonic-gate$(ROOTXPG4LINKS): $(ROOTXPG4PROG) 957c478bd9Sstevel@tonic-gate $(RM) $@ 967c478bd9Sstevel@tonic-gate $(LN) $(ROOTXPG4PROG) $@ 977c478bd9Sstevel@tonic-gate 987c478bd9Sstevel@tonic-gateclean: 997c478bd9Sstevel@tonic-gate $(RM) $(OBJS) $(XPG4OBJS) 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gatelint: lint_SRCS 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gateinclude ../Makefile.targ 104