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