xref: /illumos-gate/usr/src/cmd/isns/isnsd/Makefile (revision e9344627fd9b13a2a1fe91a37a88c0edbc4e5191)
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# Copyright (c) 2018, Joyent, Inc.
29# Copyright 2025 OmniOS Community Edition (OmniOSce) Association.
30#
31
32PROG = isns
33
34DSRC = isns_provider.d
35DTRACE_HEADER = $(DSRC:%.d=%.h)
36
37COBJS	= main.o qry.o admintf.o dsapi.o log.o sched.o dseng.o scn.o cache.o
38COBJS	+= dump.o msgq.o server.o config.o esi.o obj.o utils.o dd.o func.o
39COBJS	+= pdu.o door.o htable.o
40OBJS	= $(COBJS) $(DSRC:%.d=%.o)
41POFILE= isns.po
42POFILES	= $(COBJS:%.o=%.po)
43
44include ../../Makefile.cmd
45include ../../Makefile.ctf
46
47CTF_MODE = link
48
49DATA_STORE	= xml
50XML_DIR		= xml_def
51ISNS_SVC	= $(XML_DIR)/isns_server.xml
52
53MANIFEST	= isns_server.xml
54ROOTMANIFESTDIR	= $(ROOTSVCNETWORK)
55$(ROOTSVCNETWORK)/isns_server.xml	:= FILEMODE = 0444
56
57CFLAGS		+=	$(CCVERBOSE)
58CPPFLAGS	+= -I./ -I$(ADJUNCT_PROTO)/usr/include/libxml2
59CPPFLAGS	+= -DTARGET_DATA_STORE=$(DATA_STORE)
60CPPFLAGS	+= -D_POSIX_PTHREAD_SEMANTICS
61
62CERRWARN += -_gcc=-Wno-char-subscripts
63CERRWARN += -_gcc=-Wno-ignored-qualifiers
64CERRWARN += $(CNOWARN_UNINIT)
65CERRWARN += -_gcc=-Wno-implicit-function-declaration
66
67# not linted
68SMATCH=off
69
70CLOBBERFILES += $(DTRACE_HEADER)
71
72LDLIBS		+= -lsecdb -lsocket -lnsl -lscf -lxml2
73NATIVE_LIBS	+= libxml2.so
74
75.KEEP_STATE:
76
77all:	$(PROG)
78
79$(PROG): $(OBJS)
80	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
81	$(POST_PROCESS)
82
83%.h: %.d
84	$(DTRACE) -h -s $< -o $@
85
86%.o:	%.c $(DTRACE_HEADER)
87	$(COMPILE.c) $<
88	$(POST_PROCESS_O)
89
90%.o:	%.d $(COBJS)
91	$(COMPILE.d) -s $< $(COBJS)
92	$(POST_PROCESS_O)
93
94clean:
95	$(RM) $(OBJS)
96
97$(POFILES): $(DTRACE_HEADER)
98
99$(POFILE): $(POFILES)
100	$(RM) $@
101	$(CAT) $(POFILES) > $@
102
103check:	$(CHKMANIFEST)
104
105include ../../Makefile.targ
106
107install: all .WAIT $(ROOTUSRSBINPROG) $(ROOTMANIFEST)
108