xref: /illumos-gate/usr/src/cmd/tar/Makefile (revision 3d63ea05cb8474d8036d3588cf8299306a994b8c)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
545916cd2Sjpk# Common Development and Distribution License (the "License").
645916cd2Sjpk# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate#
22*3d63ea05Sas145665# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
267c478bd9Sstevel@tonic-gate#
277c478bd9Sstevel@tonic-gate# cmd/tar/Makefile
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gatePROG= tar
30a7872406SmeemDEFAULTFILES= tar.dfl
31*3d63ea05Sas145665OBJS1=		tar.o
32*3d63ea05Sas145665OBJS=		$(OBJS1) getresponse.o
33*3d63ea05Sas145665SRCS=		$(OBJS1:%.o=%.c) $(SRC)/common/util/getresponse.c
347c478bd9Sstevel@tonic-gate
357c478bd9Sstevel@tonic-gateinclude ../Makefile.cmd
367c478bd9Sstevel@tonic-gate
37*3d63ea05Sas145665CPPFLAGS += -D_FILE_OFFSET_BITS=64 -I $(SRC)/common/util
387c478bd9Sstevel@tonic-gateDCFILE= $(PROG).dc
397c478bd9Sstevel@tonic-gate
40*3d63ea05Sas145665LINTFLAGS += -u
4145916cd2SjpkLAZYLIBS = $(ZLAZYLOAD) -ltsol $(ZNOLAZYLOAD)
4245916cd2Sjpklint := LAZYLIBS = -ltsol
4306e1a714SrafLDLIBS += -lsec $(LAZYLIBS)
447c478bd9Sstevel@tonic-gate
457c478bd9Sstevel@tonic-gateCFLAGS += $(CCVERBOSE)
467c478bd9Sstevel@tonic-gate
477c478bd9Sstevel@tonic-gate# This flag is being added only for SCO (x86) compatibility
487c478bd9Sstevel@tonic-gateCFLAGS += $(iBCS2FLAG)
497c478bd9Sstevel@tonic-gate
507c478bd9Sstevel@tonic-gateCPPFLAGS += -DEUC
517c478bd9Sstevel@tonic-gate
527c478bd9Sstevel@tonic-gateROOTSYMLINK=	$(ROOTPROG)
537c478bd9Sstevel@tonic-gate
547c478bd9Sstevel@tonic-gateXGETFLAGS += -a -x tar.xcl
557c478bd9Sstevel@tonic-gate
567c478bd9Sstevel@tonic-gate.KEEP_STATE:
577c478bd9Sstevel@tonic-gate
58a7872406Smeemall: $(PROG)
597c478bd9Sstevel@tonic-gate
60a7872406Smeeminstall: all $(ROOTUSRSBINPROG) $(ROOTETCDEFAULTFILES) $(ROOTSYMLINK)
617c478bd9Sstevel@tonic-gate	-$(RM) -r $(ROOTETCPROG)
627c478bd9Sstevel@tonic-gate	-$(SYMLINK) ../usr/sbin/$(PROG) $(ROOTETCPROG)
637c478bd9Sstevel@tonic-gate
647c478bd9Sstevel@tonic-gate$(ROOTSYMLINK):
657c478bd9Sstevel@tonic-gate	$(RM) $@; $(SYMLINK) ../sbin/$(PROG) $@
667c478bd9Sstevel@tonic-gate
67*3d63ea05Sas145665$(PROG):	$(OBJS)
68*3d63ea05Sas145665	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
69*3d63ea05Sas145665	$(POST_PROCESS)
707c478bd9Sstevel@tonic-gate
71*3d63ea05Sas145665%.o:	$(SRC)/common/util/%.c
72*3d63ea05Sas145665	$(COMPILE.c) $(OUTPUT_OPTION) $<
73*3d63ea05Sas145665	$(POST_PROCESS_O)
74*3d63ea05Sas145665
75*3d63ea05Sas145665clean:
76*3d63ea05Sas145665	$(RM) $(OBJS)
77*3d63ea05Sas145665
78*3d63ea05Sas145665lint:	lint_SRCS
797c478bd9Sstevel@tonic-gate
807c478bd9Sstevel@tonic-gate$(DCFILE):
817c478bd9Sstevel@tonic-gate	$(RM) messages.po
827c478bd9Sstevel@tonic-gate	$(XGETTEXT) -c TRANSLATION_NOTE -t $(PROG).c
837c478bd9Sstevel@tonic-gate	$(SED) -e '/^domain/d' messages.po > $@
847c478bd9Sstevel@tonic-gate	$(RM) messages.po
857c478bd9Sstevel@tonic-gate
867c478bd9Sstevel@tonic-gateinclude ../Makefile.targ
87