xref: /illumos-gate/usr/src/cmd/isns/isnsd/Makefile (revision 694c35faa87b858ecdadfe4fc592615f4eefbb07)
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 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26#
27# Copyright (c) 2012 by Delphix. All rights reserved.
28#
29
30PROG = isns
31
32DSRC = isns_provider.d
33DTRACE_HEADER = $(DSRC:%.d=%.h)
34
35COBJS	= main.o qry.o admintf.o dsapi.o log.o sched.o dseng.o scn.o cache.o
36COBJS	+= dump.o msgq.o server.o config.o esi.o obj.o utils.o dd.o func.o
37COBJS	+= pdu.o door.o htable.o
38OBJS	= $(COBJS) $(DSRC:%.d=%.o)
39SRCS	= $(COBJS:%.o=%.c)
40POFILE= isns.po
41POFILES	= $(COBJS:%.o=%.po)
42
43include ../../Makefile.cmd
44
45DATA_STORE	= xml
46XML_DIR		= xml_def
47ISNS_SVC	= $(XML_DIR)/isns_server.xml
48
49MANIFEST	= isns_server.xml
50ROOTMANIFESTDIR	= $(ROOTSVCNETWORK)
51$(ROOTSVCNETWORK)/isns_server.xml	:= FILEMODE = 0444
52
53CFLAGS 		+=	$(CCVERBOSE)
54CPPFLAGS 	+= -I./ -I/usr/include/libxml2
55CPPFLAGS	+= -DTARGET_DATA_STORE=$(DATA_STORE)
56CPPFLAGS	+= -D_POSIX_PTHREAD_SEMANTICS
57LINTFLAGS += -xerroff=E_BAD_PTR_CAST_ALIGN
58LINTFLAGS += -xerroff=E_NAME_USED_NOT_DEF2
59LINTFLAGS += -xerroff=E_CASE_FALLTHRU
60
61CERRWARN += -_gcc=-Wno-char-subscripts
62CERRWARN += -_gcc=-Wno-ignored-qualifiers
63CERRWARN += -_gcc=-Wno-uninitialized
64CERRWARN += -_gcc=-Wno-implicit-function-declaration
65
66obj.o := CERRWARN += -erroff=E_CONST_OBJ_SHOULD_HAVE_INITIZR
67obj.o := CERRWARN += -erroff=E_IMPLICIT_DECL_FUNC_RETURN_INT
68
69LDLIBS		+= -lsecdb -lsocket -lnsl -lscf -lxml2
70
71.KEEP_STATE:
72
73all:	$(PROG)
74
75$(PROG): $(OBJS)
76	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
77	$(POST_PROCESS)
78
79%.h: %.d
80	$(DTRACE) -h -s $< -o $@
81
82%.o:	%.c $(DTRACE_HEADER)
83	$(COMPILE.c) $<
84	$(POST_PROCESS_O)
85
86%.o:	%.d $(COBJS)
87	$(COMPILE.d) -s $< $(COBJS)
88	$(POST_PROCESS_O)
89
90clean:
91	$(RM) $(OBJS)
92
93lint:	lint_SRCS
94
95$(POFILE): $(POFILES)
96	$(RM) $@
97	$(CAT) $(POFILES) > $@
98
99check:	$(CHKMANIFEST)
100
101include ../../Makefile.targ
102
103install: all .WAIT $(ROOTUSRSBINPROG) $(ROOTMANIFEST)
104