1*7c478bd9Sstevel@tonic-gate# 2*7c478bd9Sstevel@tonic-gate# CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate# 4*7c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate# (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate# with the License. 8*7c478bd9Sstevel@tonic-gate# 9*7c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate# and limitations under the License. 13*7c478bd9Sstevel@tonic-gate# 14*7c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate# 20*7c478bd9Sstevel@tonic-gate# CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate# 22*7c478bd9Sstevel@tonic-gate# 23*7c478bd9Sstevel@tonic-gate# Copyright 2003 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate# Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate# 26*7c478bd9Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 27*7c478bd9Sstevel@tonic-gate# 28*7c478bd9Sstevel@tonic-gate# cmd/oamuser/user/Makefile 29*7c478bd9Sstevel@tonic-gate# 30*7c478bd9Sstevel@tonic-gate 31*7c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd 32*7c478bd9Sstevel@tonic-gate 33*7c478bd9Sstevel@tonic-gateGREP= grep 34*7c478bd9Sstevel@tonic-gate 35*7c478bd9Sstevel@tonic-gateUSERADD= useradd 36*7c478bd9Sstevel@tonic-gateUSERDEL= userdel 37*7c478bd9Sstevel@tonic-gateUSERMOD= usermod 38*7c478bd9Sstevel@tonic-gatePROFILE= .profile 39*7c478bd9Sstevel@tonic-gateSTDPROFILE= stdprofile 40*7c478bd9Sstevel@tonic-gateROLEADD= roleadd 41*7c478bd9Sstevel@tonic-gateROLEDEL= roledel 42*7c478bd9Sstevel@tonic-gateROLEMOD= rolemod 43*7c478bd9Sstevel@tonic-gate 44*7c478bd9Sstevel@tonic-gateSBINPROG= $(USERADD) $(USERDEL) $(USERMOD) 45*7c478bd9Sstevel@tonic-gateSKELFILE= $(PROFILE) 46*7c478bd9Sstevel@tonic-gate# 47*7c478bd9Sstevel@tonic-gate# Removing sysadm: deleted $(SYSADMPROG) from this target. 48*7c478bd9Sstevel@tonic-gate# 49*7c478bd9Sstevel@tonic-gatePROG= $(SBINPROG) 50*7c478bd9Sstevel@tonic-gatePRODUCT= $(PROG) $(PROFILE) 51*7c478bd9Sstevel@tonic-gate 52*7c478bd9Sstevel@tonic-gateADD_OBJ= useradd.o uid.o homedir.o \ 53*7c478bd9Sstevel@tonic-gate groups.o call_pass.o userdefs.o messages.o \ 54*7c478bd9Sstevel@tonic-gate val_lgrp.o funcs.o val_lprj.o proj.o 55*7c478bd9Sstevel@tonic-gate 56*7c478bd9Sstevel@tonic-gateDEL_OBJ= userdel.o call_pass.o rmfiles.o isbusy.o \ 57*7c478bd9Sstevel@tonic-gate groups.o messages.o funcs.o proj.o 58*7c478bd9Sstevel@tonic-gate 59*7c478bd9Sstevel@tonic-gateMOD_OBJ= usermod.o uid.o movedir.o groups.o \ 60*7c478bd9Sstevel@tonic-gate rmfiles.o call_pass.o isbusy.o homedir.o \ 61*7c478bd9Sstevel@tonic-gate userdefs.o messages.o val_lgrp.o funcs.o \ 62*7c478bd9Sstevel@tonic-gate val_lprj.o proj.o 63*7c478bd9Sstevel@tonic-gate 64*7c478bd9Sstevel@tonic-gateOBJECTS= $(ADD_OBJ) $(DEL_OBJ) $(MOD_OBJ) 65*7c478bd9Sstevel@tonic-gate 66*7c478bd9Sstevel@tonic-gateSRCS= $(OBJECTS:.o=.c) 67*7c478bd9Sstevel@tonic-gate 68*7c478bd9Sstevel@tonic-gateCLOBBERFILES= $(PROFILE) 69*7c478bd9Sstevel@tonic-gateLIBDIR= ../lib 70*7c478bd9Sstevel@tonic-gateLIBUSRGRP= $(LIBDIR)/lib.a 71*7c478bd9Sstevel@tonic-gateLIBADM= -ladm 72*7c478bd9Sstevel@tonic-gateLOCAL= ../inc 73*7c478bd9Sstevel@tonic-gateHERE= . 74*7c478bd9Sstevel@tonic-gateLINTFLAGS= -u 75*7c478bd9Sstevel@tonic-gate 76*7c478bd9Sstevel@tonic-gateROOTSKEL= $(ROOTETC)/skel 77*7c478bd9Sstevel@tonic-gateINSSBINPROG= $(SBINPROG:%=$(ROOTUSRSBIN)/%) 78*7c478bd9Sstevel@tonic-gateINSSKELFILE= $(SKELFILE:%=$(ROOTSKEL)/%) 79*7c478bd9Sstevel@tonic-gate 80*7c478bd9Sstevel@tonic-gateCPPFLAGS= -I$(HERE) -I$(LOCAL) $(CPPFLAGS.master) 81*7c478bd9Sstevel@tonic-gateOWNER= root 82*7c478bd9Sstevel@tonic-gateGROUP= sys 83*7c478bd9Sstevel@tonic-gate 84*7c478bd9Sstevel@tonic-gate$(INSSBINPROG) := FILEMODE = 0555 85*7c478bd9Sstevel@tonic-gate$(INSSYSADMPROG):= FILEMODE = 0500 86*7c478bd9Sstevel@tonic-gate$(INSSKELFILE) := FILEMODE = 0644 87*7c478bd9Sstevel@tonic-gate$(INSSKELFILE) := GROUP = other 88*7c478bd9Sstevel@tonic-gate$(ROOTSKEL) := OWNER = root 89*7c478bd9Sstevel@tonic-gate$(ROOTSKEL) := GROUP = sys 90*7c478bd9Sstevel@tonic-gate 91*7c478bd9Sstevel@tonic-gate$(USERADD) := OBJS = $(ADD_OBJ) 92*7c478bd9Sstevel@tonic-gate$(USERADD) := LIBS = $(LIBUSRGRP) 93*7c478bd9Sstevel@tonic-gate 94*7c478bd9Sstevel@tonic-gate$(USERDEL) := OBJS = $(DEL_OBJ) 95*7c478bd9Sstevel@tonic-gate$(USERDEL) := LIBS = $(LIBUSRGRP) 96*7c478bd9Sstevel@tonic-gate 97*7c478bd9Sstevel@tonic-gate$(USERMOD) := OBJS = $(MOD_OBJ) 98*7c478bd9Sstevel@tonic-gate$(USERMOD) := LIBS = $(LIBUSRGRP) 99*7c478bd9Sstevel@tonic-gate 100*7c478bd9Sstevel@tonic-gateLDLIBS += -lsecdb -lproject 101*7c478bd9Sstevel@tonic-gate 102*7c478bd9Sstevel@tonic-gate.PARALLEL: $(OBJECTS) 103*7c478bd9Sstevel@tonic-gate 104*7c478bd9Sstevel@tonic-gateall: $(PRODUCT) 105*7c478bd9Sstevel@tonic-gate 106*7c478bd9Sstevel@tonic-gate$(PROFILE): $(STDPROFILE) 107*7c478bd9Sstevel@tonic-gate $(GREP) -v "^#ident" $(STDPROFILE) > $(PROFILE) 108*7c478bd9Sstevel@tonic-gate 109*7c478bd9Sstevel@tonic-gate$(PROG): $$(OBJS) $$(LIBS) 110*7c478bd9Sstevel@tonic-gate $(LINK.c) $(OBJS) -o $@ $(LIBS) $(LDLIBS) 111*7c478bd9Sstevel@tonic-gate $(POST_PROCESS) 112*7c478bd9Sstevel@tonic-gate 113*7c478bd9Sstevel@tonic-gate$(USERADD): $(ADD_OBJ) 114*7c478bd9Sstevel@tonic-gate$(USERMOD): $(MOD_OBJ) 115*7c478bd9Sstevel@tonic-gate$(USERDEL): $(DEL_OBJ) 116*7c478bd9Sstevel@tonic-gate 117*7c478bd9Sstevel@tonic-gateinstall: all .WAIT $(ROOTSKEL) $(INSSBINPROG) $(INSSKELFILE) 118*7c478bd9Sstevel@tonic-gate $(RM) $(ROOTUSRSBIN)/$(ROLEADD) 119*7c478bd9Sstevel@tonic-gate $(LN) $(ROOTUSRSBIN)/$(USERADD) $(ROOTUSRSBIN)/$(ROLEADD) 120*7c478bd9Sstevel@tonic-gate $(RM) $(ROOTUSRSBIN)/$(ROLEDEL) 121*7c478bd9Sstevel@tonic-gate $(LN) $(ROOTUSRSBIN)/$(USERDEL) $(ROOTUSRSBIN)/$(ROLEDEL) 122*7c478bd9Sstevel@tonic-gate $(RM) $(ROOTUSRSBIN)/$(ROLEMOD) 123*7c478bd9Sstevel@tonic-gate $(LN) $(ROOTUSRSBIN)/$(USERMOD) $(ROOTUSRSBIN)/$(ROLEMOD) 124*7c478bd9Sstevel@tonic-gate 125*7c478bd9Sstevel@tonic-gate$(ROOTSKEL): 126*7c478bd9Sstevel@tonic-gate $(INS.dir) 127*7c478bd9Sstevel@tonic-gate 128*7c478bd9Sstevel@tonic-gate$(ROOTSKEL)/%: % 129*7c478bd9Sstevel@tonic-gate $(INS.file) 130*7c478bd9Sstevel@tonic-gate 131*7c478bd9Sstevel@tonic-gateclean: 132*7c478bd9Sstevel@tonic-gate $(RM) $(OBJECTS) 133*7c478bd9Sstevel@tonic-gate 134*7c478bd9Sstevel@tonic-gatelint: lint_SRCS 135*7c478bd9Sstevel@tonic-gate 136*7c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ 137