xref: /illumos-gate/usr/src/cmd/oamuser/user/Makefile (revision 0a1278f2)
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#
2207925104Sgww# Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
23a7fe1d5bSAndy Stormont# Copyright (c) 2013 RackTop Systems.
24*0a1278f2SGary Mills# Copyright (c) 2013 Gary Mills
257c478bd9Sstevel@tonic-gate#
267c478bd9Sstevel@tonic-gate# cmd/oamuser/user/Makefile
277c478bd9Sstevel@tonic-gate#
287c478bd9Sstevel@tonic-gate
29*0a1278f2SGary MillsDEFAULTFILES= useradd.dfl
30*0a1278f2SGary Mills
317c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gateGREP=		grep
347c478bd9Sstevel@tonic-gate
357c478bd9Sstevel@tonic-gateUSERADD= 	useradd
367c478bd9Sstevel@tonic-gateUSERDEL= 	userdel
377c478bd9Sstevel@tonic-gateUSERMOD= 	usermod
387c478bd9Sstevel@tonic-gateROLEADD=	roleadd
397c478bd9Sstevel@tonic-gateROLEDEL=	roledel
407c478bd9Sstevel@tonic-gateROLEMOD=	rolemod
417c478bd9Sstevel@tonic-gate
427c478bd9Sstevel@tonic-gateSBINPROG=	$(USERADD)   $(USERDEL)   $(USERMOD)
437c478bd9Sstevel@tonic-gate#
447c478bd9Sstevel@tonic-gate#	Removing sysadm: deleted $(SYSADMPROG) from this target.
457c478bd9Sstevel@tonic-gate#
467c478bd9Sstevel@tonic-gatePROG=		$(SBINPROG)
47ead1f93eSLiane PrazaPRODUCT=	$(PROG)
487c478bd9Sstevel@tonic-gate
49a7fe1d5bSAndy StormontADD_OBJ=	useradd.o     homedir.o        groups.o     call_pass.o \
50a7fe1d5bSAndy Stormont		userdefs.o    messages.o       val_lgrp.o   funcs.o \
51a7fe1d5bSAndy Stormont		val_lprj.o    proj.o
527c478bd9Sstevel@tonic-gate
537c478bd9Sstevel@tonic-gateDEL_OBJ=	userdel.o     call_pass.o      rmfiles.o    isbusy.o \
547c478bd9Sstevel@tonic-gate		groups.o      messages.o       funcs.o      proj.o
557c478bd9Sstevel@tonic-gate
56a7fe1d5bSAndy StormontMOD_OBJ=	usermod.o     movedir.o        groups.o     rmfiles.o \
57a7fe1d5bSAndy Stormont		call_pass.o   isbusy.o         homedir.o    userdefs.o \
58a7fe1d5bSAndy Stormont		messages.o    val_lgrp.o       funcs.o      val_lprj.o \
59a7fe1d5bSAndy Stormont		proj.o
607c478bd9Sstevel@tonic-gate
617c478bd9Sstevel@tonic-gateOBJECTS=	$(ADD_OBJ)     $(DEL_OBJ)    $(MOD_OBJ)
627c478bd9Sstevel@tonic-gate
637c478bd9Sstevel@tonic-gateSRCS=		$(OBJECTS:.o=.c)
647c478bd9Sstevel@tonic-gate
657c478bd9Sstevel@tonic-gateLIBDIR=		../lib
667c478bd9Sstevel@tonic-gateLIBUSRGRP=	$(LIBDIR)/lib.a
677c478bd9Sstevel@tonic-gateLIBADM=		-ladm
687c478bd9Sstevel@tonic-gateLOCAL=		../inc
697c478bd9Sstevel@tonic-gateHERE=		.
707c478bd9Sstevel@tonic-gateLINTFLAGS=	-u
717c478bd9Sstevel@tonic-gate
727c478bd9Sstevel@tonic-gateROOTSKEL=	$(ROOTETC)/skel
737c478bd9Sstevel@tonic-gateINSSBINPROG=	$(SBINPROG:%=$(ROOTUSRSBIN)/%)
747c478bd9Sstevel@tonic-gateINSSKELFILE=	$(SKELFILE:%=$(ROOTSKEL)/%)
757c478bd9Sstevel@tonic-gate
767c478bd9Sstevel@tonic-gateCPPFLAGS=	-I$(HERE) -I$(LOCAL) $(CPPFLAGS.master)
777014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-implicit-function-declaration
787c478bd9Sstevel@tonic-gate
797c478bd9Sstevel@tonic-gate$(INSSBINPROG)  := FILEMODE = 0555
807c478bd9Sstevel@tonic-gate$(INSSYSADMPROG):= FILEMODE = 0500
817c478bd9Sstevel@tonic-gate$(INSSKELFILE)  := FILEMODE = 0644
827c478bd9Sstevel@tonic-gate
837c478bd9Sstevel@tonic-gate$(USERADD) :=	OBJS = $(ADD_OBJ)
847c478bd9Sstevel@tonic-gate$(USERADD) :=	LIBS = $(LIBUSRGRP)
85a7fe1d5bSAndy Stormont$(USERADD) :=	LDLIBS += -lcmdutils
867c478bd9Sstevel@tonic-gate
877c478bd9Sstevel@tonic-gate$(USERDEL) :=	OBJS = $(DEL_OBJ)
887c478bd9Sstevel@tonic-gate$(USERDEL) :=	LIBS = $(LIBUSRGRP)
897c478bd9Sstevel@tonic-gate
907c478bd9Sstevel@tonic-gate$(USERMOD) :=	OBJS = $(MOD_OBJ)
917c478bd9Sstevel@tonic-gate$(USERMOD) :=	LIBS = $(LIBUSRGRP)
927c478bd9Sstevel@tonic-gate
9307925104SgwwLDLIBS +=	-lbsm -lnsl -lsecdb -lproject -ltsol
947c478bd9Sstevel@tonic-gate
957c478bd9Sstevel@tonic-gate.PARALLEL: $(OBJECTS)
967c478bd9Sstevel@tonic-gate
977c478bd9Sstevel@tonic-gateall: 		$(PRODUCT)
987c478bd9Sstevel@tonic-gate
997c478bd9Sstevel@tonic-gate$(PROG):	$$(OBJS) $$(LIBS)
1007c478bd9Sstevel@tonic-gate	$(LINK.c) $(OBJS) -o $@ $(LIBS) $(LDLIBS)
1017c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
1027c478bd9Sstevel@tonic-gate
1037c478bd9Sstevel@tonic-gate$(USERADD):	$(ADD_OBJ)
1047c478bd9Sstevel@tonic-gate$(USERMOD):	$(MOD_OBJ)
1057c478bd9Sstevel@tonic-gate$(USERDEL):	$(DEL_OBJ)
1067c478bd9Sstevel@tonic-gate
107*0a1278f2SGary Millsinstall:	all $(ROOTETCDEFAULTFILES) .WAIT \
108*0a1278f2SGary Mills			$(ROOTSKEL) $(INSSBINPROG) $(INSSKELFILE)
1097c478bd9Sstevel@tonic-gate		$(RM) $(ROOTUSRSBIN)/$(ROLEADD)
1107c478bd9Sstevel@tonic-gate		$(LN) $(ROOTUSRSBIN)/$(USERADD) $(ROOTUSRSBIN)/$(ROLEADD)
1117c478bd9Sstevel@tonic-gate		$(RM) $(ROOTUSRSBIN)/$(ROLEDEL)
1127c478bd9Sstevel@tonic-gate		$(LN) $(ROOTUSRSBIN)/$(USERDEL) $(ROOTUSRSBIN)/$(ROLEDEL)
1137c478bd9Sstevel@tonic-gate		$(RM) $(ROOTUSRSBIN)/$(ROLEMOD)
1147c478bd9Sstevel@tonic-gate		$(LN) $(ROOTUSRSBIN)/$(USERMOD) $(ROOTUSRSBIN)/$(ROLEMOD)
1157c478bd9Sstevel@tonic-gate
1167c478bd9Sstevel@tonic-gateclean:
1177c478bd9Sstevel@tonic-gate	$(RM) $(OBJECTS)
1187c478bd9Sstevel@tonic-gate
1197c478bd9Sstevel@tonic-gatelint:	lint_SRCS
1207c478bd9Sstevel@tonic-gate
1217c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ
122