xref: /titanic_51/usr/src/cmd/dcs/sparc/sun4u/Makefile (revision bdfc6d18da790deeec2e0eb09c625902defe2498)
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 2004 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
42#
43# Set CONCURR_MODE to one of the following:
44#
45#	MULTI_THR  - multiple threads with _no_ i18n support*
46#	MULTI_PROC - multiple processes with i18n support
47#
48# * Currently, there is no per thread locale support in Solaris.
49#   Thus, multiple processes is the only way to fully support i18n.
50#
51CONCURR_MODE=	MULTI_PROC
52
53SRCS=		dcs.c \
54		dcs_ses.c \
55		dcs_msg.c \
56		rdr_messages.c \
57		rsrc_info.c \
58		ri_init.c
59
60HDRS=		dcs.h \
61		rdr_messages.h \
62		rdr_param_types.h \
63		remote_cfg.h \
64		rsrc_info.h \
65		rsrc_info_impl.h \
66		$(USR_PSM_ISYS_DIR)/sbd_ioctl.h
67
68OBJS=		$(SRCS:%.c=%.o)
69
70LINT_SRCS=	$(SRCS)
71LINT_FILES=	$(LINT_SRCS:%.c=%.ln)
72
73POFILES=	dcs_msg.po
74
75FILEMODE=	0755
76OWNER=		root
77GROUP=		bin
78
79ROOTMANIFESTDIR=	$(ROOTSVCPLATFORMSUN4U)
80$(ROOTMANIFEST)		:= FILEMODE= 444
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)
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