xref: /illumos-gate/usr/src/cmd/oamuser/user/Makefile (revision 02b17e23)
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.
240a1278f2SGary Mills# Copyright (c) 2013 Gary Mills
257c478bd9Sstevel@tonic-gate#
265661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc.
277c478bd9Sstevel@tonic-gate
280a1278f2SGary MillsDEFAULTFILES= useradd.dfl
290a1278f2SGary Mills
307c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd
317c478bd9Sstevel@tonic-gate
32*02b17e23SRichard LoweUSERADD=	useradd
33*02b17e23SRichard LoweUSERDEL=	userdel
34*02b17e23SRichard LoweUSERMOD=	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)
44ead1f93eSLiane PrazaPRODUCT=	$(PROG)
457c478bd9Sstevel@tonic-gate
46a7fe1d5bSAndy StormontADD_OBJ=	useradd.o     homedir.o        groups.o     call_pass.o \
47a7fe1d5bSAndy Stormont		userdefs.o    messages.o       val_lgrp.o   funcs.o \
48a7fe1d5bSAndy Stormont		val_lprj.o    proj.o
497c478bd9Sstevel@tonic-gate
507fc68ddfSAlbert LeeDEL_OBJ=	userdel.o     call_pass.o      homedir.o    isbusy.o \
517c478bd9Sstevel@tonic-gate		groups.o      messages.o       funcs.o      proj.o
527c478bd9Sstevel@tonic-gate
537fc68ddfSAlbert LeeMOD_OBJ=	usermod.o     movedir.o        groups.o     homedir.o \
547fc68ddfSAlbert Lee		call_pass.o   isbusy.o         userdefs.o \
55a7fe1d5bSAndy Stormont		messages.o    val_lgrp.o       funcs.o      val_lprj.o \
56a7fe1d5bSAndy Stormont		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)
747014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-implicit-function-declaration
757c478bd9Sstevel@tonic-gate
765661bb76SJohn Levon# not linted
775661bb76SJohn LevonSMATCH=off
785661bb76SJohn Levon
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
937fc68ddfSAlbert LeeLDLIBS +=	-lbsm -lnsl -lsecdb -lproject -lzfs -ltsol
947c478bd9Sstevel@tonic-gate
957c478bd9Sstevel@tonic-gate.PARALLEL: $(OBJECTS)
967c478bd9Sstevel@tonic-gate
977fc68ddfSAlbert Leeall:	$(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
1070a1278f2SGary Millsinstall:	all $(ROOTETCDEFAULTFILES) .WAIT \
1080a1278f2SGary 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