xref: /titanic_41/usr/src/cmd/idmap/idmapd/Makefile (revision cbdcbd056f15c9c9fd82d5543b3a502677c4d391)
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
98
99lint_SRCS := CPPFLAGS += $(INCS) -D_REENTRANT $(RPC_MSGOUT_OPT)
100lint := LDLIBS += $(SQLITELINT)
101
102.KEEP_STATE:
103
104.PARALLEL: $(OBJS)
105
106all: $(PROG)
107
108$(PROG): $(OBJS) $$(MAPFILES)
109	$(LINK.c) -o $@ $(OBJS) $(LIBSQLITE) $(LDLIBS)
110	$(POST_PROCESS)
111
112$(POFILE): $(POFILES)
113	$(RM) $(POFILE)
114	cat $(POFILES) > $(POFILE)
115
116install: all $(ROOTLIBPROG) $(ROOTMANIFEST)
117
118check: $(CHKMANIFEST)
119
120clean:
121	$(RM) $(OBJS)
122
123clobber:
124
125lint:   lint_SRCS
126
127lint_SRCS:
128
129include ../../Makefile.targ
130
131FRC:
132
133