xref: /titanic_51/usr/src/lib/librdc/Makefile.com (revision da4badc008f69df74f592b0831d92baa6dfcee76)
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
26LIBRARY= librdc.a
27VERS= .1
28
29OBJECTS= netaddrs.o rdcerr.o rdcconfig.o rdc_ioctl.o rdcpersist.o rdcrules.o
30
31# include library definitions
32include ../../Makefile.lib
33
34SRCS= ../common/*.c ../../../cmd/avs/rdc/rdc_ioctl.c
35SRCDIR= ../common
36
37LIBS +=		$(DYNLIB) $(LINTLIB)
38
39# definitions for lint
40
41LINTFLAGS	+= -u -I.. -DDEBUG
42LINTFLAGS	+= -erroff=E_FUNC_SET_NOT_USED
43LINTFLAGS	+= -erroff=E_STATIC_UNUSED
44LINTFLAGS	+= -erroff=E_SEC_PRINTF_VAR_FMT
45LINTFLAGS	+= -erroff=E_SEC_SCANF_UNBOUNDED_COPY
46LINTFLAGS	+= -erroff=E_FUNC_RET_ALWAYS_IGNOR2
47LINTFLAGS	+= -erroff=E_FUNC_RET_MAYBE_IGNORED2
48LINTFLAGS	+= -erroff=E_INCONS_VAL_TYPE_DECL2
49LINTFLAGS	+= -erroff=E_BAD_FORMAT_ARG_TYPE2
50LINTOUT=	lint.out
51LINTOUT_INTER=	lintinter.out
52
53CERRWARN	+= -_gcc=-Wno-parentheses
54CERRWARN	+= -_gcc=-Wno-unused-variable
55CERRWARN	+= -_gcc=-Wno-address
56
57LINTSRC=	$(LINTLIB:%.ln=%)
58ROOTLINTDIR=	$(ROOTLIBDIR)
59ROOTLINT=	$(LINTSRC:%=$(ROOTLINTDIR)/%)
60
61CLEANFILES += 	$(LINTOUT) $(LINTLIB) $(LINTOUT_INTER) $(LINT_INTER)
62
63CPPFLAGS +=	-DBUILD_REV_STR='"5.11"'
64CFLAGS +=	-I..
65CFLAGS64 +=	-I..
66LDLIBS +=	-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
76lint:		lintcheck $(LINTLIB)
77lintinter:	$(LINT_INTER)
78
79# include library targets
80include ../../Makefile.targ
81
82objs/%.o pics/%.o: ../common/%.c
83	$(COMPILE.c) -o $@ $<
84	$(POST_PROCESS_O)
85
86objs/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)
93