xref: /titanic_41/usr/src/cmd/login/Makefile (revision 02e56f3f1bfc8d9977bafb8cb5202f576dcded27)
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# ident	"%Z%%M%	%I%	%E% SMI"
24#
25# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
26# Use is subject to license terms.
27#
28
29PROG= login
30OBJS= login.o login_audit.o
31SRCS= $(OBJS:%.o=%.c)
32ONC_SRCS=$(SRCS:%.c=%.c_onc_plus)
33
34DEFAULTFILES= login.dfl
35
36include ../Makefile.cmd
37
38LOGINDEVPERM= logindevperm
39LOGINDEVPERMSRC= $(LOGINDEVPERM).sh
40ROOTLOGINDEVPERM= $(LOGINDEVPERM:%=$(ROOTETC)/%)
41
42$(ROOTLOGINDEVPERM) := FILEMODE = 644
43$(ROOTLOGINDEVPERM) := GROUP = sys
44FILEMODE= 4555
45OWNER= root
46
47CLOBBERFILES +=	$(LOGINDEVPERM) $(ONC_SRCS)
48
49CPPFLAGS +=	-DSYSV -DCONSOLE='"/dev/console"' -DSECURITY \
50		-D_FILE_OFFSET_BITS=64 -I$(SRC)/lib/pam_modules/krb5
51
52LDLIBS += -lcmd -lbsm -lpam -ldevinfo
53CFLAGS += $(CCVERBOSE)
54
55.KEEP_STATE:
56
57
58all: $(PROG) $(ROOTLOGINDEVPERM)
59
60$(LOGINDEVPERM): $(LOGINDEVPERMSRC)
61	$(RM) $(LOGINDEVPERM)
62	/bin/sh $(LOGINDEVPERMSRC) > $(LOGINDEVPERM)
63
64$(PROG): $(OBJS)
65	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
66	$(POST_PROCESS)
67
68install: all $(DIRS) $(ROOTPROG) $(ROOTETCDEFAULTFILES) $(ROOTLOGINDEVPERM)
69
70clean:
71	$(RM) $(OBJS)
72
73lint:	lint_SRCS
74
75include ../Makefile.targ
76
77# make ONC_PLUS using suffix rule
78#
79
80ONC_PLUS: $(ONC_SRCS)
81