xref: /titanic_52/usr/src/cmd/sckmd/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 Sun Fire 15000 Key Management Daemon (sckmd)
29#
30
31PROG=		sckmd
32
33PLATFORM=	SUNW,Sun-Fire-15000
34
35CLASS=		32
36
37SRCS=		$(PROG:%=%.c)
38
39OBJS=		$(SRCS:%.c=%.o)
40
41LINT_SRCS=	$(SRCS)
42LINT_FILES=	$(LINT_SRCS:%.c=%.ln)
43
44
45include ../../../Makefile.cmd
46include ../../../../Makefile.psm
47
48
49OWNER=		root
50GROUP=		sys
51
52USRPSMPROG=	$(USR_PSM_LIB_DIR)/$(PROG)
53$(USRPSMPROG) :=	FILEMODE =	0755
54
55
56#
57# FLAGS:
58#
59CPPFLAGS= 	-I$(USR_PSM_INCL_DIR) -I$(SRC)/uts/sun4u/starcat $(CPPFLAGS.master)
60
61LINT_FLAGS=	-c -Nlevel=4 -Ncheck
62
63
64#
65# LIBRARIES:
66#
67LDLIBS +=	-lsocket -lipsecutil
68
69
70#
71# Definitions for building init scripts
72#
73SHPROG =		sckm
74SHPROG_STARTPRIO =	70
75SHPROG_KILLPRIO =	42
76
77ROOTINIT_D =		$(ROOTETC)/init.d
78ROOTRC0_D =		$(ROOTETC)/rc0.d
79ROOTRCS_D =		$(ROOTETC)/rcS.d
80ROOTRC1_D =		$(ROOTETC)/rc1.d
81ROOTRC2_D =		$(ROOTETC)/rc2.d
82
83ROOTINIT_D_SHPROG =	$(ROOTINIT_D)/$(SHPROG)
84ROOTRCLINKS =		$(ROOTRC0_D)/K$(SHPROG_KILLPRIO)$(SHPROG) \
85			$(ROOTRCS_D)/K$(SHPROG_KILLPRIO)$(SHPROG) \
86			$(ROOTRC1_D)/K$(SHPROG_KILLPRIO)$(SHPROG) \
87			$(ROOTRC2_D)/S$(SHPROG_STARTPRIO)$(SHPROG)
88
89$(ROOTINIT_D_SHPROG) $(ROOTRCLINKS) :=	FILEMODE =	744
90
91
92#
93# Build rules
94#
95.KEEP_STATE:
96
97
98all: $(PROG) $(SHPROG)
99
100$(PROG): $(OBJS)
101	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
102	$(POST_PROCESS)
103
104install: all .WAIT $(USRPSMPROG) $(ROOTINIT_D_SHPROG) $(ROOTRCLINKS)
105
106lint:
107	$(LINT) $(LINT_FLAGS) $(CPPFLAGS) $(LINT_SRCS)
108
109clean:
110	$(RM) $(PROG) $(SHPROG) $(OBJS) *.po $(LINT_FILES) core
111
112
113#
114# Build rules for init scripts
115#
116$(ROOTINIT_D)/%: %
117	$(INS.file)
118
119$(ROOTRCLINKS): $(ROOTINIT_D_SHPROG)
120	$(RM) $@; $(LN) $(ROOTINIT_D_SHPROG) $@
121
122
123include ../../../Makefile.targ
124include ../../../../Makefile.psm.targ
125