Home | History | Annotate | Download | only in tar
      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 
     29 PROG= tar
     30 DEFAULTFILES= tar.dfl
     31 OBJS1=		tar.o
     32 OBJS=		$(OBJS1) getresponse.o
     33 SRCS=		$(OBJS1:%.o=%.c) $(SRC)/common/util/getresponse.c
     34 
     35 include ../Makefile.cmd
     36 
     37 CPPFLAGS += -D_FILE_OFFSET_BITS=64 -I $(SRC)/common/util
     38 DCFILE= $(PROG).dc
     39 
     40 LINTFLAGS += -u
     41 LDLIBS += -lsec -lcmdutils -lnvpair -ltsol
     42 
     43 CFLAGS += $(CCVERBOSE)
     44 
     45 # This flag is being added only for SCO (x86) compatibility  
     46 CFLAGS += $(iBCS2FLAG)
     47 
     48 CPPFLAGS += -DEUC
     49 
     50 ROOTSYMLINK=	$(ROOTPROG)
     51 
     52 XGETFLAGS += -a -x tar.xcl
     53 
     54 .KEEP_STATE:
     55 
     56 all: $(PROG)
     57 
     58 install: 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 
     73 clean:
     74 	$(RM) $(OBJS)   
     75 
     76 lint:	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 
     84 include ../Makefile.targ
     85