xref: /titanic_44/usr/src/cmd/idmap/idmapd/Makefile (revision bde3d612a7c090234c60e6e4578821237a5db135)
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
53LIBSQLITE =	$(ROOT)/usr/lib/libsqlite.o
54SQLITELINT =	$(ROOT)/usr/lib/llib-lsqlite.ln
55
56include ../../Makefile.cmd
57
58CERRWARN +=	-_gcc=-Wno-type-limits
59CERRWARN +=	-_gcc=-Wno-switch
60CERRWARN +=	-_gcc=-Wno-uninitialized
61
62TEXT_DOMAIN =	SUNW_OST_OSLIB
63XGETTEXT =	$(GNUXGETTEXT)
64XGETFLAGS =	--foreign-user --strict -n -E --width=72 \
65		--omit-header --keyword=directoryError:2 \
66		--language=C --force-po
67
68C99MODE = $(C99_ENABLE)
69POFILE =	$(PROG)_all.po
70
71RPC_MSGOUT_OPT = -DRPC_MSGOUT=idmap_rpc_msgout
72
73ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
74$(ROOTMANIFEST) := FILEMODE= 444
75
76INCS += -I. -I../../../lib/libidmap/common\
77	 -I../../../lib/libsldap/common\
78	 -I../../../lib/libadutils/common \
79	 -I../../../lib/smbsrv/libsmb/common
80
81$(OBJS) := CPPFLAGS += $(INCS) -D_REENTRANT
82$(POFILE) := CPPFLAGS += $(INCS)
83
84CFLAGS += $(CCVERBOSE)
85LDLIBS += -lsecdb \
86	-lsocket \
87	-lnsl \
88	-lidmap \
89	-lscf \
90	-lsldap \
91	-lldap \
92	-luuid \
93	-ladutils \
94	-lumem \
95	-lnvpair \
96	-luutil \
97	-L $(ROOT)/usr/lib/smbsrv \
98	-lsmb
99
100rpc_svc.o := CFLAGS += $(RPC_MSGOUT_OPT)
101
102$(PROG) := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
103$(PROG) := LDFLAGS += $(MAPFILES:%=-M%) \
104	-R /usr/lib/smbsrv
105
106DIRMODE = 0755
107FILEMODE = 0555
108
109lint_SRCS := CPPFLAGS += $(INCS) -D_REENTRANT $(RPC_MSGOUT_OPT)
110lint := LDLIBS += $(SQLITELINT)
111
112.KEEP_STATE:
113
114.PARALLEL: $(OBJS)
115
116all: $(PROG)
117
118$(PROG): $(OBJS) $$(MAPFILES)
119	$(LINK.c) -o $@ $(OBJS) $(LIBSQLITE) $(LDLIBS)
120	$(POST_PROCESS)
121
122$(POFILE): $(POFILES)
123	$(RM) $(POFILE)
124	cat $(POFILES) > $(POFILE)
125
126install: all $(ROOTLIBPROG) $(ROOTMANIFEST)
127
128check: $(CHKMANIFEST)
129
130clean:
131	$(RM) $(OBJS)
132
133clobber:
134
135lint:   lint_SRCS
136
137lint_SRCS:
138
139include ../../Makefile.targ
140
141FRC:
142
143