xref: /titanic_50/usr/src/cmd/idmap/idmapd/Makefile (revision 83b2793e85ca08783cdb0e1a84ac91c25a74b694)
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 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26PROG =		idmapd
27MANIFEST =	idmap.xml
28SERVEROBJS =				\
29	directory_provider_builtin.o	\
30	directory_provider_nsswitch.o	\
31	directory_provider_ad.o		\
32	directory_server.o		\
33	adutils.o			\
34	dbutils.o			\
35	idmap_config.o			\
36	idmapd.o			\
37	init.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
76$(OBJS) := CPPFLAGS += $(INCS) -D_REENTRANT
77$(POFILE) := CPPFLAGS += $(INCS)
78
79CFLAGS += -v
80LDLIBS += -lsecdb \
81	-lsocket \
82	-lnsl \
83	-lidmap \
84	-lscf \
85	-lsldap \
86	-lldap \
87	-luuid \
88	-ladutils \
89	-lumem
90
91rpc_svc.o := CFLAGS += $(RPC_MSGOUT_OPT)
92
93$(PROG) := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
94$(PROG) := LDFLAGS += $(MAPFILES:%=-M%)
95
96DIRMODE = 0755
97FILEMODE = 0555
98OWNER = root
99GROUP = sys
100
101lint_SRCS := CPPFLAGS += $(INCS) -D_REENTRANT $(RPC_MSGOUT_OPT)
102lint := LDLIBS += $(SQLITELINT)
103
104.KEEP_STATE:
105
106.PARALLEL: $(OBJS)
107
108all: $(PROG)
109
110$(PROG): $(OBJS) $$(MAPFILES)
111	$(LINK.c) -o $@ $(OBJS) $(LIBSQLITE) $(LDLIBS)
112	$(POST_PROCESS)
113
114$(POFILE): $(POFILES)
115	$(RM) $(POFILE)
116	cat $(POFILES) > $(POFILE)
117
118install: all $(ROOTLIBPROG) $(ROOTMANIFEST)
119
120check: $(CHKMANIFEST)
121
122clean:
123	$(RM) $(OBJS)
124
125clobber:
126
127lint:   lint_SRCS
128
129lint_SRCS:
130
131include ../../Makefile.targ
132
133FRC:
134
135