kill tsol ("Trusted Solaris") aka TX ("Trusted Extensions")
[unleashed.git] / usr / src / cmd / oamuser / user / Makefile
bloba33f8d674bd2db881288a39a4c17ada26c4bceb0
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
22 # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
23 # Copyright (c) 2013 RackTop Systems.
24 # Copyright (c) 2013 Gary Mills
26 # cmd/oamuser/user/Makefile
29 DEFAULTFILES= useradd.dfl
31 include ../../Makefile.cmd
33 GREP= grep
35 USERADD= useradd
36 USERDEL= userdel
37 USERMOD= usermod
38 ROLEADD= roleadd
39 ROLEDEL= roledel
40 ROLEMOD= rolemod
42 SBINPROG= $(USERADD) $(USERDEL) $(USERMOD)
44 # Removing sysadm: deleted $(SYSADMPROG) from this target.
46 PROG= $(SBINPROG)
47 PRODUCT= $(PROG)
49 ADD_OBJ= useradd.o homedir.o groups.o call_pass.o \
50 userdefs.o messages.o val_lgrp.o funcs.o \
51 val_lprj.o proj.o
53 DEL_OBJ= userdel.o call_pass.o homedir.o isbusy.o \
54 groups.o messages.o funcs.o proj.o
56 MOD_OBJ= usermod.o movedir.o groups.o homedir.o \
57 call_pass.o isbusy.o userdefs.o \
58 messages.o val_lgrp.o funcs.o val_lprj.o \
59 proj.o
61 OBJECTS= $(ADD_OBJ) $(DEL_OBJ) $(MOD_OBJ)
63 SRCS= $(OBJECTS:.o=.c)
65 LIBDIR= ../lib
66 LIBUSRGRP= $(LIBDIR)/lib.a
67 LIBADM= -ladm
68 LOCAL= ../inc
69 HERE= .
71 ROOTSKEL= $(ROOTETC)/skel
72 INSSBINPROG= $(SBINPROG:%=$(ROOTUSRSBIN)/%)
73 INSSKELFILE= $(SKELFILE:%=$(ROOTSKEL)/%)
75 CPPFLAGS= -I$(HERE) -I$(LOCAL) $(CPPFLAGS.master)
76 CERRWARN += -Wno-implicit-function-declaration
78 $(INSSBINPROG) := FILEMODE = 0555
79 $(INSSYSADMPROG):= FILEMODE = 0500
80 $(INSSKELFILE) := FILEMODE = 0644
82 $(USERADD) := OBJS = $(ADD_OBJ)
83 $(USERADD) := LIBS = $(LIBUSRGRP)
84 $(USERADD) := LDLIBS += -lcmdutils
86 $(USERDEL) := OBJS = $(DEL_OBJ)
87 $(USERDEL) := LIBS = $(LIBUSRGRP)
89 $(USERMOD) := OBJS = $(MOD_OBJ)
90 $(USERMOD) := LIBS = $(LIBUSRGRP)
92 LDLIBS += -lbsm -lsecdb -lproject -lzfs
94 .PARALLEL: $(OBJECTS)
96 all: $(PRODUCT)
98 $(PROG): $$(OBJS) $$(LIBS)
99 $(LINK.c) $(OBJS) -o $@ $(LIBS) $(LDLIBS)
100 $(POST_PROCESS)
102 $(USERADD): $(ADD_OBJ)
103 $(USERMOD): $(MOD_OBJ)
104 $(USERDEL): $(DEL_OBJ)
106 install: all $(ROOTETCDEFAULTFILES) .WAIT \
107 $(ROOTSKEL) $(INSSBINPROG) $(INSSKELFILE)
108 $(RM) $(ROOTUSRSBIN)/$(ROLEADD)
109 $(LN) $(ROOTUSRSBIN)/$(USERADD) $(ROOTUSRSBIN)/$(ROLEADD)
110 $(RM) $(ROOTUSRSBIN)/$(ROLEDEL)
111 $(LN) $(ROOTUSRSBIN)/$(USERDEL) $(ROOTUSRSBIN)/$(ROLEDEL)
112 $(RM) $(ROOTUSRSBIN)/$(ROLEMOD)
113 $(LN) $(ROOTUSRSBIN)/$(USERMOD) $(ROOTUSRSBIN)/$(ROLEMOD)
115 clean:
116 $(RM) $(OBJECTS)
119 include ../../Makefile.targ