1 # CDDL HEADER START
   2 #
   3 # The contents of this file are subject to the terms of the
   4 # Common Development and Distribution License (the "License").
   5 # You may not use this file except in compliance with the License.
   6 #
   7 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   8 # or http://www.opensolaris.org/os/licensing.
   9 # See the License for the specific language governing permissions
  10 # and limitations under the License.
  11 #
  12 # When distributing Covered Code, include this CDDL HEADER in each
  13 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  14 # If applicable, add the following below this CDDL HEADER, with the
  15 # fields enclosed by brackets "[]" replaced with your own identifying
  16 # information: Portions Copyright [yyyy] [name of copyright owner]
  17 #
  18 # CDDL HEADER END
  19 #
  20 #
  21 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  22 # Use is subject to license terms.
  23 #
  24 # lib/librdc/Makefile.com
  25 
  26 LIBRARY= librdc.a
  27 VERS= .1
  28 
  29 OBJECTS= netaddrs.o rdcerr.o rdcconfig.o rdc_ioctl.o rdcpersist.o rdcrules.o
  30 
  31 # include library definitions
  32 include ../../Makefile.lib
  33 
  34 SRCS= ../common/*.c ../../../cmd/avs/rdc/rdc_ioctl.c 
  35 SRCDIR= ../common
  36 
  37 LIBS +=         $(DYNLIB) $(LINTLIB)
  38 
  39 # definitions for lint
  40 
  41 LINTFLAGS       += -u -I.. -DDEBUG
  42 LINTFLAGS       += -erroff=E_FUNC_SET_NOT_USED
  43 LINTFLAGS       += -erroff=E_STATIC_UNUSED
  44 LINTFLAGS       += -erroff=E_SEC_PRINTF_VAR_FMT
  45 LINTFLAGS       += -erroff=E_SEC_SCANF_UNBOUNDED_COPY
  46 LINTFLAGS       += -erroff=E_FUNC_RET_ALWAYS_IGNOR2
  47 LINTFLAGS       += -erroff=E_FUNC_RET_MAYBE_IGNORED2
  48 LINTFLAGS       += -erroff=E_INCONS_VAL_TYPE_DECL2
  49 LINTFLAGS       += -erroff=E_BAD_FORMAT_ARG_TYPE2
  50 LINTOUT=        lint.out
  51 LINTOUT_INTER=  lintinter.out
  52 
  53 CERRWARN        += -_gcc=-Wno-parentheses
  54 CERRWARN        += -_gcc=-Wno-unused-variable
  55 CERRWARN        += -_gcc=-Wno-address
  56 
  57 LINTSRC=        $(LINTLIB:%.ln=%)
  58 ROOTLINTDIR=    $(ROOTLIBDIR)
  59 ROOTLINT=       $(LINTSRC:%=$(ROOTLINTDIR)/%)
  60 
  61 CLEANFILES +=   $(LINTOUT) $(LINTLIB) $(LINTOUT_INTER) $(LINT_INTER)
  62 
  63 CPPFLAGS +=     -DBUILD_REV_STR='"5.11"'
  64 CFLAGS +=       -I..
  65 CFLAGS64 +=     -I..
  66 LDLIBS +=       -lsocket -lnsl -lnsctl -lc -lunistat -ldscfg
  67 
  68 $(LINTLIB) :=   SRCS = ../common/llib-lrdc
  69 $(LINTLIB) :=   LINTFLAGS = -nvx
  70 $(LINTLIB) :=   LINTFLAGS64 = -nvx
  71 
  72 $(LINT_INTER) :=        SRCS += ../common/llib-lrdc
  73 
  74 .KEEP_STATE:
  75 
  76 lint:           lintcheck $(LINTLIB)
  77 lintinter:      $(LINT_INTER)
  78 
  79 # include library targets
  80 include ../../Makefile.targ
  81 
  82 objs/%.o pics/%.o: ../common/%.c
  83         $(COMPILE.c) -o $@ $<
  84         $(POST_PROCESS_O)
  85 
  86 objs/rdc_ioctl.o pics/rdc_ioctl.o: ../../../cmd/avs/rdc/rdc_ioctl.c
  87         $(COMPILE.c) -o $@ ../../../cmd/avs/rdc/rdc_ioctl.c
  88         $(POST_PROCESS_O)
  89 
  90 # install rule for lint library target
  91 $(ROOTLINTDIR)/%:       ../common/%
  92         $(INS.file)