xref: /titanic_41/usr/src/cmd/idmap/idmapd/Makefile (revision 2b4a78020b9c38d1b95e2f3fefa6d6e4be382d1f)
1c5c4113dSnw141292#
2c5c4113dSnw141292# CDDL HEADER START
3c5c4113dSnw141292#
4c5c4113dSnw141292# The contents of this file are subject to the terms of the
5c5c4113dSnw141292# Common Development and Distribution License (the "License").
6c5c4113dSnw141292# You may not use this file except in compliance with the License.
7c5c4113dSnw141292#
8c5c4113dSnw141292# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9c5c4113dSnw141292# or http://www.opensolaris.org/os/licensing.
10c5c4113dSnw141292# See the License for the specific language governing permissions
11c5c4113dSnw141292# and limitations under the License.
12c5c4113dSnw141292#
13c5c4113dSnw141292# When distributing Covered Code, include this CDDL HEADER in each
14c5c4113dSnw141292# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15c5c4113dSnw141292# If applicable, add the following below this CDDL HEADER, with the
16c5c4113dSnw141292# fields enclosed by brackets "[]" replaced with your own identifying
17c5c4113dSnw141292# information: Portions Copyright [yyyy] [name of copyright owner]
18c5c4113dSnw141292#
19c5c4113dSnw141292# CDDL HEADER END
20c5c4113dSnw141292#
21c5c4113dSnw141292#
22479ac375Sdm199847# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23c5c4113dSnw141292# Use is subject to license terms.
24c5c4113dSnw141292#
25c5c4113dSnw141292
26c5c4113dSnw141292PROG =		idmapd
27c5c4113dSnw141292MANIFEST =	idmap.xml
28479ac375Sdm199847SERVEROBJS =	idmapd.o init.o dbutils.o rpc_svc.o server.o adutils.o\
29e8c27ec8Sbaban	idmap_config.o nldaputils.o
30c5c4113dSnw141292SERVERSRCS =	$(SERVEROBJS:%.o=%.c)
31c5c4113dSnw141292OBJS =		$(SERVEROBJS)
32c5c4113dSnw141292SRCS =		$(SERVERSRCS)
33c5c4113dSnw141292POFILES =	$(OBJS:%.o=%.po)
34c5c4113dSnw141292
35c5c4113dSnw141292all :=		TARGET = all
36c5c4113dSnw141292install :=	TARGET = install
37c5c4113dSnw141292clean :=	TARGET = clean
38c5c4113dSnw141292clobber :=	TARGET = clobber
39c5c4113dSnw141292
40c5c4113dSnw141292LIBSQLITE =	$(ROOT)/usr/lib/libsqlite.o
41c5c4113dSnw141292SQLITELINT =	$(ROOT)/usr/lib/llib-lsqlite.ln
42c5c4113dSnw141292
43c5c4113dSnw141292IDMAP_PROT_DIR =        $(SRC)/head/rpcsvc
44c5c4113dSnw141292IDMAP_PROT_X =          $(IDMAP_PROT_DIR)/idmap_prot.x
45c5c4113dSnw141292IDMAP_PROT_H =          $(IDMAP_PROT_DIR)/idmap_prot.h
46c5c4113dSnw141292
47c5c4113dSnw141292include ../../Makefile.cmd
48c5c4113dSnw141292
49c5c4113dSnw141292POFILE =	$(PROG)_all.po
50c5c4113dSnw141292
51c5c4113dSnw141292ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
52c5c4113dSnw141292$(ROOTMANIFEST) := FILEMODE= 444
53c5c4113dSnw141292
54479ac375Sdm199847INCS += -I. -I../../../lib/libidmap/common -I$(IDMAP_PROT_DIR)\
55*2b4a7802SBaban Kenkre	 -I../../../lib/libsldap/common\
56*2b4a7802SBaban Kenkre	 -I../../../lib/libadutils/common
57c5c4113dSnw141292
58c5c4113dSnw141292$(OBJS) := CPPFLAGS += $(INCS) -D_REENTRANT
59c5c4113dSnw141292$(POFILE) := CPPFLAGS += $(INCS)
60c5c4113dSnw141292CLOBBERFILES += $(IDMAP_PROT_H)
61c5c4113dSnw141292
62c5c4113dSnw141292CFLAGS += -v
63*2b4a7802SBaban KenkreLDLIBS += -lsecdb -lsocket -lnsl -lidmap -lscf -lsldap -lldap -luuid -ladutils
64c5c4113dSnw141292
65c5c4113dSnw141292$(PROG) := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
66c5c4113dSnw141292$(PROG) := LDFLAGS += $(MAPFILES:%=-M%)
67c5c4113dSnw141292
68c5c4113dSnw141292DIRMODE = 0755
69c5c4113dSnw141292FILEMODE = 0555
70c5c4113dSnw141292OWNER = root
71c5c4113dSnw141292GROUP = sys
72c5c4113dSnw141292
73c5c4113dSnw141292lint_SRCS := CPPFLAGS += $(INCS) -D_REENTRANT
74c5c4113dSnw141292lint := LDLIBS += $(SQLITELINT)
75c5c4113dSnw141292
76c5c4113dSnw141292.KEEP_STATE:
77c5c4113dSnw141292
78c5c4113dSnw141292.PARALLEL: $(OBJS)
79c5c4113dSnw141292
80c5c4113dSnw141292all: $(PROG)
81c5c4113dSnw141292
82c5c4113dSnw141292$(IDMAP_PROT_H):	$(IDMAP_PROT_X)
83c5c4113dSnw141292	$(RM) $@; $(RPCGEN) -CMNh -o $@ $(IDMAP_PROT_X)
84c5c4113dSnw141292
85c5c4113dSnw141292$(PROG): $(IDMAP_PROT_H) $(OBJS) $$(MAPFILES)
86c5c4113dSnw141292	$(LINK.c) -o $@ $(OBJS) $(LIBSQLITE) $(LDLIBS)
87c5c4113dSnw141292	$(POST_PROCESS)
88c5c4113dSnw141292
89c5c4113dSnw141292$(POFILE): $(POFILES)
90c5c4113dSnw141292	$(RM) $(POFILE)
91c5c4113dSnw141292	cat $(POFILES) > $(POFILE)
92c5c4113dSnw141292
93c5c4113dSnw141292install: all $(ROOTLIBPROG) $(ROOTMANIFEST)
94c5c4113dSnw141292
95c5c4113dSnw141292check: $(CHKMANIFEST)
96c5c4113dSnw141292
97c5c4113dSnw141292clean:
98c5c4113dSnw141292	$(RM) $(OBJS)
99c5c4113dSnw141292
100c5c4113dSnw141292clobber:
101c5c4113dSnw141292
102c5c4113dSnw141292lint:   lint_SRCS
103c5c4113dSnw141292
104c5c4113dSnw141292lint_SRCS:
105c5c4113dSnw141292
106c5c4113dSnw141292include ../../Makefile.targ
107c5c4113dSnw141292
108c5c4113dSnw141292FRC:
109c5c4113dSnw141292
110