xref: /illumos-gate/usr/src/lib/cfgadm_plugins/fp/Makefile.com (revision 91760536453132b0d3369ad5543622a5478007e6)
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
27LIBRARY= fp.a
28VERS= .1
29
30OBJECTS = cfga_fp.o cfga_rcm.o cfga_cs.o cfga_utils.o
31OBJECTS += cfga_cvt.o cfga_list.o cfga_rep.o
32
33# include library definitions
34include ../../../Makefile.lib
35
36SRCDIR =	../common
37ROOTLIBDIR=	$(ROOT)/usr/lib/cfgadm
38ROOTLIBDIR64=	$(ROOTLIBDIR)/$(MACH64)
39
40LIBS=	$(DYNLIB)
41
42LINTFLAGS +=	-DDEBUG
43LINTFLAGS64 +=	-DDEBUG
44
45CFLAGS +=	$(CCVERBOSE)
46CFLAGS64 +=	$(CCVERBOSE)
47
48CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS
49
50LINTFLAGS += -erroff=E_SEC_SPRINTF_UNBOUNDED_COPY
51LINTFLAGS += -erroff=E_FUNC_RET_MAYBE_IGNORED2
52LINTFLAGS += -erroff=E_FUNC_RET_ALWAYS_IGNOR2
53LINTFLAGS += -erroff=E_BAD_FORMAT_ARG_TYPE2
54LINTFLAGS += -erroff=E_SEC_CREAT_WITHOUT_MODE
55LINTFLAGS64 += $(LINTFLAGS)
56
57LDLIBS +=	-lc -ldevice -ldevinfo -lrcm
58LDLIBS +=	-lHBAAPI -lgen
59
60MANIFEST=	devices-fc-fabric.xml
61ROOTMANIFESTDIR=	$(ROOT)/var/svc/manifest/system/device
62ROOTMANIFEST=	$(MANIFEST:%=$(ROOTMANIFESTDIR)/%)
63$(ROOTMANIFEST)	:= FILEMODE= 444
64
65SVCMETHOD=	fc-fabric
66ROOTSVCMETHODDIR=	$(ROOT)/lib/svc/method
67ROOTSVCMETHOD=	$(SVCMETHOD:%=$(ROOTSVCMETHODDIR)/%)
68$(ROOTSVCMETHOD):= FILEMODE= 555
69
70.KEEP_STATE:
71
72all:	$(LIBS)
73
74lint:	lintcheck
75
76# Install rules
77
78$(ROOTLIBDIR)/%: % $(ROOTLIBDIR)
79	$(INS.file)
80
81$(ROOTLIBDIR64)/%: % $(ROOTLIBDIR64)
82	$(INS.file)
83
84$(ROOTLIBDIR) $(ROOTLIBDIR64):
85	$(INS.dir)
86
87$(ROOTMANIFESTDIR)/%: ../common/% $(ROOTMANIFESTDIR)
88	$(INS.file)
89
90$(ROOTSVCMETHODDIR)/%: ../common/% $(ROOTSVCMETHODDIR)
91	$(INS.file)
92
93$(ROOTSVCMETHODDIR) $(ROOTMANIFESTDIR):
94	$(INS.dir)
95
96# include library targets
97include ../../../Makefile.targ
98
99objs/%.o pics/%.o: ../common/%.c
100	$(COMPILE.c) -o $@ $<
101	$(POST_PROCESS_O)
102