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 2004 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 34include ../Makefile.cmd 35 36DFLTD= $(ROOTETC)/default 37DIRS= $(DFLTD) 38LOGINDEVPERM= logindevperm 39LOGINDEVPERMSRC= $(LOGINDEVPERM).sh 40ROOTLOGINDEVPERM= $(LOGINDEVPERM:%=$(ROOTETC)/%) 41 42ETCDFLTPROG = $(PROG:%=$(DFLTD)/%) 43$(ETCDFLTPROG) := FILEMODE = $(LIBFILEMODE) 44$(ETCDFLTPROG) := GROUP = sys 45$(ROOTLOGINDEVPERM) := FILEMODE = 644 46$(ROOTLOGINDEVPERM) := GROUP = sys 47FILEMODE= 4555 48OWNER= root 49 50CLOBBERFILES += $(LOGINDEVPERM) $(ONC_SRCS) 51 52CPPFLAGS += -DSYSV -DCONSOLE='"/dev/console"' -DSECURITY \ 53 -D_FILE_OFFSET_BITS=64 -I$(SRC)/lib/pam_modules/krb5 54 55LDLIBS += -lcmd -lbsm -lpam -ldevinfo 56CFLAGS += $(CCVERBOSE) 57 58.KEEP_STATE: 59 60 61all: $(PROG) $(PROG).dfl $(ROOTLOGINDEVPERM) 62 63$(LOGINDEVPERM): $(LOGINDEVPERMSRC) 64 $(RM) $(LOGINDEVPERM) 65 /bin/sh $(LOGINDEVPERMSRC) > $(LOGINDEVPERM) 66 67$(PROG): $(OBJS) 68 $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 69 $(POST_PROCESS) 70 71install: all $(DIRS) $(ROOTPROG) $(PROG).dfl $(ETCDFLTPROG) $(ROOTLOGINDEVPERM) 72 73$(DIRS): 74 $(INS.dir) 75 76$(DFLTD)/% : % 77 $(MV) $(PROG) $(PROG).save 78 $(LN) $(PROG).dfl $(PROG) 79 $(INS.file) 80 $(RM) $(PROG) 81 $(MV) $(PROG).save $(PROG) 82 83clean: 84 $(RM) $(OBJS) 85 86lint: lint_SRCS 87 88include ../Makefile.targ 89 90# make ONC_PLUS using suffix rule 91# 92 93ONC_PLUS: $(ONC_SRCS) 94