xref: /titanic_44/usr/src/cmd/idmap/idmapd/Makefile (revision 72ca8cc954e6ca79da549736925d4569dc23b239)
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 2008 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26PROG =		idmapd
27MANIFEST =	idmap.xml
28SERVEROBJS =	idmapd.o init.o dbutils.o rpc_svc.o server.o adutils.o\
29	idmap_config.o nldaputils.o
30SERVERSRCS =	$(SERVEROBJS:%.o=%.c)
31OBJS =		$(SERVEROBJS)
32SRCS =		$(SERVERSRCS)
33POFILES =	$(OBJS:%.o=%.po)
34
35all :=		TARGET = all
36install :=	TARGET = install
37clean :=	TARGET = clean
38clobber :=	TARGET = clobber
39
40LIBSQLITE =	$(ROOT)/usr/lib/libsqlite.o
41SQLITELINT =	$(ROOT)/usr/lib/llib-lsqlite.ln
42
43IDMAP_PROT_DIR =        $(SRC)/head/rpcsvc
44IDMAP_PROT_X =          $(IDMAP_PROT_DIR)/idmap_prot.x
45IDMAP_PROT_H =          $(IDMAP_PROT_DIR)/idmap_prot.h
46
47include ../../Makefile.cmd
48
49POFILE =	$(PROG)_all.po
50
51ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
52$(ROOTMANIFEST) := FILEMODE= 444
53
54INCS += -I. -I../../../lib/libidmap/common -I$(IDMAP_PROT_DIR)\
55	 -I../../../lib/libsldap/common\
56	 -I../../../lib/libadutils/common
57
58$(OBJS) := CPPFLAGS += $(INCS) -D_REENTRANT
59$(POFILE) := CPPFLAGS += $(INCS)
60CLOBBERFILES += $(IDMAP_PROT_H)
61
62CFLAGS += -v
63LDLIBS += -lsecdb -lsocket -lnsl -lidmap -lscf -lsldap -lldap -luuid -ladutils
64
65$(PROG) := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
66$(PROG) := LDFLAGS += $(MAPFILES:%=-M%)
67
68DIRMODE = 0755
69FILEMODE = 0555
70OWNER = root
71GROUP = sys
72
73lint_SRCS := CPPFLAGS += $(INCS) -D_REENTRANT
74lint := LDLIBS += $(SQLITELINT)
75
76.KEEP_STATE:
77
78.PARALLEL: $(OBJS)
79
80all: $(PROG)
81
82$(IDMAP_PROT_H):	$(IDMAP_PROT_X)
83	$(RM) $@; $(RPCGEN) -CMNh -o $@ $(IDMAP_PROT_X)
84
85$(PROG): $(IDMAP_PROT_H) $(OBJS) $$(MAPFILES)
86	$(LINK.c) -o $@ $(OBJS) $(LIBSQLITE) $(LDLIBS)
87	$(POST_PROCESS)
88
89$(POFILE): $(POFILES)
90	$(RM) $(POFILE)
91	cat $(POFILES) > $(POFILE)
92
93install: all $(ROOTLIBPROG) $(ROOTMANIFEST)
94
95check: $(CHKMANIFEST)
96
97clean:
98	$(RM) $(OBJS)
99
100clobber:
101
102lint:   lint_SRCS
103
104lint_SRCS:
105
106include ../../Makefile.targ
107
108FRC:
109
110