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 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  22 # Use is subject to license terms.
  23 #
  24 # Makefile for cmd/man/src
  25 #
  26 
  27 include         ../../Makefile.cmd
  28 
  29 BINPROG =       man
  30 LIBPROG =       getNAME
  31 LIBSHELL =      makewhatis
  32 LNKPROG =       catman apropos whatis
  33 
  34 PROG =          $(BINPROG) $(LIBPROG)
  35 
  36 SRCS =          man.c getNAME.c
  37 
  38 SHSRCS =        makewhatis.sh
  39 
  40 OBJS =          $(SRCS:%.c=%.o)
  41 
  42 
  43 CLOBBERFILES += $(LNKPROG) $(LIBSHELL)
  44 
  45 ROOTPROG =      $(BINPROG:%=$(ROOTBIN)/%)
  46 ROOTLIBPROG =   $(LIBPROG:%=$(ROOTLIB)/%)
  47 ROOTLIBSHELL =  $(LIBSHELL:%=$(ROOTLIB)/%)
  48 ROOTLNKPROG =   $(LNKPROG:%=$(ROOTBIN)/%)
  49 
  50 CERRWARN += -_gcc=-Wno-implicit-function-declaration
  51 CERRWARN += -_gcc=-Wno-uninitialized
  52 CERRWARN += -_gcc=-Wno-unused-variable
  53 
  54 # for messaging catalog files
  55 POFILE= src.po
  56 POFILES= $(SRCS:%.c=%.po)
  57 
  58 .KEEP_STATE :
  59 
  60 all :           $(PROG) $(LIBSHELL) $(LNKPROG)
  61 
  62 makewhatis :    $$@.sh
  63                 cat $@.sh > $@
  64 
  65 install :       all $(ROOTPROG) $(ROOTLIBPROG)  \
  66                 $(ROOTLIBSHELL) $(ROOTLNKPROG)
  67 
  68 $(ROOTLNKPROG) :        $(ROOTBIN)/man
  69                 -$(RM) $@; $(LN) $(ROOTBIN)/man $@
  70 
  71 $(LNKPROG) :    man
  72                 -$(RM) $@; $(LN) man $@
  73 
  74 catalog:        $(POFILE)
  75 
  76 $(POFILE):      $(POFILES)
  77         $(RM)   $@
  78         cat     $(POFILES)      > $@
  79 
  80 
  81 clean :
  82 
  83 strip :
  84                 $(STRIP) $(PROG)
  85 
  86 lint :          lint_SRCS
  87 
  88 include         ../../Makefile.targ