Print this page
Add libuserdefs and use in cmd/{oamuser,passwd}
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/oamuser/user/Makefile
+++ new/usr/src/cmd/oamuser/user/Makefile
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21 #
22 22 # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
23 23 # Copyright (c) 2013 RackTop Systems.
24 24 # Copyright (c) 2013 Gary Mills
25 25 #
26 26 # cmd/oamuser/user/Makefile
27 27 #
28 28
29 29 DEFAULTFILES= useradd.dfl
30 30
31 31 include ../../Makefile.cmd
32 32
33 33 GREP= grep
34 34
35 35 USERADD= useradd
36 36 USERDEL= userdel
37 37 USERMOD= usermod
38 38 ROLEADD= roleadd
39 39 ROLEDEL= roledel
40 40 ROLEMOD= rolemod
41 41
42 42 SBINPROG= $(USERADD) $(USERDEL) $(USERMOD)
43 43 #
44 44 # Removing sysadm: deleted $(SYSADMPROG) from this target.
45 45 #
46 46 PROG= $(SBINPROG)
47 47 PRODUCT= $(PROG)
48 48
49 49 ADD_OBJ= useradd.o homedir.o groups.o call_pass.o \
50 50 userdefs.o messages.o val_lgrp.o funcs.o \
51 51 val_lprj.o proj.o
52 52
53 53 DEL_OBJ= userdel.o call_pass.o homedir.o isbusy.o \
54 54 groups.o messages.o funcs.o proj.o
55 55
56 56 MOD_OBJ= usermod.o movedir.o groups.o homedir.o \
57 57 call_pass.o isbusy.o userdefs.o \
58 58 messages.o val_lgrp.o funcs.o val_lprj.o \
59 59 proj.o
60 60
61 61 OBJECTS= $(ADD_OBJ) $(DEL_OBJ) $(MOD_OBJ)
62 62
63 63 SRCS= $(OBJECTS:.o=.c)
64 64
65 65 LIBDIR= ../lib
66 66 LIBUSRGRP= $(LIBDIR)/lib.a
67 67 LIBADM= -ladm
68 68 LOCAL= ../inc
69 69 HERE= .
70 70 LINTFLAGS= -u
71 71
72 72 ROOTSKEL= $(ROOTETC)/skel
73 73 INSSBINPROG= $(SBINPROG:%=$(ROOTUSRSBIN)/%)
74 74 INSSKELFILE= $(SKELFILE:%=$(ROOTSKEL)/%)
75 75
76 76 CPPFLAGS= -I$(HERE) -I$(LOCAL) $(CPPFLAGS.master)
77 77 CERRWARN += -_gcc=-Wno-implicit-function-declaration
78 78
79 79 $(INSSBINPROG) := FILEMODE = 0555
80 80 $(INSSYSADMPROG):= FILEMODE = 0500
81 81 $(INSSKELFILE) := FILEMODE = 0644
82 82
↓ open down ↓ |
82 lines elided |
↑ open up ↑ |
83 83 $(USERADD) := OBJS = $(ADD_OBJ)
84 84 $(USERADD) := LIBS = $(LIBUSRGRP)
85 85 $(USERADD) := LDLIBS += -lcmdutils
86 86
87 87 $(USERDEL) := OBJS = $(DEL_OBJ)
88 88 $(USERDEL) := LIBS = $(LIBUSRGRP)
89 89
90 90 $(USERMOD) := OBJS = $(MOD_OBJ)
91 91 $(USERMOD) := LIBS = $(LIBUSRGRP)
92 92
93 -LDLIBS += -lbsm -lnsl -lsecdb -lproject -lzfs -ltsol
93 +LDLIBS += -luserdefs -lbsm -lnsl -lsecdb -lproject -lzfs -ltsol
94 94
95 95 .PARALLEL: $(OBJECTS)
96 96
97 97 all: $(PRODUCT)
98 98
99 99 $(PROG): $$(OBJS) $$(LIBS)
100 100 $(LINK.c) $(OBJS) -o $@ $(LIBS) $(LDLIBS)
101 101 $(POST_PROCESS)
102 102
103 103 $(USERADD): $(ADD_OBJ)
104 104 $(USERMOD): $(MOD_OBJ)
105 105 $(USERDEL): $(DEL_OBJ)
106 106
107 107 install: all $(ROOTETCDEFAULTFILES) .WAIT \
108 108 $(ROOTSKEL) $(INSSBINPROG) $(INSSKELFILE)
109 109 $(RM) $(ROOTUSRSBIN)/$(ROLEADD)
110 110 $(LN) $(ROOTUSRSBIN)/$(USERADD) $(ROOTUSRSBIN)/$(ROLEADD)
111 111 $(RM) $(ROOTUSRSBIN)/$(ROLEDEL)
112 112 $(LN) $(ROOTUSRSBIN)/$(USERDEL) $(ROOTUSRSBIN)/$(ROLEDEL)
113 113 $(RM) $(ROOTUSRSBIN)/$(ROLEMOD)
114 114 $(LN) $(ROOTUSRSBIN)/$(USERMOD) $(ROOTUSRSBIN)/$(ROLEMOD)
115 115
116 116 clean:
117 117 $(RM) $(OBJECTS)
118 118
119 119 lint: lint_SRCS
120 120
121 121 include ../../Makefile.targ
↓ open down ↓ |
18 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX