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 
  26 include ../../../Makefile.cmd
  27 
  28 COMMON = ..
  29 
  30 PROG=           sharectl
  31 
  32 SHARECTL_MOD    = sharectl
  33 
  34 SHARECTL_SRC    = $(SHARECTL_MOD:%=$(COMMON)/%.c) shareutil.c
  35 
  36 SHARECTL_OBJ    = $(SHARECTL_MOD:%=%.o) shareutil.o
  37 
  38 
  39 MYCPPFLAGS =    -I.. -I../../sharemgr
  40 CPPFLAGS += $(MYCPPFLAGS)
  41 LDLIBS += -lshare -lumem
  42 
  43 CERRWARN += $(CNOWARN_UNINIT)
  44 
  45 SRCS = $(SHARECTL_SRC)
  46 OBJS = $(SHARECTL_OBJ)
  47 MODS = $(SHARECTL_MOD)
  48 
  49 CLOBBERFILES = $(MODS) $(POFILE) $(POFILES) shareutil.c
  50 
  51 POFILES = $(SHARECTL_SRC:.c=.po)
  52 POFILE  = sharectl.po
  53 
  54 all :=          TARGET= all
  55 install :=      TARGET= install
  56 clean :=        TARGET= clean
  57 clobber :=      TARGET= clobber
  58 lint :=         TARGET= lint
  59 _msg:=          TARGET= catalog
  60 
  61 .KEEP_STATE:
  62 
  63 all: $(MODS)
  64 
  65 catalog: $(POFILE)
  66 
  67 $(PROG): $(OBJS)
  68         $(LINK.c) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
  69         $(POST_PROCESS)
  70 
  71 install: all $(ROOTUSRSBINPROG)
  72 
  73 lint:   $(SHARECTL_MOD).ln $(SHARECTL_SRC:.c=.ln)
  74 
  75 clean:
  76         $(RM) $(OBJS)
  77 
  78 %.ln: FRC
  79         $(LINT.c) $(SHARECTL_SRC) $(LDLIBS)
  80 
  81 include ../../../Makefile.targ
  82 
  83 $(POFILE):      $(POFILES)
  84         $(RM) $@; cat $(POFILES) > $@
  85 
  86 %.o: $(COMMON)/%.c
  87         $(COMPILE.c) -o $@ $<
  88 
  89 shareutil.c: ../../sharemgr/shareutil.c
  90         $(CP) -f ../../sharemgr/shareutil.c shareutil.c
  91 
  92 FRC: