xref: /illumos-gate/usr/src/cmd/isns/isnsd/Makefile (revision 1e49577a7fcde812700ded04431b49d67cc57d6d)
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	:= FILEMODE = 0444
48
49CFLAGS 		+=	$(CCVERBOSE)
50CPPFLAGS 	+= -I./ -I/usr/include/libxml2
51CPPFLAGS	+= -DTARGET_DATA_STORE=$(DATA_STORE)
52CPPFLAGS	+= -D_POSIX_PTHREAD_SEMANTICS
53LINTFLAGS += -xerroff=E_BAD_PTR_CAST_ALIGN
54LINTFLAGS += -xerroff=E_NAME_USED_NOT_DEF2
55LINTFLAGS += -xerroff=E_CASE_FALLTHRU
56
57obj.o := CERRWARN += -erroff=E_CONST_OBJ_SHOULD_HAVE_INITIZR
58obj.o := CERRWARN += -erroff=E_IMPLICIT_DECL_FUNC_RETURN_INT
59
60LDLIBS		+= -lsecdb -lsocket -lnsl -lscf -lxml2
61
62.KEEP_STATE:
63
64all:	$(PROG)
65
66$(PROG): $(OBJS)
67	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
68	$(POST_PROCESS)
69
70%.h: %.d
71	$(DTRACE) -xnolibs -h -s $< -o $@
72
73%.o:	%.c $(DTRACE_HEADER)
74	$(COMPILE.c) $<
75	$(POST_PROCESS_O)
76
77%.o:	%.d $(COBJS)
78	$(COMPILE.d) -xnolibs -s $< $(COBJS)
79	$(POST_PROCESS_O)
80
81clean:
82	$(RM) $(OBJS)
83
84lint:	lint_SRCS
85
86$(POFILE): $(POFILES)
87	$(RM) $@
88	$(CAT) $(POFILES) > $@
89
90check:	$(CHKMANIFEST)
91
92include ../../Makefile.targ
93
94install: all .WAIT $(ROOTUSRSBINPROG) $(ROOTMANIFEST)
95