xref: /illumos-gate/usr/src/cmd/smserverd/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
29PROG =	rpc.smserverd
30OBJS =	smediad.o smediad_err.o myaudit.o smed_svc.o smed_xdr.o
31SRCS =	$(OBJS:%.o=%.c)
32lint := SRCS = smediad.c smediad_err.c myaudit.c
33
34MANIFEST=	smserver.xml
35
36DERIVED_FILES = smed.h smed_xdr.c smed_svc.c
37
38# install specifics
39
40ROOTLIBSMSERVERDIR= $(ROOTLIB)/smedia
41ROOTLIBSMSERVERD= $(PROG:%=$(ROOTLIBSMSERVERDIR)/%)
42
43include ../Makefile.cmd
44
45ROOTMANIFESTDIR=	$(ROOTSVCNETWORKRPC)
46$(ROOTMANIFEST)		:= FILEMODE= 444
47
48LDLIBS +=  -lnsl -lbsm
49
50CPPFLAGS += -D_REENTRANT
51CFLAGS += $(CCVERBOSE)
52LINTFLAGS += -u
53
54.KEEP_STATE:
55
56all: $(PROG)
57
58install: all $(ROOTLIBSMSERVERDIR) $(ROOTLIBSMSERVERD) $(ROOTMANIFEST)
59
60$(PROG):	$(DERIVED_FILES) $(OBJS)
61	$(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
62	$(POST_PROCESS)
63
64check:	$(CHKMANIFEST)
65
66clean:
67	$(RM) $(OBJS) $(DERIVED_FILES)
68
69lint:	smed.h lint_SRCS
70
71include ../Makefile.targ
72
73$(ROOTLIBSMSERVERDIR):
74	$(INS.dir)
75
76$(ROOTLIBSMSERVERDIR)/%: %
77	$(INS.file)
78
79#
80# Derived files
81#
82
83smed.h:	smed.x
84	$(RPCGEN) -C -h smed.x > $@
85
86smed_xdr.c: smed.x smed.h
87	$(RPCGEN) -c smed.x > $@
88
89smed_svc.c: smed.x
90	$(RPCGEN) -m smed.x > $@
91
92