dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / cmd / idmap / idmapd / Makefile
blobd8f561baa0ecc392f82f2e48dbb4fa9a1d0b7441
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) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
23 # Copyright 2014 Nexenta Systems, Inc. All rights reserved.
26 PROG = idmapd
27 MANIFEST = idmap.xml
28 SERVEROBJS = \
29 adspriv_impl.o \
30 directory_provider_builtin.o \
31 directory_provider_nsswitch.o \
32 directory_provider_ad.o \
33 directory_server.o \
34 adutils.o \
35 dbutils.o \
36 idmap_config.o \
37 idmapd.o \
38 init.o \
39 idmap_lsa.o \
40 krb5_lookup.o \
41 nldaputils.o \
42 server.o \
43 wksids.o
45 GENOBJS = \
46 adspriv_srv.o \
47 rpc_svc.o
49 SERVERSRCS = $(SERVEROBJS:%.o=%.c)
50 GENSRCS = $(GENOBJS:%.o=%.c)
51 OBJS = $(SERVEROBJS) $(GENOBJS)
52 SRCS = $(SERVERSRCS)
53 POFILES = $(OBJS:%.o=%.po)
55 all := TARGET = all
56 install := TARGET = install
57 clean := TARGET = clean
58 clobber := TARGET = clobber
60 include ../../Makefile.cmd
62 CERRWARN += -Wno-type-limits
63 CERRWARN += -Wno-switch
64 CERRWARN += -Wno-uninitialized
66 TEXT_DOMAIN = SUNW_OST_OSLIB
68 C99MODE = $(C99_ENABLE)
69 POFILE = $(PROG)_all.po
71 RPC_MSGOUT_OPT = -DRPC_MSGOUT=idmap_rpc_msgout
73 ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
74 $(ROOTMANIFEST) := FILEMODE= 444
75 RPCSVC= ../../../uts/common/rpcsvc
76 ADS_CMN=../../../lib/libads/common
78 INCS += -I. -I../../../lib/libidmap/common \
79 -I../../../lib/libsldap/common \
80 -I../../../lib/libadutils/common \
81 -I $(ADS_CMN) \
82 -I../../../lib/smbsrv/libsmb/common
84 # Should not have to do this, but the Kerberos includes are a mess.
85 INCS += -I $(ROOT)/usr/include/kerberosv5
87 $(OBJS) := CPPFLAGS += $(INCS)
88 $(POFILE) := CPPFLAGS += $(INCS)
91 LDLIBS += \
92 -lsqlite-sys \
93 -lsecdb \
94 -lidmap \
95 -lscf \
96 -lsldap \
97 -lldap \
98 -luuid \
99 -ladutils \
100 -lads \
101 -lumem \
102 -lnvpair \
103 -luutil \
104 -L $(ROOT)/usr/lib/smbsrv \
105 -lsmb
107 rpc_svc.o := CFLAGS += $(RPC_MSGOUT_OPT)
109 $(PROG) := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
110 $(PROG) := LDFLAGS += $(MAPFILES:%=-Wl,-M%) \
111 -R /usr/lib/smbsrv
113 DIRMODE = 0755
114 FILEMODE = 0555
116 .KEEP_STATE:
118 .PARALLEL: $(OBJS)
120 all: $(PROG)
122 $(PROG): $(OBJS) $$(MAPFILES)
123 $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
124 $(POST_PROCESS)
126 $(POFILE): $(POFILES)
127 $(RM) $(POFILE)
128 cat $(POFILES) > $(POFILE)
130 install: all $(ROOTLIBPROG) $(ROOTMANIFEST)
132 check: $(CHKMANIFEST)
134 clean:
135 $(RM) $(OBJS) $(GENSRCS)
137 RPCGENFLAGS = -CMN
139 adspriv_srv.o : adspriv_srv.c
141 adspriv_srv.c:
142 $(RPCGEN) $(RPCGENFLAGS) -m $(ADS_CMN)/ads_priv.x > $@
144 rpc_svc.o : rpc_svc.c
146 rpc_svc.c : $(RPCSVC)/idmap_prot.x
147 $(RPCGEN) $(RPCGENFLAGS) -m $(RPCSVC)/idmap_prot.x > $@
149 include ../../Makefile.targ