xref: /titanic_44/usr/src/cmd/isns/isnsd/Makefile (revision 31979bfa048dcd2ef7f20d5f6afd58702333b725)
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
26PROG = isns
27
28DSRC = isns_provider.d
29DTRACE_HEADER = $(DSRC:%.d=%.h)
30
31COBJS	= main.o qry.o admintf.o dsapi.o log.o sched.o dseng.o scn.o cache.o
32COBJS	+= dump.o msgq.o server.o config.o esi.o obj.o utils.o dd.o func.o
33COBJS	+= pdu.o door.o htable.o
34OBJS	= $(COBJS) $(DSRC:%.d=%.o)
35SRCS	= $(COBJS:%.o=%.c)
36POFILE= isns.po
37POFILES	= $(COBJS:%.o=%.po)
38
39include ../../Makefile.cmd
40
41DATA_STORE	= xml
42XML_DIR		= xml_def
43ISNS_SVC	= $(XML_DIR)/isns_server.xml
44
45MANIFEST	= isns_server.xml
46ROOTMANIFESTDIR	= $(ROOTSVCNETWORK)
47$(ROOTSVCNETWORK)/isns_server.xml	:= OWNER = root
48$(ROOTSVCNETWORK)/isns_server.xml	:= GROUP = bin
49$(ROOTSVCNETWORK)/isns_server.xml	:= FILEMODE = 0444
50
51CFLAGS 		+=	$(CCVERBOSE)
52CPPFLAGS 	+= -I./ -I/usr/include/libxml2
53CPPFLAGS	+= -DTARGET_DATA_STORE=$(DATA_STORE)
54CPPFLAGS	+= -D_POSIX_PTHREAD_SEMANTICS
55LINTFLAGS += -xerroff=E_BAD_PTR_CAST_ALIGN
56LINTFLAGS += -xerroff=E_NAME_USED_NOT_DEF2
57LINTFLAGS += -xerroff=E_CASE_FALLTHRU
58
59obj.o := CERRWARN += -erroff=E_CONST_OBJ_SHOULD_HAVE_INITIZR
60obj.o := CERRWARN += -erroff=E_IMPLICIT_DECL_FUNC_RETURN_INT
61
62LDLIBS		+= -lsecdb -lsocket -lnsl -lscf -lxml2 -ldoor
63
64.KEEP_STATE:
65
66all:	$(PROG)
67
68$(PROG): $(OBJS)
69	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
70	$(POST_PROCESS)
71
72%.h: %.d
73	$(DTRACE) -xnolibs -h -s $< -o $@
74
75%.o:	%.c $(DTRACE_HEADER)
76	$(COMPILE.c) $<
77	$(POST_PROCESS_O)
78
79%.o:	%.d $(COBJS)
80	$(COMPILE.d) -xnolibs -s $< $(COBJS)
81	$(POST_PROCESS_O)
82
83clean:
84	$(RM) $(OBJS)
85
86lint:	lint_SRCS
87
88$(POFILE): $(POFILES)
89	$(RM) $@
90	$(CAT) $(POFILES) > $@
91
92check:	$(CHKMANIFEST)
93
94include ../../Makefile.targ
95
96install: all .WAIT $(ROOTUSRSBINPROG) $(ROOTMANIFEST)
97