xref: /illumos-gate/usr/src/cmd/oamuser/user/Makefile (revision ead1f93e)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
53bf5ae9eSrica# Common Development and Distribution License (the "License").
63bf5ae9eSrica# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate#
22*ead1f93eSLiane Praza# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate# cmd/oamuser/user/Makefile
267c478bd9Sstevel@tonic-gate#
277c478bd9Sstevel@tonic-gate
287c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd
297c478bd9Sstevel@tonic-gate
307c478bd9Sstevel@tonic-gateGREP=		grep
317c478bd9Sstevel@tonic-gate
327c478bd9Sstevel@tonic-gateUSERADD= 	useradd
337c478bd9Sstevel@tonic-gateUSERDEL= 	userdel
347c478bd9Sstevel@tonic-gateUSERMOD= 	usermod
357c478bd9Sstevel@tonic-gateROLEADD=	roleadd
367c478bd9Sstevel@tonic-gateROLEDEL=	roledel
377c478bd9Sstevel@tonic-gateROLEMOD=	rolemod
387c478bd9Sstevel@tonic-gate
397c478bd9Sstevel@tonic-gateSBINPROG=	$(USERADD)   $(USERDEL)   $(USERMOD)
407c478bd9Sstevel@tonic-gate#
417c478bd9Sstevel@tonic-gate#	Removing sysadm: deleted $(SYSADMPROG) from this target.
427c478bd9Sstevel@tonic-gate#
437c478bd9Sstevel@tonic-gatePROG=		$(SBINPROG)
44*ead1f93eSLiane PrazaPRODUCT=	$(PROG)
457c478bd9Sstevel@tonic-gate
467c478bd9Sstevel@tonic-gateADD_OBJ=	useradd.o     uid.o        homedir.o \
477c478bd9Sstevel@tonic-gate		groups.o      call_pass.o      userdefs.o   messages.o \
487c478bd9Sstevel@tonic-gate		val_lgrp.o    funcs.o	       val_lprj.o   proj.o
497c478bd9Sstevel@tonic-gate
507c478bd9Sstevel@tonic-gateDEL_OBJ=	userdel.o     call_pass.o      rmfiles.o    isbusy.o \
517c478bd9Sstevel@tonic-gate		groups.o      messages.o       funcs.o      proj.o
527c478bd9Sstevel@tonic-gate
537c478bd9Sstevel@tonic-gateMOD_OBJ=	usermod.o     uid.o            movedir.o    groups.o \
547c478bd9Sstevel@tonic-gate		rmfiles.o     call_pass.o      isbusy.o     homedir.o \
557c478bd9Sstevel@tonic-gate		userdefs.o    messages.o       val_lgrp.o   funcs.o \
567c478bd9Sstevel@tonic-gate		val_lprj.o    proj.o
577c478bd9Sstevel@tonic-gate
587c478bd9Sstevel@tonic-gateOBJECTS=	$(ADD_OBJ)     $(DEL_OBJ)    $(MOD_OBJ)
597c478bd9Sstevel@tonic-gate
607c478bd9Sstevel@tonic-gateSRCS=		$(OBJECTS:.o=.c)
617c478bd9Sstevel@tonic-gate
627c478bd9Sstevel@tonic-gateLIBDIR=		../lib
637c478bd9Sstevel@tonic-gateLIBUSRGRP=	$(LIBDIR)/lib.a
647c478bd9Sstevel@tonic-gateLIBADM=		-ladm
657c478bd9Sstevel@tonic-gateLOCAL=		../inc
667c478bd9Sstevel@tonic-gateHERE=		.
677c478bd9Sstevel@tonic-gateLINTFLAGS=	-u
687c478bd9Sstevel@tonic-gate
697c478bd9Sstevel@tonic-gateROOTSKEL=	$(ROOTETC)/skel
707c478bd9Sstevel@tonic-gateINSSBINPROG=	$(SBINPROG:%=$(ROOTUSRSBIN)/%)
717c478bd9Sstevel@tonic-gateINSSKELFILE=	$(SKELFILE:%=$(ROOTSKEL)/%)
727c478bd9Sstevel@tonic-gate
737c478bd9Sstevel@tonic-gateCPPFLAGS=	-I$(HERE) -I$(LOCAL) $(CPPFLAGS.master)
747c478bd9Sstevel@tonic-gate
757c478bd9Sstevel@tonic-gate$(INSSBINPROG)  := FILEMODE = 0555
767c478bd9Sstevel@tonic-gate$(INSSYSADMPROG):= FILEMODE = 0500
777c478bd9Sstevel@tonic-gate$(INSSKELFILE)  := FILEMODE = 0644
787c478bd9Sstevel@tonic-gate
797c478bd9Sstevel@tonic-gate$(USERADD) :=	OBJS = $(ADD_OBJ)
807c478bd9Sstevel@tonic-gate$(USERADD) :=	LIBS = $(LIBUSRGRP)
817c478bd9Sstevel@tonic-gate
827c478bd9Sstevel@tonic-gate$(USERDEL) :=	OBJS = $(DEL_OBJ)
837c478bd9Sstevel@tonic-gate$(USERDEL) :=	LIBS = $(LIBUSRGRP)
847c478bd9Sstevel@tonic-gate
857c478bd9Sstevel@tonic-gate$(USERMOD) :=	OBJS = $(MOD_OBJ)
867c478bd9Sstevel@tonic-gate$(USERMOD) :=	LIBS = $(LIBUSRGRP)
877c478bd9Sstevel@tonic-gate
8867e3a03eSrieLDLIBS +=	-lsecdb -lproject -ltsol
897c478bd9Sstevel@tonic-gate
907c478bd9Sstevel@tonic-gate.PARALLEL: $(OBJECTS)
917c478bd9Sstevel@tonic-gate
927c478bd9Sstevel@tonic-gateall: 		$(PRODUCT)
937c478bd9Sstevel@tonic-gate
947c478bd9Sstevel@tonic-gate$(PROG):	$$(OBJS) $$(LIBS)
957c478bd9Sstevel@tonic-gate	$(LINK.c) $(OBJS) -o $@ $(LIBS) $(LDLIBS)
967c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
977c478bd9Sstevel@tonic-gate
987c478bd9Sstevel@tonic-gate$(USERADD):	$(ADD_OBJ)
997c478bd9Sstevel@tonic-gate$(USERMOD):	$(MOD_OBJ)
1007c478bd9Sstevel@tonic-gate$(USERDEL):	$(DEL_OBJ)
1017c478bd9Sstevel@tonic-gate
1027c478bd9Sstevel@tonic-gateinstall:	all .WAIT $(ROOTSKEL) $(INSSBINPROG) $(INSSKELFILE)
1037c478bd9Sstevel@tonic-gate		$(RM) $(ROOTUSRSBIN)/$(ROLEADD)
1047c478bd9Sstevel@tonic-gate		$(LN) $(ROOTUSRSBIN)/$(USERADD) $(ROOTUSRSBIN)/$(ROLEADD)
1057c478bd9Sstevel@tonic-gate		$(RM) $(ROOTUSRSBIN)/$(ROLEDEL)
1067c478bd9Sstevel@tonic-gate		$(LN) $(ROOTUSRSBIN)/$(USERDEL) $(ROOTUSRSBIN)/$(ROLEDEL)
1077c478bd9Sstevel@tonic-gate		$(RM) $(ROOTUSRSBIN)/$(ROLEMOD)
1087c478bd9Sstevel@tonic-gate		$(LN) $(ROOTUSRSBIN)/$(USERMOD) $(ROOTUSRSBIN)/$(ROLEMOD)
1097c478bd9Sstevel@tonic-gate
1107c478bd9Sstevel@tonic-gateclean:
1117c478bd9Sstevel@tonic-gate	$(RM) $(OBJECTS)
1127c478bd9Sstevel@tonic-gate
1137c478bd9Sstevel@tonic-gatelint:	lint_SRCS
1147c478bd9Sstevel@tonic-gate
1157c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ
116