xref: /titanic_50/usr/src/cmd/tar/Makefile (revision af3025fd013117424096c94bd9e116ecc538cc6b)
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 2007 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
41LAZYLIBS = $(ZLAZYLOAD) -ltsol $(ZNOLAZYLOAD)
42lint := LAZYLIBS = -ltsol
43LDLIBS += -lsec $(LAZYLIBS)
44
45CFLAGS += $(CCVERBOSE)
46
47# This flag is being added only for SCO (x86) compatibility
48CFLAGS += $(iBCS2FLAG)
49
50CPPFLAGS += -DEUC
51
52ROOTSYMLINK=	$(ROOTPROG)
53
54XGETFLAGS += -a -x tar.xcl
55
56.KEEP_STATE:
57
58all: $(PROG)
59
60install: all $(ROOTUSRSBINPROG) $(ROOTETCDEFAULTFILES) $(ROOTSYMLINK)
61	-$(RM) -r $(ROOTETCPROG)
62	-$(SYMLINK) ../usr/sbin/$(PROG) $(ROOTETCPROG)
63
64$(ROOTSYMLINK):
65	$(RM) $@; $(SYMLINK) ../sbin/$(PROG) $@
66
67$(PROG):	$(OBJS)
68	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
69	$(POST_PROCESS)
70
71%.o:	$(SRC)/common/util/%.c
72	$(COMPILE.c) $(OUTPUT_OPTION) $<
73	$(POST_PROCESS_O)
74
75clean:
76	$(RM) $(OBJS)
77
78lint:	lint_SRCS
79
80$(DCFILE):
81	$(RM) messages.po
82	$(XGETTEXT) -c TRANSLATION_NOTE -t $(PROG).c
83	$(SED) -e '/^domain/d' messages.po > $@
84	$(RM) messages.po
85
86include ../Makefile.targ
87