xref: /titanic_44/usr/src/cmd/idmap/idmapd/Makefile (revision 91d7f85e02991954d1e1bd44673df567ad8dcc87)
1#
2# CDDL HEADER START
3#
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.
7#
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.
12#
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]
18#
19# CDDL HEADER END
20#
21#
22# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
23#
24
25PROG =		idmapd
26MANIFEST =	idmap.xml
27SERVEROBJS =				\
28	directory_provider_builtin.o	\
29	directory_provider_nsswitch.o	\
30	directory_provider_ad.o		\
31	directory_server.o		\
32	adutils.o			\
33	dbutils.o			\
34	idmap_config.o			\
35	idmapd.o			\
36	init.o				\
37	idmap_lsa.o			\
38	nldaputils.o			\
39	rpc_svc.o			\
40	server.o			\
41	wksids.o
42
43SERVERSRCS =	$(SERVEROBJS:%.o=%.c)
44OBJS =		$(SERVEROBJS)
45SRCS =		$(SERVERSRCS)
46POFILES =	$(OBJS:%.o=%.po)
47
48all :=		TARGET = all
49install :=	TARGET = install
50clean :=	TARGET = clean
51clobber :=	TARGET = clobber
52
53include ../../Makefile.cmd
54
55CERRWARN +=	-_gcc=-Wno-type-limits
56CERRWARN +=	-_gcc=-Wno-switch
57CERRWARN +=	-_gcc=-Wno-uninitialized
58
59TEXT_DOMAIN =	SUNW_OST_OSLIB
60XGETTEXT =	$(GNUXGETTEXT)
61XGETFLAGS =	--foreign-user --strict -n -E --width=72 \
62		--omit-header --keyword=directoryError:2 \
63		--language=C --force-po
64
65C99MODE = $(C99_ENABLE)
66POFILE =	$(PROG)_all.po
67
68RPC_MSGOUT_OPT = -DRPC_MSGOUT=idmap_rpc_msgout
69
70ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
71$(ROOTMANIFEST) := FILEMODE= 444
72
73INCS += -I. -I../../../lib/libidmap/common\
74	 -I../../../lib/libsldap/common\
75	 -I../../../lib/libadutils/common \
76	 -I../../../lib/smbsrv/libsmb/common
77
78$(OBJS) := CPPFLAGS += $(INCS) -D_REENTRANT
79$(POFILE) := CPPFLAGS += $(INCS)
80
81CFLAGS += $(CCVERBOSE)
82LDLIBS += \
83	-lsqlite-sys \
84	-lsecdb \
85	-lsocket \
86	-lnsl \
87	-lidmap \
88	-lscf \
89	-lsldap \
90	-lldap \
91	-luuid \
92	-ladutils \
93	-lumem \
94	-lnvpair \
95	-luutil \
96	-L $(ROOT)/usr/lib/smbsrv \
97	-lsmb
98
99rpc_svc.o := CFLAGS += $(RPC_MSGOUT_OPT)
100
101$(PROG) := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
102$(PROG) := LDFLAGS += $(MAPFILES:%=-M%) \
103	-R /usr/lib/smbsrv
104
105DIRMODE = 0755
106FILEMODE = 0555
107
108lint_SRCS := CPPFLAGS += $(INCS) -D_REENTRANT $(RPC_MSGOUT_OPT)
109
110.KEEP_STATE:
111
112.PARALLEL: $(OBJS)
113
114all: $(PROG)
115
116$(PROG): $(OBJS) $$(MAPFILES)
117	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
118	$(POST_PROCESS)
119
120$(POFILE): $(POFILES)
121	$(RM) $(POFILE)
122	cat $(POFILES) > $(POFILE)
123
124install: all $(ROOTLIBPROG) $(ROOTMANIFEST)
125
126check: $(CHKMANIFEST)
127
128clean:
129	$(RM) $(OBJS)
130
131clobber:
132
133lint:   lint_SRCS
134
135lint_SRCS:
136
137include ../../Makefile.targ
138
139FRC:
140
141