xref: /titanic_41/usr/src/cmd/dcs/sparc/sun4u/Makefile (revision 5fbb41393be5d63f75952b1d72d4df2642d22557)
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 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27# Makefile definitions for Domain Configuration Server (DCS)
28#
29
30MANIFEST=	dcs.xml
31
32include ../../../Makefile.cmd
33include ../../../../Makefile.psm
34
35PROG=		dcs
36
37CLASS=		32
38
39PLATFORM=	sun4u
40
41SVCMETHOD=	svc-$(PROG)
42
43#
44# Set CONCURR_MODE to one of the following:
45#
46#	MULTI_THR  - multiple threads with _no_ i18n support*
47#	MULTI_PROC - multiple processes with i18n support
48#
49# * Currently, there is no per thread locale support in Solaris.
50#   Thus, multiple processes is the only way to fully support i18n.
51#
52CONCURR_MODE=	MULTI_PROC
53
54SRCS=		dcs.c \
55		dcs_ses.c \
56		dcs_msg.c \
57		rdr_messages.c \
58		rsrc_info.c \
59		ri_init.c
60
61HDRS=		dcs.h \
62		rdr_messages.h \
63		rdr_param_types.h \
64		remote_cfg.h \
65		rsrc_info.h \
66		rsrc_info_impl.h \
67		$(USR_PSM_ISYS_DIR)/sbd_ioctl.h
68
69OBJS=		$(SRCS:%.c=%.o)
70
71LINT_SRCS=	$(SRCS)
72LINT_FILES=	$(LINT_SRCS:%.c=%.ln)
73
74POFILES=	dcs_msg.po
75
76$(ROOTLIBPROG) :=	FILEMODE=	0755
77$(ROOTLIBPROG) :=	OWNER=		root
78$(ROOTLIBPROG) :=	GROUP=		bin
79
80ROOTMANIFESTDIR=	$(ROOTSVCPLATFORMSUN4U)
81
82#
83# FLAGS:
84#
85MULTI_THR_FLAGS=	-D_REENTRANT -DDCS_MULTI_THREAD
86
87MULTI_PROC_FLAGS=	-D__EXTENSIONS__
88
89CPPFLAGS= 	-I$(USR_PSM_INCL_DIR) $(CPPFLAGS.master) \
90		$($(CONCURR_MODE)_FLAGS)
91
92LINT_FLAGS=	-c -Nlevel=4 -Ncheck $($(CONCURR_MODE)_FLAGS)
93
94XGETFLAGS +=	-a -s -x $(PROG).xcl
95
96
97#
98# LIBRARIES:
99#
100MULTI_THR_LIBS=		-D_REENTRANT
101
102MULTI_PROC_LIBS=
103
104LDLIBS +=	$($(CONCURR_MODE)_LIBS) \
105		-lsocket \
106		-lcfgadm \
107		-ldevinfo \
108		-lrcm \
109		-lnvpair \
110		-lkstat
111
112.KEEP_STATE:
113
114
115all: $(PROG)
116
117$(PROG): $(OBJS) $(HDRS)
118	$(CC) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
119	$(POST_PROCESS)
120
121install: all .WAIT $(ROOTLIBPROG) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
122
123check:	$(CHKMANIFEST)
124
125lint:
126	$(LINT) $(LINT_FLAGS) $(CPPFLAGS) $(LINT_SRCS)
127
128clean:
129	$(RM) $(PROG) $(OBJS) $(LINT_FILES) $(POFILES) $(POFILE) core
130
131$(POFILE): $(POFILES)
132	$(RM) $(POFILE)
133	cat $(POFILES) > $(POFILE)
134
135include ../../../Makefile.targ
136include ../../../../Makefile.psm.targ
137