xref: /illumos-gate/usr/src/cmd/dcs/sparc/sun4u/Makefile (revision fb3fb4f3d76d55b64440afd0af72775dfad3bd1d)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28# Makefile definitions for Domain Configuration Server (DCS)
29#
30
31MANIFEST=	dcs.xml
32
33include ../../../Makefile.cmd
34include ../../../../Makefile.psm
35
36PROG=		dcs
37
38CLASS=		32
39
40PLATFORM=	sun4u
41
42SVCMETHOD=	svc-$(PROG)
43
44#
45# Set CONCURR_MODE to one of the following:
46#
47#	MULTI_THR  - multiple threads with _no_ i18n support*
48#	MULTI_PROC - multiple processes with i18n support
49#
50# * Currently, there is no per thread locale support in Solaris.
51#   Thus, multiple processes is the only way to fully support i18n.
52#
53CONCURR_MODE=	MULTI_PROC
54
55SRCS=		dcs.c \
56		dcs_ses.c \
57		dcs_msg.c \
58		rdr_messages.c \
59		rsrc_info.c \
60		ri_init.c
61
62HDRS=		dcs.h \
63		rdr_messages.h \
64		rdr_param_types.h \
65		remote_cfg.h \
66		rsrc_info.h \
67		rsrc_info_impl.h \
68		$(USR_PSM_ISYS_DIR)/sbd_ioctl.h
69
70OBJS=		$(SRCS:%.c=%.o)
71
72LINT_SRCS=	$(SRCS)
73LINT_FILES=	$(LINT_SRCS:%.c=%.ln)
74
75POFILES=	dcs_msg.po
76
77FILEMODE=	0755
78OWNER=		root
79GROUP=		bin
80
81ROOTMANIFESTDIR=	$(ROOTSVCPLATFORMSUN4U)
82$(ROOTMANIFEST)		:= FILEMODE= 444
83$(ROOTSVCMETHOD)	:= FILEMODE= 555
84
85#
86# FLAGS:
87#
88MULTI_THR_FLAGS=	-D_REENTRANT -DDCS_MULTI_THREAD
89
90MULTI_PROC_FLAGS=	-D__EXTENSIONS__
91
92CPPFLAGS= 	-I$(USR_PSM_INCL_DIR) $(CPPFLAGS.master) \
93		$($(CONCURR_MODE)_FLAGS)
94
95LINT_FLAGS=	-c -Nlevel=4 -Ncheck $($(CONCURR_MODE)_FLAGS)
96
97XGETFLAGS +=	-a -s -x $(PROG).xcl
98
99
100#
101# LIBRARIES:
102#
103MULTI_THR_LIBS=		-D_REENTRANT
104
105MULTI_PROC_LIBS=
106
107LDLIBS +=	$($(CONCURR_MODE)_LIBS) \
108		-lsocket \
109		-lcfgadm \
110		-ldevinfo \
111		-lrcm \
112		-lnvpair \
113		-lkstat
114
115.KEEP_STATE:
116
117
118all: $(PROG)
119
120$(PROG): $(OBJS) $(HDRS)
121	$(CC) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
122	$(POST_PROCESS)
123
124install: all .WAIT $(ROOTLIBPROG) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
125
126check:	$(CHKMANIFEST)
127
128lint:
129	$(LINT) $(LINT_FLAGS) $(CPPFLAGS) $(LINT_SRCS)
130
131clean:
132	$(RM) $(PROG) $(OBJS) $(LINT_FILES) $(POFILES) $(POFILE) core
133
134$(POFILE): $(POFILES)
135	$(RM) $(POFILE)
136	cat $(POFILES) > $(POFILE)
137
138include ../../../Makefile.targ
139include ../../../../Makefile.psm.targ
140