xref: /illumos-gate/usr/src/cmd/tar/Makefile (revision 63c99f9316851ebfab1e6d91ff1807739e55bd5b)
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# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27# cmd/tar/Makefile
28
29PROG= tar
30DEFAULTFILES= tar.dfl
31OBJS1=		tar.o
32OBJS=		$(OBJS1) getresponse.o
33SRCS=		$(OBJS1:%.o=%.c) $(SRC)/common/util/getresponse.c
34
35include ../Makefile.cmd
36
37CPPFLAGS += -D_FILE_OFFSET_BITS=64 -I $(SRC)/common/util
38DCFILE= $(PROG).dc
39
40LINTFLAGS += -u
41LDLIBS += -lsec -lcmdutils -lnvpair -ltsol
42
43CFLAGS += $(CCVERBOSE)
44
45# This flag is being added only for SCO (x86) compatibility
46CFLAGS += $(iBCS2FLAG)
47
48CPPFLAGS += -DEUC
49
50ROOTSYMLINK=	$(ROOTPROG)
51
52XGETFLAGS += -a -x tar.xcl
53
54.KEEP_STATE:
55
56all: $(PROG)
57
58install: all $(ROOTUSRSBINPROG) $(ROOTETCDEFAULTFILES) $(ROOTSYMLINK)
59	-$(RM) -r $(ROOTETCPROG)
60	-$(SYMLINK) ../usr/sbin/$(PROG) $(ROOTETCPROG)
61
62$(ROOTSYMLINK):
63	$(RM) $@; $(SYMLINK) ../sbin/$(PROG) $@
64
65$(PROG):	$(OBJS)
66	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
67	$(POST_PROCESS)
68
69%.o:	$(SRC)/common/util/%.c
70	$(COMPILE.c) $(OUTPUT_OPTION) $<
71	$(POST_PROCESS_O)
72
73clean:
74	$(RM) $(OBJS)
75
76lint:	lint_SRCS
77
78$(DCFILE):
79	$(RM) messages.po
80	$(XGETTEXT) -c TRANSLATION_NOTE -t $(PROG).c
81	$(SED) -e '/^domain/d' messages.po > $@
82	$(RM) messages.po
83
84include ../Makefile.targ
85