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