xref: /titanic_41/usr/src/lib/librdc/Makefile.com (revision b4820df85baba7ec3cfa9082d7579cf2349c2336)
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
53LINTSRC=	$(LINTLIB:%.ln=%)
54ROOTLINTDIR=	$(ROOTLIBDIR)
55ROOTLINT=	$(LINTSRC:%=$(ROOTLINTDIR)/%)
56
57CLEANFILES += 	$(LINTOUT) $(LINTLIB) $(LINTOUT_INTER) $(LINT_INTER)
58
59CPPFLAGS +=	-DBUILD_REV_STR='"5.11"'
60CFLAGS +=	-I..
61CFLAGS64 +=	-I..
62LDLIBS +=	-lsocket -lnsl -lnsctl -lc -lunistat -ldscfg
63
64$(LINTLIB) :=	SRCS = ../common/llib-lrdc
65$(LINTLIB) :=	LINTFLAGS = -nvx
66$(LINTLIB) :=	LINTFLAGS64 = -nvx
67
68$(LINT_INTER) :=	SRCS += ../common/llib-lrdc
69
70.KEEP_STATE:
71
72lint:		lintcheck $(LINTLIB)
73lintinter:	$(LINT_INTER)
74
75# include library targets
76include ../../Makefile.targ
77
78objs/%.o pics/%.o: ../common/%.c
79	$(COMPILE.c) -o $@ $<
80	$(POST_PROCESS_O)
81
82objs/rdc_ioctl.o pics/rdc_ioctl.o: ../../../cmd/avs/rdc/rdc_ioctl.c
83	$(COMPILE.c) -o $@ ../../../cmd/avs/rdc/rdc_ioctl.c
84	$(POST_PROCESS_O)
85
86# install rule for lint library target
87$(ROOTLINTDIR)/%:	../common/%
88	$(INS.file)
89